playwright-cli

Automates browser interactions for testing web applications using playwright-cli commands.

Updated Aug 11, 2026
One-click install
npx skills add https://github.com/t-jet/pal_found_cli --skill playwright-cli-t-jet
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/t-jet/pal_found_cli/tree/main/.ept/skills/playwright/playwright-cli
Command: npx skills add https://github.com/t-jet/pal_found_cli --skill playwright-cli-t-jet

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Manually testing web applications across browsers, devices, and network conditions is slow and error-prone. This Skill lets you drive a real browser from the command line to navigate pages, fill forms, capture screenshots, mock APIs, and debug failures without writing standalone test scripts. ## Core Features & Use Cases - Snapshot-driven interaction: Take an accessibility snapshot to get element refs (e1, e2, e3), then click, fill, select, and drag elements precisely without guessing selectors. - Network mocking and debugging: Intercept API requests with route rules, simulate errors and latency, record traces, and inspect console and network activity. - State, sessions, and emulation: Save and restore auth state, run isolated named sessions in parallel, emulate devices, geolocation, locales, dark mode, and capture screenshots, PDFs, and video. - Use Case: Verify a login flow on your staging app by opening the page, snapshotting the form, filling credentials, saving the auth state for reuse, and capturing a screenshot plus trace for the bug report. ## Quick Start Ask the agent to open your local web app with playwright-cli, take a snapshot, fill in the login form, click submit, and save a screenshot of the resulting dashboard.

Frequently Asked Questions about playwright-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate browser testing with playwright-cli?

Install with playwright-cli install --skills and install-browser, then open a URL, run snapshot to get element refs, and use commands like fill, click, and screenshot to interact with the page. Always re-snapshot after page changes since refs are only valid for the current state.

How do I mock API requests in Playwright from the CLI?

Use playwright-cli route with a glob pattern and options like --status, --body, and --content-type to stub responses. For conditional logic based on request bodies or methods, use run-code with the full page.route API, and clean up with unroute when finished.

What is the difference between fill and type in playwright-cli?

fill clears the field and sets the entire value at once, making it ideal for standard form inputs. type sends keystrokes one by one, which is needed for autocomplete fields or inputs that listen for individual keydown events.

Does playwright-cli support saving login sessions?

Yes. Run state-save auth.json after logging in to persist cookies and localStorage, then state-load auth.json in later sessions to skip the login flow. Named sessions with -s=name isolate cookies and storage for parallel work.

Can playwright-cli emulate mobile devices and geolocation?

Yes. Use resize for viewport changes or a config JSON file for full device emulation including user agent, touch support, and device scale factor. Geolocation requires granting the geolocation permission before calling setGeolocation via run-code.

What are the limitations of playwright-cli PDF and network throttling?

PDF generation only works in Chromium-based browsers, not Firefox or WebKit. Network condition emulation uses CDP sessions, which are also Chromium-only, so throttling cannot be applied in Firefox or WebKit sessions.