Download for macOS
Skill

playwright-cli

@microsoft Updated 2026-08-19

Automate browser interactions, test web pages and work with Playwright tests.

automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascript

Install

git clone https://github.com/microsoft/playwright /tmp/playwright && ln -s /tmp/playwright/packages/playwright-core/src/tools/skills/playwright-cli ~/.claude/skills/playwright-cli

From README

Browser Automation with playwright-cli Commands Core Navigation Keyboard Mouse Save as Tabs Storage Network DevTools Raw output The global --raw option strips page status, generated code, and snapshot sections from the output, returning only the result value. Use it to pipe command output into other tools. Commands that don't produce output return nothing. For structured output wrapping every reply as JSON, pass --json Open parameters URLs with & on Windows On Windows, cmd.exe and PowerShell treat & as a command separator, so URLs with multiple query parameters get truncated before playwright-cli runs. Escape & with ^& in cmd.exe, or use --% in PowerShell: Snapshots After each command, playwright-cli provides a snapshot of the current browser state. You can also take a snapshot on demand using playwright-cli snapshot command. All the options below can be combined as needed. Targeting elements By default, use refs from the snapshot to interact with page elements.