ChromeDriver mismatch with Chrome version - unable to get latest version with node module "@wdio/selenium-standalone-service"

2.4k views Asked by At

In my codeceptjs setup, I updated @wdio/selenium-standalone-service to latest version 6.9.0 This seem to install chromedriver version version: '85.0.4183.87'

Now that chrome browser version upgraded to 87.0.4280.66, tests that worked fine earlier are now failing with:

Can't connect to WebDriver. Error: Failed to create session. session not created: This version of ChromeDriver only supports Chrome version 85

Any suggestion on how this issue can be resolved. Since I am using "@wdio/selenium-standalone-service", did not separately install chromedriver. Hence have this version issue with "@wdio/selenium-standalone-service"

2

There are 2 answers

0
Satish_london On

we faced the exact same problem! I managed to get this working by using this version of wdio selenium standalone(5.16.10). I have no idea why it works with this older version though.

“devDependencies”: {
    “@wdio/selenium-standalone-service”: “^5.16.10”,

You can specify the latest chromedriver version you want it to use by specifying it in the plugins section.

plugins: {
        screenshotOnFail: {enabled: true},
        wdio: {enabled: true, services: [‘selenium-standalone’],seleniumArgs: {
        drivers: {
            chrome: {
                version: ‘87.0.4280.20’, // Chromedriver version
                arch: process.arch,
            },
            firefox: {
                version: ‘0.26.0’, // Geckodriver version
                arch: process.arch,
            },
        },
    },
    seleniumInstallArgs: {
        baseURL: ‘https://selenium-release.storage.googleapis.com’,
        drivers: {
            chrome: {
                version: ‘87.0.4280.20’,
                arch: process.arch,
                baseURL: ‘https://chromedriver.storage.googleapis.com’,
            },
            firefox: {
                version: ‘0.26.0’,
                arch: process.arch,
                baseURL: ‘https://github.com/mozilla/geckodriver/releases/download’,
            },
        },
    }},
        allure: {enabled: true},
    },
0
Sudeep Sarkar On

Its a driver mismatch I'm using protractor helper in your case it will webdriver ..../node_modules/protractor/node_modules/webdriver-manager/selenium

so, the solution or you can say its a hack

  1. download the latest chrome driver.
  2. navigate to the respected path mentioned above and copy the chrome driver file name(not the .zip one)
  3. unzip the latest downloaded file here >> delete the existing file and rename the file name which you have copied in the step 2

Now try to run you code