Install specific chromedriver for protractor

廉价感情. 提交于 2019-12-22 10:10:57

问题


I am having an issue with chrome driver that runs on the CircleCi. The problem is that when running:

./node_modules/.bin/webdriver-manager update

and then checking the version of chromedriver and selenium with the command:

ls -lt node_modules/protractor/selenium

it shows the latest versions are:

selenium-server-standalone-2.45.0.jar
chromedriver
chromedriver_2.15.zip

According to the npm.taobao.org note ChromeDriver version 2.15 supports Chrome v40-43. But CicleCi documentation says that it uses Chrome version 38.0. Consequently, I need to use ChromeDriver v2.13 which is compatible with Chrome v38.0. My question is that how can I force webdriver-manager to use ChromeDriver v2.13 instead of the latest one.


回答1:


This should probably be a feature request for the protractor team. But this is what I recommend you to do:

Change the webdriverVersions property on protractor's config.json file. webdriver-manager uses this property to download the files.




回答2:


@Andres suggested a good solution, but the easiest can be adding a circle.yml file that contains the following command to upgrade chrome version:

test:
  pre:
    - sudo apt-get update && sudo apt-get install --only-upgrade google-chrome-stable


来源:https://stackoverflow.com/questions/31294909/install-specific-chromedriver-for-protractor

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