Nix
Nix

Reputation: 176

End to end testing using protractor failing because of chrome driver

3 days ago our end-to-end protractor tests were using the version 2.45 of the chrome. Since yesterday, protractor is using the version 2.46 and our tests are failing:

[INFO] [21:16:41] I/downloader - curl -o/var/lib/jenkins/workspace/risk-score-frontend/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.46.zip https://chromedriver.storage.googleapis.com/2.46/chromedriver_linux64.zip [INFO] [21:16:41] I/update - chromedriver: unzipping chromedriver_2.46.zip [INFO] [21:16:41] I/update - chromedriver: setting permissions to 0755 for /var/lib/jenkins/workspace/risk-score-frontend/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.46 [INFO] [21:16:42] I/launcher - Running 1 instances of WebDriver [INFO] [21:16:42] I/direct - Using ChromeDriver directly... [INFO] [21:16:42] E/launcher - session not created: Chrome version must be between 71 and 75 [INFO] (Driver info: chromedriver=2.46.628388 (4a34a70827ac54148e092aafb70504c4ea7ae926),platform=Linux 4.4.0-1013-aws x86_64) [INFO] [21:16:42] E/launcher - SessionNotCreatedError: session not created: Chrome version must be between 71 and 75

The machine hosting jenkins is a ubuntu with chrome version 70.0.3538.110-0ubuntu0.16.04.1

How can I force protractor to use version 2.45 until I find a way to upgrade chrome?

Thanks!

Upvotes: 2

Views: 7053

Answers (3)

Winnipass
Winnipass

Reputation: 950

Install Chrome

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update 
sudo apt-get install google-chrome-stable

Update Chrome

sudo apt-get --only-upgrade install google-chrome-stable
source: https://gist.github.com/mrtns/78d15e3263b2f6a231fe

Upvotes: 1

Nix
Nix

Reputation: 176

Since the tests were launched with ng e2e. I ended up modifying package.json with the following:

...
"pree2e": "webdriver-manager update --standalone false --gecko false --versions.chrome 2.44", 
"e2e": "ng e2e --webdriver-update=false",
...

Upvotes: 9

Ben Mohorc
Ben Mohorc

Reputation: 694

When running webdriver-manager you have the option to use --versions. If you run webdriver-manager status You will get all of the versions available to you. I assume it will say you have chromedriver version 2.45 since that is what you previously ran. To run webriver-manager with version 2.45 you will do webdriver-manager --versions.chrome 2.45 start

Upvotes: 4

Related Questions