playwright

Automate real browser interactions from the terminal using playwright-cli commands.

Updated Feb 4, 2026
One-click install
npx skills add https://github.com/pchemguy/AISandbox --skill playwright-pchemguy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/pchemguy/AISandbox/tree/main/docs/AgentSkills/openai/skills/skills/.curated/playwright
Command: npx skills add https://github.com/pchemguy/AISandbox --skill playwright-pchemguy

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually testing web pages, filling forms, and debugging UI flows in a browser is repetitive and hard to reproduce. This Skill lets you drive a real browser from the terminal with deterministic CLI commands, capturing snapshots, screenshots, and traces along the way. ## Core Features & Use Cases - Terminal Browser Automation: Open pages, click elements, fill forms, and navigate using stable element refs from accessibility snapshots via playwright-cli. - Debugging & Inspection: Capture screenshots, PDFs, console logs, network activity, and Playwright traces to diagnose UI issues. - Session Isolation: Run named sessions to keep parallel automation workstreams separate. - Use Case: You need to verify a checkout flow. Open the page with --headed, snapshot to get element refs, fill the form fields, submit, and capture a trace and screenshot for the bug report. ## Quick Start Ask the AI to open a website with the Playwright CLI, take a snapshot, and click through a flow while capturing a screenshot.

Frequently Asked Questions about playwright

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

FAQPage Schema
How do I automate browser actions from the command line with Playwright?▼

Use playwright-cli through the wrapper script: open a URL, run snapshot to get element refs like e3, then issue commands such as click, fill, type, and press. Re-snapshot after navigation or major DOM changes because refs can go stale.

How do I fill and submit a web form using playwright-cli?▼

Open the form page, run snapshot to identify field refs, then use fill with each ref and value, and click the submit button ref. Finish with another snapshot or screenshot to confirm the submission result.

Do I need to install Playwright globally to use playwright-cli?▼

No global install is required. The wrapper script runs the CLI via npx with the @playwright/mcp package, so only Node.js/npm providing npx must be present on the system.

Why does a playwright-cli click command fail with a missing element ref?▼

Element refs come from the most recent snapshot and become stale after navigation, modal changes, or significant DOM updates. Run snapshot again to get fresh refs and retry the command.

Can I run multiple isolated browser sessions with playwright-cli?▼

Yes, use the --session flag with a name to isolate work, or set the PLAYWRIGHT_CLI_SESSION environment variable once. Each named session maintains its own browser state.