Selenium unable to launch electron


#1

I followed the instructions @ http://electron.atom.io/docs/v0.30.0/tutorial/using-selenium-and-webdriver/ 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/
dist
(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.


#2

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'}})

#3

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?