Legacy reference for Spectron - Electron's original ChromeDriver-based testing framework, officially deprecated 2022-02-01 at v19.0.0. Documents what Spectron was, the architectural reason it became unmaintainable, the migration path to Playwright `_electron`, and the residual support contract for projects still on Spectron. Use only when auditing a legacy suite or planning a migration off Spectron - for new work use Playwright's `_electron` API.
74
93%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Spectron was a Node.js library that drove Electron applications
through ChromeDriver + the legacy WebDriverIO API. It shipped from
the official electron-userland org and was - for several years -
the only sanctioned end-to-end driver for Electron apps.
Per the Spectron repository:
"Spectron is officially deprecated as of February 1, 2022."
The final release was v19.0.0 (published 2022-02-02), pinned to
Electron ^19.0.0 (spectronrepo). The repository is
archived read-only with 233 open issues and 31 unmerged pull
requests as of the deprecation snapshot (spectronrepo).
This skill is a pure reference. There are no "run these commands" steps because no new project should start on Spectron.
For new projects: stop here and read electron-playwright
instead.
The Spectron repository announcement itself does not enumerate reasons (spectronrepo), but the architectural context is observable from the surrounding ecosystem at the deprecation moment:
Per Electron's official tutorial, the three current recommendations are:
| Tool | Approach |
|---|---|
| Playwright | _electron.launch() returns an ElectronApp handle; expose main-process modules via electronApp.evaluate(...) |
| WebdriverIO (WDIO) | npm init wdio@latest ./ → wizard asks "Desktop Testing - of Electron Applications" |
| Selenium | WebDriver API bindings; lower-level than the above |
Playwright is the de-facto replacement most projects migrate to -
see electron-playwright for the implementation
SKILL.
For pattern-recognition during a migration audit, a Spectron test centres on a
new Application({ path }) handle with app.start() / app.stop() fixtures and
app.client.<webdriver-method> calls:
// Legacy Spectron - DO NOT use for new code
const app = new Application({ path: '/path/to/MyApp' });
before(async () => { await app.start(); });
after(async () => { if (app && app.isRunning()) await app.stop(); });
it('opens a window', async () => {
assert.strictEqual(await app.client.getWindowCount(), 1);
});The before/after Playwright _electron equivalent and the concept-by-concept
mapping (the migration shopping list) live in
references/spectron-migration.md. See
electron-playwright for the full Playwright _electron authoring, running,
and CI workflow.
If a project must remain on Spectron in the short term:
spectron: 19.0.0 (the final release per
spectronrepo) and electron: ^19.0.0. Newer
Electron versions will break.| Anti-pattern | Why it fails | Fix |
|---|---|---|
| Starting a new Electron test project on Spectron in 2026 | Archived; no Electron 20+ support | Use electron-playwright |
| "Just upgrade Electron" without migrating off Spectron | Spectron pinned to Electron 19; newer Electron breaks Spectron's ChromeDriver bridge | Migrate to Playwright _electron |
| Big-bang Spectron → Playwright migration in one PR | High risk; no fall-back if behaviour differs | File-by-file migration with both suites green |
| Patching the archived Spectron repository upstream | Repository is read-only; PRs aren't being merged (spectronrepo) | Fork; or invest the same effort into migration |
| Citing Spectron's deprecation as the only reason to migrate | Stakeholders ask "but it still works" | Cite (1) Electron-version lock, (2) no security updates, (3) no support - all in the deprecation notice (spectronrepo) |
app.electron.<…>)
doesn't have a 1:1 mapping to Playwright's
electronApp.evaluate() for every case - some tests need a
small refactor.wdio-electron-service may be a
better migration target than Playwright _electron. This SKILL
documents the Playwright path because it's the most common
successor; WDIO path is out of scope.electron-playwright.desktop-test-strategy-reference
describes the Electron-renderer + Electron-main two-surface
architecture that made ChromeDriver-only drivers like Spectron
structurally insufficient.