Robot Framework libraries for testing Electron applications and VS Code extensions, built on the Browser library:
robotframework-electron(Electron) starts Electron applications. Their windows are ordinary Browser pages, and Browser's keywords work on them; the keywords for browsers and contexts are replaced by keywords for applications.robotframework-vscode(VSCode) starts isolated instances of a VS Code that you provide, with the extension under test, for end-to-end tests of VS Code extensions.
The libraries provide the technique: starting the application and handing its windows to Browser. What to click and which locators to use belongs to your tests.
Documentation: https://robotcodedev.github.io/robotframework-electron-vscode/
The libraries are in a pilot phase, at version 0.1.0, and not yet published on PyPI.
The repository is a uv workspace with both libraries in packages/, the documentation site in docs/, and planned and archived changes in openspec/. AGENTS.md describes how to set up the Browser clone. Then, from the repository root:
uv sync # install the workspace with the dev tools
npm ci && npm run prepare-tests # VS Code and Electron for the acceptance tests
uv run pytest # unit tests
uv run robotcode -r . robot # acceptance tests on the desktop, configured in robot.toml
uv run robotcode -r . -p xvfb robot # hidden on a Full HD Xvfb screen (Linux)
uv run robotcode -r . -p xephyr robot # in a separate Xephyr window (Linux)
uv run robotcode -r . -p xvfb -p electron-previous robot # against an older Electron major
uv run robotcode -r . -p xvfb -p vscode-insiders robot # against the newest VS Code Insiders-
The display profiles need Xvfb (
xvfborxorg-server-xvfb) and, forxephyr, Xephyr (xserver-xephyrorxorg-server-xephyr); with Openbox (openbox) installed, windows can be maximised there. -
The libraries download nothing.
npm ciandnpm run prepare-tests, with Node.js 22.12 or later, prepare the VS Code and Electron builds of the acceptance tests;npm run prepare-tests -- insidersadds the newest VS Code Insiders for-p vscode-insiders. Running Tests in the contribution guide shows how to use local executables instead. -
The test
Application And Web Browserneeds Chromium for Playwright in the Browser clone, and the video tests need Playwright's ffmpeg:PLAYWRIGHT_BROWSERS_PATH=0 npx playwright install chromiumthere installs both. -
To run the VS Code tests against a fork, point
VSCODE_EXECUTABLEat it, setVSCODE_VERSIONto a name instead of a version number, as the profilevscode-insidersdoes, so that the version tests only check the version's form, and leave out the tests that check VS Code's own behaviour:uv run robotcode -r . -p xvfb robot -v VSCODE_EXECUTABLE:/opt/vscodium/codium -v VSCODE_VERSION:vscodium -e vscode-only -bl "Electron & VSCode.VSCode"
Contributions are welcome. Read the Contribution Guide, the AI and Automated Contribution Policy and the Code of Conduct first, and report security problems as described in the Security Policy.