0
votes

I have recently hit an issue in my tests after chrome updated (to 57.0.2987.133) on my machine and is no longer compatible with the version of chromedriver I have installed (2.25).

I found out I needed to update to 2.28, so after reading some other posts on this subject, I have run the webdriver-manager update command from within the location where protractor is installed on my machine.

C:\Users\me\AppData\Roaming\npm\node_modules\protractor\bin>webdriver-manager update --versions.chrome 2.28 --ignore_ssl

If I then look under the selenium folder at this location:

C:\Users\me\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium

I can see chromedriver_2.28.exe listed but when I attempt to run my tests, webdriver tries to load 2.25:

[16:19:35] I/direct - Using ChromeDriver directly... [16:19:35] I/launcher - Running 1 instances of WebDriver [16:19:35] E/direct - Error code: 135 [16:19:35] E/direct - Error message: Could not find chromedriver at C:\Users\me\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager selenium\chromedriver_2.25.exe

I'm unsure why it's not trying to use the 2.28 version that I have installed.

Any ideas?

1
Have you tried setting it with the ChromeOptions class?Brian
Are you on protractor v5+? There was a change in that which should now cause webdriver-manager to grab the latest version of binaries by default. I had an issue where I typed webdriver-manager status, it would say chromedriver version available: 2.26 [default], 2.28, which was annoying.Gunderson
I personally hated this solution, but you could also try specifying a specific version of the driver you want to use webdriver-manager start --versions.chrome=2.28 (or might be chromedriver instead of chrome);Gunderson
Ok so I was on v4, and couldnt updated to 5 until had upgraded my node version from v4.x to v6.x! I have now updated protractor to 5.1.1 and have the latest chromedriver and its working fine now. thanks!mindparse

1 Answers

3
votes

Selenium doesn't automatically pick up the latest installed version, the version you are using has to support it to run it by default. And the drivers tend to be released quicker than Selenium, you need to specify the version of the chrome driver:

You can either run Selenium in standalone server mode:

webdriver-manager start --versions.chrome=2.28

Or

Specify the version when the selenium server is started in Protractor by setting the seleniumArgs in your config file:

seleniumArgs: '--versions.chrome=2.28'