Easily test your Electron apps using ChromeDriver and WebdriverIO. For given versions of Electron you must depend on a very specific version range of Spectron. We provide a version mapping table between Spectron version and Electron version. Spectron works with any testing framework but the example provided uses mocha. By default, mocha searches for a folder with the name test ( which we created before ). For more information on how to configure mocha, please visit mocha. Spectron exports an Application class that when configured, can start and stop your Electron application. The Electron helpers provided by Spectron require accessing the core Electron APIs in the renderer processes of your application. So, either your Electron application has nodeIntegration set to true or you'll need to expose a require window global to Spectron so it can access the core Electron APIs.

Features

  • Create an npm task in your package.json file
  • Spectron uses WebdriverIO and exposes the managed client property on the created Application instances
  • Several additional commands are provided specific to Electron
  • All the commands return a Promise
  • The electron property is your gateway to accessing the full Electron API
  • Provides you access to the main process's process global

Project Samples

Project Activity

See All Activity >

License

MIT License

Follow Spectron

Spectron Web Site

Other Useful Business Software
Deliver secure remote access with OpenVPN. Icon
Deliver secure remote access with OpenVPN.

Trusted by nearly 20,000 customers worldwide, and all major cloud providers.

OpenVPN's products provide scalable, secure remote access — giving complete freedom to your employees to work outside the office while securely accessing SaaS, the internet, and company resources.
Get started — no credit card required.
Rate This Project
Login To Rate This Project

User Reviews

Be the first to post a review of Spectron!

Additional Project Details

Operating Systems

Linux, Mac, Windows

Programming Language

JavaScript

Related Categories

JavaScript Software Development Software

Registered

2022-09-28