browser-automationlisted
Install: claude install-skill rustcircle/c101
# Browser automation (Playwright MCP)
## 1. This stack's browser
`.mcp.json` starts `@playwright/mcp@latest` with `--headless --isolated --caps=vision,pdf,devtools
--output-dir=.stack/playwright --viewport-size=1280x800`.
| Fact | Consequence |
|---|---|
| `--isolated`: in-memory profile | no cookies or logins persist; each session starts clean; closing the browser loses state |
| caps `vision`, `pdf`, `devtools` | coordinate mouse tools, `browser_pdf_save`, tracing, video available |
| `testing` cap NOT enabled | `browser_verify_*` and `browser_generate_locator` may be missing: assert with snapshot, `browser_find` or `browser_evaluate` |
| `network`, `storage` caps NOT enabled | no route mocking, no cookie/storage tools |
| output dir `.stack/playwright/` | auto-named screenshots, traces, videos land there; explicit `filename` values resolve against the workspace root, so prefix them with `.stack/playwright/` or your `out_dir` |
| `@latest` | parameter names drift between releases: element targets are `ref` in older releases, `target` in newer ones. Read the schema in your tool list and pass the ref string (e.g. `e42`) from the latest snapshot |
## 2. Core loop: snapshot, act, verify
1. `browser_navigate {url}`.
2. `browser_snapshot` returns the accessibility tree:
```
- heading "Pricing" [level=1] [ref=e12]
- button "Monthly" [pressed] [ref=e15]
- link "Contact sales" [ref=e31] [cursor=pointer]:
- /url: /contact
```
3. Pick the element by role and a