Playwright
Intent
- Use for browser automation, UI flow debugging, reproducible interaction sequences, screenshots, and extraction tasks that need a real page state.
Default operating pattern
- Confirm
npxis available before relying on the wrapper script. - Open the target page first, then snapshot before interacting so element references stay grounded in the current DOM.
- Re-snapshot after navigation or major UI changes; treat stale refs as a sign to refresh context instead of guessing.
- Prefer explicit CLI actions through the wrapper script instead of jumping straight to custom code.
- Capture screenshots or other artifacts whenever the user needs evidence, not just a verbal summary.
Bundled helper
scripts/playwright_cli.shwraps@playwright/cliso the workflow can run without a global install.
Pack fit
- Included in:
automation-and-testing - Best for repeatable browser-driven QA, debugging, and data extraction loops.
Boundary
- Do not reference stale element ids without taking a fresh snapshot.
- Do not pivot to writing full Playwright test suites unless the user explicitly asks for test files.