electron-userland / spectron

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

can we test desktop applications using spectron? #242

Open karthik1407s opened 6 years ago

karthik1407s commented 6 years ago

Hi, I have an application(.exe) developed using angular and electron( initially a web application is built using angular and then it is converted into desktop application using electron packager), can I test this application, installed in my PC, using spectron?

shivakrishnach31 commented 6 years ago

I also have the same question. @kevinsawicki @zeke Could you please respond and help us.

Thanks in Advance, Shiva

robinwassen commented 6 years ago

@karthik1407s @shivakrishnach31 I have not tested Spectron, but looking at the docs it seems like this is exactly what it does.

The first thing you do to setup the tests is:

var app = new Application({
  path: '/Applications/MyApp.app/Contents/MacOS/MyApp'
})

The path specified is the path to the executable on macOS, should also work on Windows since there is AppVeyor support.

csharsha commented 6 years ago

Anyone of you lucky enough to test .exe application in windows? If yes please help. I need one.

ericyahhh commented 6 years ago

@csharsha It works as @robinwassen described above. For .exe files you also need to simply specify the absolute path to it:

var app = new Application({
  path: '/[PATH]/MyApp.exe'
})

You don't even need to worry about the backslash on Windows.