playwright-cli

Automate browser interactions and test web pages using Playwright CLI commands.

Updated Aug 13, 2026
One-click install
npx skills add https://github.com/crystalzhangbai/TS-Agent-Azure --skill playwright-cli-crystalzhangbai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/crystalzhangbai/TS-Agent-Azure/tree/main/bridge/naniteagent-playground/naniteagent/skills/playwright-cli
Command: npx skills add https://github.com/crystalzhangbai/TS-Agent-Azure --skill playwright-cli-crystalzhangbai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @playwright/cli, and includes references (resource) components.

What problem does it solve? Manually clicking through web pages to test flows, fill forms, or capture page state is slow and error-prone. This Skill drives a real browser through the playwright-cli command line, letting you navigate, interact with elements, manage sessions, and debug Playwright tests without writing boilerplate automation code. ## Core Features & Use Cases - Browser Automation: Open pages, click, fill, drag, hover, and snapshot page state using element refs, CSS selectors, or Playwright locators. - Session & Storage Management: Run isolated named browser sessions, save and restore cookies, localStorage, and full storage state for authenticated workflows. - Debugging & Recording: Capture traces, record annotated videos with overlays, mock network requests, and attach to paused Playwright test runs for debugging. - Use Case: Debug a failing Playwright test by running it with --debug=cli, attaching playwright-cli to the paused session, exploring the page interactively, and copying the generated TypeScript code back into the test. ## Quick Start Use the playwright-cli skill to open https://example.com in a persistent Edge browser session, take a snapshot, and click the sign-in button.

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 interactions with playwright-cli?▼

Open a browser with playwright-cli open, navigate with goto, then take a snapshot to get element refs like e5. Use commands such as click, fill, and type with those refs to interact with the page, and close when finished.

How to debug a failing Playwright test with playwright-cli?▼

Run the test with npx playwright test --debug=cli in the background and wait for the debugging instructions containing a session name. Attach with playwright-cli attach <session>, explore the page, and copy the generated TypeScript code into your test.

Can playwright-cli save and reuse login sessions?▼

Yes, playwright-cli supports saving full storage state with state-save and restoring it with state-load, preserving cookies and localStorage. You can also open browsers with --persistent to keep a profile on disk across runs.

Does playwright-cli support mocking network requests?▼

Yes, the route command intercepts URL patterns and returns custom status codes, bodies, or headers. For conditional logic or response modification, use run-code with page.route to inspect requests and fulfill them dynamically.

What should I do if playwright-cli is not installed?▼

Check availability with playwright-cli --version or npx --no-install playwright-cli --version. If missing, install it globally with npm install -g @playwright/cli@latest or locally with npm install @playwright/cli@latest, then use npx playwright-cli for local installs.