spectron
spectron copied to clipboard
This version of ChromeDriver only supports Chrome version
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);
});
});
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.