Selenium unable to launch electron


I followed the instructions @ to launch electron app from Selenium on Windows machine. The only change is the path to electron binary (node_modules/electron-prebuilt/dist)

It fails with the following error. ^
UnknownError: unknown error: no chrome binary at node_modules/electron-prebuilt/
(Driver info: chromedriver=2.15 (8c7f5b9adb9372130a9295b7e0fb19355f613cf9),pla
tform=Windows NT 6.3 x86_64)

Any ideas?

Looking into Selenium-Driver code, it doesn’t looks like to honor browserName “electron” being set in the webdriver builder configuration.


The simplest would be to see your JS Electron code.

For example, this path for my Electron binary is OK.

.withCapabilities({chromeOptions: {binary: 'C:/Electron/electron-v0.30.4-win32-ia32/electron.exe'}})


Thanks LeMoussel. Am able to launch electron after giving full file path.

We are trying to integrate existing web app protractor configuration to run UI tests against electron app. By specifying these options in Protactor configuration, i’m able to launch Electron.

Unfortunately, there are bunch of issues which popup after that. Does anybody have samples of running UI tests with Protractor on Electron?