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 #1046

Open snake-py opened 2 years ago

snake-py commented 2 years ago

I am getting

  Error: Failed to create session.
session not created: This version of ChromeDriver only supports Chrome version 87
Current browser version is 94.0.4606.81 with binary path

I read that this can be caused by mismatching Spectron to electron versions. This is what I am using:

"spectron": "^13.0.0",
"electron": "^15.0.0",

The app is also opening multiple times.

My test code:


const Application = require('spectron').Application;
const electronPath = require('electron'); 
const path = require('path');
const assert = require('assert');

const app = new Application({
  path: electronPath,
  args: [path.join(__dirname, '..')],
});

describe('Start up Testing',  () =>{
  this.timeout(100000);
  beforeEach(() => {

    return app.start();
  });
  afterEach(() => {
    if (app && app.isRunning()) {
      return app.stop();
    }
  });

  it('shows an initial window', async () => {
    const isVisible = await app.browserWindow.isVisible();
    expect(isVisible).toBe(true);

  });
});
MasterOdin commented 2 years ago

You've flipped the table versions. Spectron ^13.0 supports Electron ^11.0.0. Support for electron ^15.0 has an open PR though https://github.com/electron-userland/spectron/pull/1047.