问题
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