2

I installed webdriver-manager by installing protractor via npm install with package.json. Under the root dir /webdriver-manager node module there is a config.json that contains

    {
      "webdriverVersions": {
        "selenium": "2.53.1",
        "chromedriver": "2.27",
        "geckodriver": "v0.13.0",
        "iedriver": "2.53.1",
        "androidsdk": "24.4.1",
        "appium": "1.6.0"
      },
      "cdnUrls": {
        "selenium": "https://selenium-release.storage.googleapis.com/",
        "chromedriver": "https://chromedriver.storage.googleapis.com/",
        "geckodriver": "https://github.com/mozilla/geckodriver/releases/download/",
        "iedriver": "https://selenium-release.storage.googleapis.com/",
        "androidsdk": "http://dl.google.com/android/"
      }

}

I'm thinking here is where I can change the version of selenium to whatever I want and then run webdriver-manager update command. When I do that though the selenium version installed is different than what is listed above. The version that gets installed is selenium 3.1.0 and gecko 0.14.0. Chromedriver is installing 2.27 and matching. Is this the way to install different versions and if so why are the versions different? Thanks.

awaken
  • 789
  • 1
  • 11
  • 22

1 Answers1

9

This depends on the version of protractor / webdriver-manager installed. So if you are using the latest (as of this post) protractor@5.1.1 uses the dependency webdriver-manager@12.02. As of webdriver-manager@12.0.2, it downloads the latest version and does not use the confg.json. config.json will be removed in the next version.

To download a specific version of (for example) chromedriver:

webdriver-manager update --versions.chrome 2.20

You could get the full list of options for the update method with:

webdriver-manager update-help
cnishina
  • 5,016
  • 1
  • 23
  • 40
  • 2
    I found it helpful to go here: https://chromedriver.storage.googleapis.com/index.html to get a list of the chrome versions that are supported by webdriver-manager - today they apparently released the webdriver for Chrome 90 which is not out yet for my OS, so I had to run update with `---version.chrome 89.0.4389.23` which I only knew by checking out the "LATEST RELEASE 89" file – nephiw Apr 19 '21 at 14:24
  • What OS + chipset is not supported yet? Just out of curiosity. – cnishina Apr 23 '21 at 18:24
  • I use 64 bit Ubuntu as my daily OS. Typically Chrome auto-updates, but not this time. Today I downloaded the latest deb and I am up to 90. Maybe I just missed it, but it is good to know how to get older versions of the driver regardless. – nephiw Apr 26 '21 at 14:07