Electron Service
@wdio/electron-service is a 3rd party package, for more information please see GitHub | npm
WebdriverIO service for testing Electron applications
Enables cross-platform E2E testing of Electron apps via the extensive WebdriverIO ecosystem.
Spiritual successor to Spectron (RIP).
v10 highlights — the package is now scoped as
@wdio/electron-service. v10 adds class mocking (browser.electron.mock('Tray')), main- and renderer-process console log capture, deeplink testing (browser.electron.triggerDeeplink()), anelectronBuilderConfigoption for projects with multiple build configs, and amode: 'browser'option for testing the renderer in plain Chrome against a Vite dev server without an Electron binary. See the v10.0.0 release notes for the full list, or the v9 → v10 migration guide if you're upgrading.
Features
Makes testing Electron applications much easier via:
- 🚗 Auto-setup of required Chromedriver (for Electron v26 and above)
- 📦 Automatic path detection of your Electron application
- Supports Electron Forge, Electron Builder and unpackaged apps
- 🧩 Access Electron APIs within your tests
- 🕵️ Mocking of Electron APIs via a Vitest-like API
- 🔗 Deeplink/protocol handler testing support
- 📊 Console log capture from main and renderer processes
- 🖥️ Headless testing support
- Automatic Xvfb integration for Linux environments (requires WebdriverIO 9.19.1+)