在无头镀铬自动化测试的所有文档中,关于在Windows上进行操作几乎没有。 对于Angular 2中完全开发的应用程序,使用无头镀铬进行自动测试(尤其是e2e)的信息更少。
我有一个相当大的Angular 2应用程序,我运行170次量角器测试,每次大约需要30分钟。我想使用无头镀铬选项来加快执行速度,当然,不要让窗口一直弹出。
到目前为止 -
我的问题 - 我错过了什么?除了镀铬驱动器是最新的之外,没有提到任何地方的最小角度要求或任何包装的最低版本。 有没有人试图在现有的角度2应用程序中使用它?如果成功,请分享。
在第2步之后,我收到以下错误
protractor ./config/test/chrome.conf
Report destination: report\report.html
[19:43:11] I/launcher - Running 1 instances of WebDriver
[19:43:11] I/direct - Using ChromeDriver directly...
[19:43:11] E/direct - Error code: 135
[19:43:11] E/direct - Error message: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
[19:43:11] E/direct - Error: Could not find update-config.json. Run 'webdriver-manager update' to download binaries.
at IError (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:6:1)
at ProtractorError (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:11:9)
at BrowserError (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\exitCodes.js:52:9)
at Direct.getNewDriver (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\direct.js:63:31)
at Runner.createBrowser (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\runner.js:195:43)
at q.then.then (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
at C:\Users\amryadav\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:556:49
[19:43:11] E/launcher - Process exited with error code 135
答案 0 :(得分:0)
尝试运行./node_modules/protractor/bin/webdriver-manager update
项目目录以更新项目的本地量角器安装。