@elyracode/browser-tools
v0.9.30
Published
Browser automation for Elyra via Playwright - the agent navigates, clicks, fills, and verifies behavior, with token-cheap accessibility snapshots and screenshots
Downloads
222
Maintainers
Readme
@elyracode/browser-tools
Browser automation for Elyra, built on Playwright. The agent gets hands in a real browser: navigate, click, fill, verify — with token-cheap accessibility snapshots as the primary way of seeing, and pixel screenshots when looks matter.
This completes Elyra's verification ladder: LSP auto-diagnostics check the code, design-tools check the looks, browser-tools check the behavior.
Install
elyra install npm:@elyracode/browser-tools
npx playwright install chromium # browser binaries (once)If the bundled Chromium is missing, installed Google Chrome is used as a fallback. Every failure names its fix — nothing degrades silently.
Tools
| Tool | Description |
|------|-------------|
| browser_navigate | Open a URL; returns title, accessibility snapshot, and console errors |
| browser_snapshot | Re-read the current page (optionally scoped to a css selector) |
| browser_interact | click / fill / press / select / check / uncheck / hover, targeted by role+name, label, text, or css; returns the resulting page state |
| browser_screenshot | Element, viewport, or full-page screenshot; optional viewport resize for responsive checks |
| browser_run_tests | Run npx playwright test (a spec path or --grep filter) and summarize |
| browser_close | Close the session's tab |
One persistent headless tab per session: login state and SPA state survive across tool calls, so flows chain naturally. The tab closes with the session.
Commands
| Command | Description |
|---------|-------------|
| /browser <url> | Open a URL and describe the page + console state |
Design notes
- Snapshot-first: accessibility snapshots (Playwright's aria snapshot) are the primary page representation — a fraction of a screenshot's token cost, and they name every interactive element precisely for targeting.
- Console errors ride along with every result, drained since the last report.
- Screenshots respect provider limits: oversized captures are downscaled by Elyra core before reaching the model.
- Interactions auto-wait (Playwright semantics) with a 10s timeout and actionable failure messages.
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