playwright-cli

Automate browser interactions and Playwright test workflows via command-line commands.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/CatalinPoata/SistemPortalDMS --skill playwright-cli-catalinpoata
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/CatalinPoata/SistemPortalDMS/tree/main/API-DMS-TESTS/bin/Debug/net9.0/.playwright/package/lib/tools/skills/playwright-cli
Command: npx skills add https://github.com/CatalinPoata/SistemPortalDMS --skill playwright-cli-catalinpoata

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually driving a browser to test web pages, debug failing Playwright tests, or capture page state is slow and error-prone. This Skill lets you control a real browser through simple CLI commands, with every action automatically generating the equivalent Playwright TypeScript code. ## Core Features & Use Cases - Browser Automation: Open pages, click, fill forms, navigate tabs, and manage cookies, localStorage, and session state using snapshot element refs. - Test Authoring and Healing: Plan, generate, and heal Playwright tests by attaching to debug sessions and converting interactive actions into test code with assertions. - Debugging and Evidence Capture: Record traces, videos with chapter overlays, screenshots, console logs, and network requests, plus mock or block network traffic. - Use Case: A failing Playwright test can be rerun with --debug=cli, attached to via playwright-cli, inspected live with snapshots and console output, and fixed using the generated locator code. ## Quick Start Ask the AI to open a website with playwright-cli, take a snapshot, and click a specific element on the page.

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?▼

Run playwright-cli open to launch a browser, then use snapshot to get element refs and commands like click, fill, and type to interact. Each action prints the equivalent Playwright TypeScript code you can reuse in tests.

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

Run the test with npx playwright test --debug=cli in the background, then attach using playwright-cli attach with the printed session name. Explore the paused page with snapshot, console, and requests commands to diagnose the failure.

Which browsers does playwright-cli support?▼

playwright-cli supports Chromium, Firefox, and WebKit via the --browser flag, plus Chrome and Edge channels. It can also attach to running Chrome or Edge instances over CDP or through the Playwright browser extension.

Can playwright-cli mock network requests during testing?▼

Yes, the route command intercepts URL patterns to return custom status codes, bodies, or headers, and unroute removes them. For conditional logic or response modification, use run-code with page.route in Playwright code.

How do I save and reuse login state in Playwright sessions?▼

Use playwright-cli state-save to write cookies and localStorage to a JSON file after logging in, then state-load to restore it in later sessions. This skips repeated login flows across automation runs.

Why do URLs with query parameters break on Windows in playwright-cli?▼

cmd.exe and PowerShell treat & as a command separator, truncating URLs with multiple query parameters. Escape & as ^& in cmd.exe or use the --% stop-parsing token in PowerShell.