Reputation: 2431
I am trying to run Protractor tests on my Angular app, but am facing an issue with my version of ChromDriver not matching my version of Chrome.
I'm able to run webdriver-manager start
fine with no issues, but when I try to run my tests I get this error message:
SessionNotCreatedError: session not created: This version of ChromeDriver only supports Chrome version 85 Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53'
I checked my version of Chrome & that is version 84. But when I try to update Chrome it says that my version is up to date.
So I have 2 questions:
(1) How come this latest version (85) of Chrome isn't available to me?
(2) Is there a way I can downgrade my webdriver so that it picks up version 84 of Chrome?
Upvotes: 1
Views: 6768
Reputation: 615
In case you don't generally start the webdriver-manager server with webdriver-manager start
. Here is another solution you can try which I also posted in a discussion on the webdriver-manager issue 376
Here is the copied work-around (this is just a stop-gap since obviously we don't want to hard-code the version):
We have webdriver-manager installed as project dependency (npm install --save-dev webdriver-manager
)
we call webdriver-manager update --versions.chrome 84.0.4147.30
prior to running our tests. This will install the 84 chromedriver version in ./node_modules/webdriver-manager/selenium/. (We just made this as a npm script in our package.json)
We then update the protractor.conf file to have this line in the root of exports.config: chromeDriver:"./node_modules/webdriver-manager/selenium/chromedriver_84.0.4147.30.exe"
**
Protractor still installs chromedriverr 85, but it will use the 84 version.
** In our case, we run our protractor tests in docker, but develop mostly on windows. So I updated the protractor.conf to have this line so that it works in either:
chromeDriver: process.platform === "win32" ? "./node_modules/webdriver-manager/selenium/chromedriver_84.0.4147.30.exe" : "./node_modules/webdriver-manager/selenium/chromedriver_84.0.4147.30"
Upvotes: 1
Reputation: 296
I answered this question here as well: https://github.com/angular/protractor/issues/5460 The easiest possible fix is to use:
webdriver-manager update --versions.chrome=84.0.4147.30
webdriver-manager start --versions.chrome=84.0.4147.30
to update and start the webdriver server. This forces the version to stay to 84. What I think happened v85 of the chromedriver was added and labelled as latest (you can see this here) which forced webdriver-manager to start downloading version 85 (it by default downloads the latest version).
Upvotes: 3