Search code examples
seleniumselenium-webdriverprotractorwebdriver-manager

protractor is using old webdriver version while latest is installed in system


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).


Solution

  • 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.