Reference
Electron
Desktop app automation with Electron.
Setup
Launch an Electron app with remote debugging enabled:
# macOS
/Applications/MyApp.app/Contents/MacOS/MyApp --remote-debugging-port=9222
# Linux
./my-app --remote-debugging-port=9222
# Windows
MyApp.exe --remote-debugging-port=9222
Connect
opensteer open --name my-electron-app --connect http://localhost:9222
Target Windows
Electron apps may have multiple windows/webviews. List and switch between them:
opensteer tabs
opensteer tab-switch --index 1
Workflow
# Connect and target
opensteer open --name my-electron-app --connect http://localhost:9222
opensteer tabs
opensteer tab-switch --index 0
# Interact
opensteer snapshot action
opensteer click --description "menu-button"
opensteer input --description "search-field" --text "query"
# Extract
opensteer snapshot extraction
opensteer extract --description "results" --schema '{"items": [{"name": "string"}]}'
# Cleanup
opensteer close
SDK Usage
const opensteer = new Opensteer({
name: 'my-electron-app',
connectUrl: 'http://localhost:9222',
})
await opensteer.launch()
const tabs = await opensteer.tabs()
await opensteer.switchTab(0)
// ... interact and extract
await opensteer.close()
Limitations
- Requires
--remote-debugging-portflag on app launch - Not supported in cloud mode
- Empty snapshots may indicate wrong tab/window — use
tabsto find the right target - Counter failures can occur if the app re-renders between snapshot and action
Multi-App Pattern
Use separate sessions for each Electron app:
opensteer open --name app-one --connect http://localhost:9222
# ... interact with app one
opensteer close
opensteer open --name app-two --connect http://localhost:9223
# ... interact with app two
opensteer close
