0

I'm working with protractor to run end-2-end test for my app. When I try to run the app, I get following error

[16:17:53] E/local - Error code: 135
[16:17:53] E/local - Error message: Could not find chromedriver at C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26
[16:17:53] E/local - Error: Could not find chromedriver at C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26

I don't know why its looking for version 2.26 while when I run command

webdriver-manager --version

it gives me version 2.32. I've also updated it (locally and globally) again by running

webdriver-manager update -g --versions.chrome=2.32

but it doesn't seems to work. I've also checked manually that webdriver exe with version 2.32 is available at the location being referred in error i.e. C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26 .

Also, when I try to update webdriver-manager with following command, I place webdriver-manager exe with version 2.26 in the mentioned location. I don't know whether it is reading it from some config or from somewhere else because I'm unable to locate it. Need help in how to get rid of this 2.26 version and how to get protractor work with latest version (i.e. 2.32).

Omar Bahir
  • 1,237
  • 5
  • 20
  • 48
  • 1
    run `webdriver-manager clean`, then update again – Gunderson Oct 02 '17 at 17:09
  • I've tried this but result is same. – Omar Bahir Oct 02 '17 at 20:33
  • After you ran `webdriver-manager clean`, did the \chromedriver_2.26 directory get removed? If not, manually delete it and retry the install. Also, verify in your `package.json` that there are no dependency on a specific version of chrome – HaC Oct 02 '17 at 23:32
  • yes, When I do webdriver-manager clean, the chromedriver_2.26 get removed but when I do webdriver-manager update, it again downloads chromedriver_2.26 through curl. I relly want to know where this curl command is written and why its ALWAYS download 2.26 version and not the latest. Even I tried to update it with --versions.chrome=2.32 flag as well but result is same. – Omar Bahir Oct 03 '17 at 05:45
  • which version of protractor are you using? – Ram Pasala Oct 04 '17 at 04:27

3 Answers3

3

I was unable to fix this issue through webdriver-manager update or npm install/update but found a workaround for it. I've manually downloaded the chromedriver version 2.32. Renamed the .exe file to chromedriver_2.26.exe and then replaced it on C:\Users\Dell\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\chromedriver_2.26 and it worked correctly.

Omar Bahir
  • 1,237
  • 5
  • 20
  • 48
1

I found that the ChromeDriver versions used by Protractor's webdriver-manager are always too far behind for my needs.

The solution I found for this is:

  1. Download the Selenium Server Standalone
  2. Download the ChromeDriver version you want.
  3. You will then create a .bat file with the following:

    java -Dwebdriver.chrome.driver=C:\path_to_your_files\chromedriver -jar C:\path_to_your_files\selenium-server-standalone-3.4.0.jar -port 4444

Then you can just double-click on the .bat file and start your Selenium server with any ChromeDriver version you want. Hope this helps!

GoLGo13
  • 81
  • 5
  • Thanks GoLGo13 for your response, but I didn't work out for me as Protractor try to start chromedriver and selenium itself so it still taking the wrong versions. +1 for you. – Omar Bahir Oct 05 '17 at 06:13
0

I faced similar issue when i upgraded ChromeDriver from 75 to 79. Even though "webdriver-manager update --versions.chrome=79..." did place the latest exe under rootfolder\node_modules\webdriver-manager\selenium, Protractor was still picking the old version.

For me the issue got resolved when i manually placed the latest version of ChromeDriver under the rootfolder\node_modules\protractor\node_modules\webdriver-manager\selenium and also updated the update-config.json located in the same folder.

Akbar
  • 1,513
  • 4
  • 20
  • 34