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.

123 questions
2
votes
1 answer

How to get text from alertbox in spectron-mocha-webdiverio

I am testing my electron app using spectron. I am trying to get text from alertbox but getting an error. I want to get the text from alert and if that is expected then accept it. Test : it('Check alert message', function() { return…
Jeya Kumar
  • 842
  • 1
  • 11
  • 28
2
votes
1 answer

Error: cannot find module electron while testing by mocha and spectron in electron-compile app

I try to write electron app with electron-prebuilt-compile package. I installed it follow the instructions, so in my devDependencies there is not electron package. Instead of this I have electron-prebuild-compile dependency. I have a problem with my…
Kornelia Kobiela
  • 412
  • 3
  • 14
2
votes
1 answer

Why does this Spectron code block my Electron app after the first click?

This is the first time I'm trying to create automated tests for an Electron app using Spectron. It might be my rusty knowledge of async programming but I don't know why the code below is misbehaving: it ('should allow me to create an account',…
Mark Micallef
  • 1,041
  • 2
  • 10
  • 25
2
votes
1 answer

Spectron testing producing a JScript syntax error

I'm trying to test out spectron for electron in terms of testing but as I'm going through a tutorial, I keep getting this error message whenever I run npm run test:e2e. My test file syntactically correct but im not sure why i run into an error…
Livius
  • 21
  • 1
2
votes
2 answers

How to connect to an existing Electron app using Spectron

Is it possible to connect to an existing Electron application using Spectron? I am not particularly sure on how to go about implementing this.. I'd like to be able to do something like: import { Application } from 'spectron'; import electronPath…
Sean
  • 779
  • 5
  • 17
2
votes
1 answer

Installing Spectron

I try to install Spectron, by using this command: npm install --save-dev spectron but I get this Err msg: npm ERR! Windows_NT 6.1.7601 npm ERR! argv "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\ node_modules\npm\bin\npm-cli.js"…
2
votes
1 answer

How to interact with the controls of an electron app using spectron

My project is using Electron framework. The developers have made a build and have given me an electron exe. When you open the exe it displays a login form which is the entry point of my application. The form basically has 3 controls: user name and…
2
votes
2 answers

Spectron and electron without exe files

I m trying to build an application using Electron. I need to make some unit test based on the electron env and using electron packages. This way, I m using spectron to simulate my application. On the documentation, it's written that I have to put in…
mfrachet
  • 7,764
  • 12
  • 51
  • 95
1
vote
1 answer

circleci only 1 subschema matches out of 2

i'm trying to create a circleci automated testing for my electron apps. i followed the intruction from here: https://circleci.com/blog/electron-testing/ my repo: https://github.com/dhanyn10/electron-example/tree/spectron my project folder looks like…
dhanyn10
  • 99
  • 10
1
vote
1 answer

Spectron - TypeError: app.client.getText is not a function

I want to create tests in my repo (https://github.com/DWboutin/jest-spectron-ts) all seems to work, but I can't access the Application.client API in my tests. I tried in Promises style, async/await, with Mocha and I can't make it work. This is my…
Mike Boutin
  • 5,015
  • 11
  • 34
  • 63
1
vote
0 answers

Electron Mocha and Spectron

I am using Electron to write a desktop application. I want to use Spectron and Mocha because they seem to be the biggest and most supported things out there for testing electron. I am in Windows 10. using the boiler plate project here…
1
vote
3 answers

Incorrect NODE_MODULE_VERSION when using ava

I write an Electron app that uses nodegit. For my test part I use ava in combination with Spectron to test my app. All of my tests work - including functions which use nodegit in my app. In addition to the tests described above I made also a pure…
Daniel Stephens
  • 596
  • 4
  • 14
  • 39
1
vote
0 answers

Spectron not visible html element

I am new with spectron and I spend a lot of time with simple example test. I have an electron app which has loader at the beginning, and after some time it presents simple view. I want to check if header is equal "Welcome" This is my test…
tiger
  • 87
  • 1
  • 7
1
vote
1 answer

Can I rewrite webdriver v4 test method chain to v5 (current spectron / electron testing)

I use spectron / electron testing. Spectron update change to webdriver v5. I have UI test written in v4 method chain. Can I rewrite webdriver v4 test method chain to webdriver v5(current spectron)? it("input basic test", function() { return…
1
vote
0 answers

Spectron get text data from dynamic textbox

so I have downloaded an app, which uses electron framework. I have managed to click all the needed buttons to generate some server related data. This test runs approximately 2 minutes, and within this timeframe it generates text withing the…
1 2
3
8 9