Browser tools
Give the agent hands in a real browser — navigate, click, fill and verify, with token-cheap accessibility snapshots as the primary way of seeing.
@elyracode/browser-tools is built on Playwright. It completes Elyra's verification ladder: the LSP extensions check the code, design tools check the looks, and this checks the behaviour.
Install
elyra install npm:@elyracode/browser-tools
npx playwright install chromium
The browser binaries are a one-time download. If the bundled Chromium is missing, an installed Google Chrome is used instead — and every failure names its fix rather than degrading quietly.
Tools
| Tool | Description |
|---|---|
browser_navigate |
Open a URL; returns the title, an accessibility snapshot and any console errors |
browser_snapshot |
Re-read the current page, optionally scoped to a CSS selector |
browser_interact |
click, fill, press, select, check, uncheck or hover — targeted by role and name, label, text or CSS — and returns the resulting page state |
browser_screenshot |
Element, viewport or full-page capture, with an optional viewport resize for responsive checks |
browser_run_tests |
Run npx playwright test for a spec path or --grep filter, and summarise |
browser_close |
Close the session's tab |
Commands
| Command | Description |
|---|---|
/browser <url> |
Open a URL and describe the page and its console state |
How it sees
Snapshots first, pixels second. The primary page representation is Playwright's aria snapshot — a fraction of a screenshot's token cost, and it names every interactive element precisely, which is what makes targeting reliable rather than approximate. Screenshots are for when the looks are the question.
Console errors ride along with every result, drained since the last report. A page that renders correctly and throws in the console is a page that is broken, and the agent should not have to ask.
One persistent headless tab per session. Login state and SPA state survive across tool calls, so a multi-step flow chains naturally instead of restarting from the front page each time. The tab closes with the session.
Interactions auto-wait with Playwright's semantics and a 10-second timeout, and a failure says what it was looking for.
Why use it
- Verify behaviour, not just output — the agent can assert that a form submits, a flow completes and a list updates, rather than reasoning about whether the code it wrote should work
- Catch what a screenshot cannot — console errors, a click that silently does nothing, a route that answers but renders empty
- Cheap enough to use every time — an accessibility snapshot costs a fraction of a screenshot, so verification does not have to be rationed
- Run the suite it just wrote —
browser_run_testscloses the loop between generating a Playwright spec and knowing whether it passes
Example
> Verify note capture works end to end on https://freddy.test
browser_navigate https://freddy.test
browser_interact fill label="Note" value="Buy more RAM"
browser_interact press label="Note" value="Enter"
browser_snapshot -> list now contains "Buy more RAM"
Console: clean