start_app
Launch an Electron application for automated testing and interaction by providing the main process entry file path. Initializes the environment for subsequent automation tools.
Instructions
Launch an Electron app via Playwright. Must be called before any other driving tool. Pass the absolute path to the compiled main process entry (e.g. out/main/index.js). Wipes the screenshots directory on each fresh start. Detects the single-instance-lock failure mode and gives a helpful hint.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| main | Yes | Absolute path to the Electron main process entry file. | |
| cwd | No | Working directory for the Electron process. Defaults to the parent directory of `main`. | |
| args | No | Extra CLI args to pass to Electron, appended after `main`. | |
| screenshotsDir | No | Directory to save screenshots in. Defaults to <cwd>/.electron-driver/screenshots. Wiped on each fresh start. | |
| env | No | Extra environment variables to set for the Electron process. | |
| timeoutMs | No | Launch timeout in milliseconds. Default 30000. | |
| executablePath | No | Absolute path to the Electron binary. Usually not needed — the driver auto-resolves it from the project's node_modules. Override if auto-resolution fails (e.g. custom Electron fork, monorepo layout). |