playwright-cli

Automates browser interactions for web testing, form filling, screenshots, and data extraction.

1|Updated Jul 7, 2026
One-click install
npx skills add https://github.com/seiggy/maf-copilot-studio-demo --skill playwright-cli-seiggy
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/seiggy/maf-copilot-studio-demo/tree/main/.agents/skills/playwright-cli
Command: npx skills add https://github.com/seiggy/maf-copilot-studio-demo --skill playwright-cli-seiggy

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually testing web pages, filling forms, and extracting data from websites is repetitive and error-prone. This Skill drives a real browser through the playwright-cli command line so an AI agent can navigate pages, click elements, fill forms, and capture page state without writing test scripts first. ## Core Features & Use Cases - Browser Automation: Open pages, click, type, fill forms, drag elements, and navigate using element refs from accessibility snapshots. - State & Session Management: Run multiple isolated named browser sessions, save and restore cookies/localStorage state, and manage tabs. - Network & Debugging Tools: Mock network requests, capture console logs, record traces and videos, and run arbitrary Playwright code via run-code. - Use Case: Test a login flow by opening the page, taking a snapshot to find element refs, filling the email and password fields, clicking submit, and verifying the resulting page state. ## Quick Start Use playwright-cli to open https://example.com, take a snapshot, and fill in the login form.

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 with a URL, then use playwright-cli snapshot to get element refs like e5. Interact with elements using commands such as click, fill, and type, and close the browser with playwright-cli close when finished.

How do I fill and submit a web form using Playwright?

Take a snapshot to identify form field refs, then use playwright-cli fill with the element ref and value for each field. Click the submit button ref and take another snapshot to verify the result.

Can I run multiple isolated browser sessions at once?

Yes, use the -s flag to create named sessions, for example playwright-cli -s=auth open and playwright-cli -s=public open. Each session has independent cookies, storage, cache, and tabs.

How do I mock network requests in browser automation?

Use playwright-cli route with a URL pattern and options like --status or --body to intercept requests. For conditional logic or response modification, use run-code with page.route in custom Playwright code.

What if the playwright-cli command is not found?

If the global playwright-cli binary fails, prefix commands with npx, for example npx playwright-cli open https://example.com. This runs the locally installed package without a global installation.

How do I save and reuse login state between sessions?

After logging in, run playwright-cli state-save auth.json to capture cookies and localStorage. Later, restore it with playwright-cli state-load auth.json before navigating to authenticated pages.