electron-userland / spectron

DEPRECATED: 🔎 Test Electron apps using ChromeDriver
http://electronjs.org/spectron
MIT License
1.68k stars 229 forks source link

This version of ChromeDriver only supports Chrome version 91 #1030

Closed hyunbeomheo closed 2 years ago

hyunbeomheo commented 2 years ago

Electron version :13.1.8 Spectron version : 15.0.0

Failed to create session.
session not created: This version of ChromeDriver only supports Chrome version 91
Current browser version is 93.0.4577.63 with binary path /usr/bin/google-chrome

at Object.startWebDriverSession (node_modules/webdriver/build/utils.js:34:15)
at Function.newSession (node_modules/webdriver/build/index.js:35:45)
at Object.<anonymous>.exports.remote (node_modules/webdriverio/build/index.js:53:22)

I tried below to solve this issue :

  1. Installing the latest version of electron-chromedriver
  2. Overwritten the version of Chromedriver binary

I thought the issue related to some dependency modules of Spectron. So I wonder how could solve this issue at least temporarily. Thx.

hyunbeomheo commented 2 years ago

Finally, I found a workaround.

It is to using an older version of Chrome Browser when I run these test cases.

There is no official website that offering old version binaries, so I look for alternatives. And I found one here. (https://chromium.cypress.io/)

Secondly, I Extracted all binaries to a specific directory like ~/.chrome_binary_91.

After that, I added some code like below.

app = new Application({
    { ... }
    webdriverOptions: {
        capabilities: {
        'goog:chromeOptions': {
            binary: '~/.chrome_binary_91/chrome',
        },
    },
},

It works. I hope this solution will help you too. Thx.