Playwright CLI
Use this skill when terminal-driven browser automation is the fastest path.
Assumptions
- A local
playwright-cliinstallation is available. - If command names differ by version, inspect local help output before assuming an exact subcommand shape.
Operating Rules
- Snapshot or inspect the page before interacting with referenced elements.
- Prefer deterministic session naming for parallel or long-running work.
- Save and restore auth state deliberately when login is expensive.
- Capture traces before reproducing a failure, not after.
- Drop into custom code only when the built-in command surface is not enough.
Command Families
| Need | Guide |
|---|---|
| Basic browser interaction | core-commands.md |
| Request interception and mocking | request-mocking.md |
| Custom Playwright API execution | running-custom-code.md |
| Session and storage management | session-management.md, storage-and-auth.md |
| Test generation | test-generation.md |
| Tracing and debugging | tracing-and-debugging.md |
| Media capture | screenshots-and-media.md |
| Device and environment emulation | device-emulation.md |
| Multi-step workflows | advanced-workflows.md |