Questions tagged [spectron]

Spectron is a testing framework, built upon ChromeDriver and WebdriverIO, for end to end testing Electron applications.

Spectron is built by the Electron team to make end to end testing Electron apps easy. As of 2017 it's the only e2e testing framework with native support for Electron.

It's a wrapper around WebdriverIO which their API's is almost the same, except the additional Electron parts.

112 questions
1
vote
0 answers

Testing Visual Studio Code Extension with Spectron - How to determine when VSCode is ready?

Goal: Perfom real end-to-end tests for a VSCode extension using Spectron. As an example I installed the vim extension. I adapted the usage example from Spectron's README like this: var Application = require('spectron').Application var assert =…
René Scheibe
  • 1,970
  • 2
  • 14
  • 20
0
votes
0 answers

Spectron testing of main file not calling done() after timeout error

So I set the main.test file as the sample one provided on npm spectron site but can't get it working. A new window is launched but Promise doesn't resolve. Working with electron 13, spectron 15. const { Application } =…
0
votes
1 answer

Spectron app.start() isn't launching the app

I'm relatively new to Spectron and Jest and I can't figure out why the app isn't launching when I call app.start() in my unit test. Right now when I run npm test, the app won't start, eventually times out (even after 30 seconds) and always sends…
0
votes
1 answer

Is it possible to run Selenium like tests in a Windows Docker Container

we have a Windows Electron application that runs e2e Tests via Spectron. The application is platform-dependent and won't run on Linux (Containers). We want to run our Spectron e2e Tests inside a preconfigured Docker container to have them…
Tom
  • 3,807
  • 4
  • 33
  • 58
0
votes
1 answer

Electron app not completely visible on test execution server

I have been having some issues with executing my cucumber scenarios successfully because, for some unknown reason, the electron app we are testing isn't completely shown (table with 1 missing column on the right). For some reason, this only happens…
tomvda
  • 433
  • 1
  • 5
  • 17
0
votes
0 answers

Due to security restrictions: browserWindow is undefined, is there any alternatives

I have current app app = new Application({ path: electronPath, chromeDriverArgs: ['remote-debugging-port=' + Math.floor(Math.random() * (9999 - 9000) + 9000)], args: [this.jsDir, '--env=e2e',…
FarFarAway
  • 1,017
  • 3
  • 14
  • 35
0
votes
0 answers

Use spectron with Java and selenium for Electron app

My browser-based application has recently switched over to an electron app and now the tests obviously don't seem to work, they can't pick up the windows and the elements correctly. I've read that Spectron is used to test electron apps but is it…
FearghalQA
  • 255
  • 1
  • 2
  • 11
0
votes
1 answer

Running tests with mocha results in memory leak and large string structures

I am trying to set up an environment for detecting memory leaks in my application. App setup: Angular + Electron Simulating app use with: Mocha + Spectron + Webdriverio I have tests for different user scenarios that I run on freshly setup app and…
0
votes
1 answer

Is there a way to reuse a specific test case ( it block ) from a describe block in mocha framework ( using javascript )

I m fairly new to mocha framework , I would like to know if we can reuse a test case from a particular describe block. For example //Test.js describe("Reuse code here" , function(){ it("Want to reuse this test case " , function () { //do some…
Monica Raj
  • 33
  • 3
0
votes
1 answer

how to add 'global wait' to mocha test

I'm trying to test my electron app with spectron and mocha;my application will close the first window after user login,so i need add some "wait action" to wait the second window to appear. But it seems setTimeout's callback works abnormal.
1500mph
  • 11
  • 1
0
votes
1 answer

How can I `await` closing of window in Spectron?

I'm working on Electron application that handles some logic in modal windows. Those windows are waiting for async actions to resolve and then self-close. Now I am struggling to test this behaviour using Spectron and Jest: seems that there are no…
Elagin Vladislav
  • 139
  • 2
  • 10
0
votes
1 answer

Spectron available methods doesn't work properly

I'm using spectron on webdriverIO and try to avoid client.pause() method to wait and used client.waitForExist, waitForWindowLoading, waitUnitlText but the application closes very quick and I don't want to pass the implicit wait can someone guide me…
0
votes
1 answer

Use Spectron or selenium test electron based application, start Electron from cmd need pass parameter, how to pass parameters?

I have electron based application need to automate, but start exe need to pass parameter, how to pass parameters when use spectron or selenium to do the automation? Here is the cmd to start Electron: Electron.exe --manifest …
0
votes
1 answer

Spectron: how to test Electron `shell.openExternal('some url')`

I'm writing and E2E test for an application written in Electron. I need to test a button which calls in effect shell.openExternal('link') where link is an external website. I've been looking in the webdriver docs for something which allows the test…
Doug Barbieri
  • 635
  • 1
  • 5
  • 16
0
votes
2 answers

Click function in Spectron doesn't click

I'm working on a electron(-nuxt) based application. End to End test re-written with AVA + Spectron. The .click() function however doesnt seem to work. I used this template: https://github.com/michalzaq12/electron-nuxt Everything seems to work except…
KingRazer
  • 3
  • 3