How to stop protractor from downloading latest chromedriver?

杀马特。学长 韩版系。学妹 提交于 2021-01-27 05:54:28

问题


I am running E2E tests using Protractor on Bamboo. I got this error unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn't exist)

Then I found that I had to downgrade to 2.37 version of Chromedriver. I found that here "https://github.com/angular/protractor/issues/4850" .

I found a way to download a specific version of chromedriver here https://medium.com/@cnishina/webdriver-manager-a-node-module-c33a820f5eb . So I am using webdriver-manager update --versions.chrome 2.37 .

On running npm run e2e as a pree2e step I do "webdriver-manager update --versions.chrome 2.37" but after that once it starts "ng e2e" it downloads latest chromedriver (2.46). I can also see update-config.json is updated with both 2.46 and 2.37.

I am assuming if 2.46 is present then protractor tests will use 2.46 Chromedriver and not 2.37.

My question is how do I stop latest Chromedriver 2.46 from being downloaded? I only need 2.37 to solve the issue(DevToolsActivePort file doesn't exist) I have on Bamboo.

I am using "protractor": "^5.4.0" which installs "webdriver-manager": "^12.0.6" . Do I need to change protractor version?


回答1:


Add option --webdriverUpdate=false to disable webdriver update ng e2e --webdriverUpdate=false

This option has subtle differences in different Angular CLI versions. Check your Angualr CLI version, then get the precise option.



来源:https://stackoverflow.com/questions/54753228/how-to-stop-protractor-from-downloading-latest-chromedriver

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!