Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When using Protractor 5.4.2, webdriver-manager downloads 2.46 which is not compatible with Chrome 74

Protractor 5.4.2 uses webdriver-manager 12 which downloads Chromedriver 2.46. Chromedriver 2.46 supports Chrome 71-73 (see http://chromedriver.chromium.org/downloads). We need to download Chromedriver 74.0.3729.6.

I also see that there is a webdriver-manager@13 that supports this. Should I use it with Protractor 5.4.2?

like image 802
cnishina Avatar asked Apr 29 '19 20:04

cnishina


2 Answers

Try installing chromedriver v. 74.0.3729.6 (Chrome 74) LOCALLY AND GLOBALLY

for the global installation run

webdriver-manager update --versions.chrome 74.0.3729.6

for local installation run something like

node ./node_modules/protractor/bin/webdriver-manager update --versions.chrome 74.0.3729.6

List of driver versions is here http://chromedriver.chromium.org/downloads

Possibly you'll face this issue update protractor chrome driver to 74, see my comment there

Let me know if you run into issues

like image 40
Sergey Pleshakov Avatar answered Jan 04 '23 03:01

Sergey Pleshakov


[email protected] is fixed

webdriver-manager released 12.1.4 which will download a max ChromeDriver version of 74. How to get it?

  • do a fresh install of your node modules directory (remove node_modules folder and do a npm install)
  • do a forced install npm install -f

If you want to download a version specific in 74.x.x.x, this has been fixed in 12.1.4. I introduced a bug when I tried to quickly fix the issue in 12.1.3 causing this to not work.

Background on webdriver-manager downloading ChromeDriver 2.xx

webdriver-manager downloaded files based on the https://chromedriver.storage.googleapis.com/ The versions from the download were formatted 2.xx. These did not map to versions of Chrome. To make semantic version comparisons, we would tack on a '.0' to user the semver node module to make comparisons.

This assumption does not work with the new versioning for ChromeDriver 74 (74.0.3729.6). This is why it was not downloading the file. This change happened in approx August 2018. When this change happened fixes were added to the upcoming version of webdriver-manager 13.

So why not use webdriver-manager@13? Some reasons why this won't work with Protractor 5.4.2:

  • The fix was in for webdriver-manager 13 but Protractor 5.4.2 relies on webdriver-manager ^12.0.6. Installing another version of webdriver-manager might not work when resolving the downloaded files.
  • This would not work when launching Protractor with direct connect (driverProviders/direct) or local since the update-config.json file is not created. There is a fix for this here: https://github.com/angular/webdriver-manager/pull/372 but probably will not be merged.

How does webdriver-manager@12 download a max version of 74?

For webdriver-manager@12, the max version is stored here: https://github.com/angular/webdriver-manager/blob/legacy/config.json#L5 If a Chrome releases 75, this should also be changed to version 75 in a pull request against the legacy branch.

like image 114
cnishina Avatar answered Jan 04 '23 03:01

cnishina