playwright-cli

Featured

Automates browser interactions for web testing, form filling, screenshots, and data extraction using playwright-cli. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, extract information from web pages, mock network requests, manage browser sessions, or generate test code.

Testing & QA 4,438 stars 448 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Browser Automation with playwright-cli > Comprehensive CLI-driven browser automation — navigate, interact, mock, debug, record, and generate tests without writing a single script file. ## Quick Start ```bash # Install and set up playwright-cli install --skills playwright-cli install-browser # Open a browser and navigate playwright-cli open https://playwright.dev # Take a snapshot to see interactive elements (refs like e1, e2, e3...) playwright-cli snapshot # Interact using element refs from the snapshot playwright-cli click e15 playwright-cli fill e5 "search query" playwright-cli press Enter # Take a screenshot playwright-cli screenshot # Close the browser playwright-cli close ``` ## Golden Rules 1. **Always `snapshot` first** — identify element refs before interacting; never guess ref numbers 2. **Use `fill` for inputs, `click` for buttons** — `type` sends keystrokes one-by-one, `fill` replaces the entire value 3. **Named sessions for parallel work** — `-s=name` isolates cookies, storage, and tabs per session 4. **Save auth state** — `state-save auth.json` after login, `state-load auth.json` to skip login next time 5. **Trace before debugging** — `tracing-start` before the failing step, not after 6. **`run-code` for advanced scenarios** — when CLI commands aren't enough, drop into full Playwright API 7. **Clean up sessions** — `close` or `close-all` when done; `kill-all` for zombie processes 8. **Descriptive filenames** — `screenshot --filename=checkout-step3.png...

Details

Author
zebbern
Repository
zebbern/claude-code-guide
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category