playwright-cli

Automates browser interactions, screenshots, and session management using playwright-cli commands.

111|73|Updated Mar 20, 2026
One-click install
npx skills add https://github.com/autopus-ai/autopus-adk --skill playwright-cli-autopus-ai
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/autopus-ai/autopus-adk/tree/main/.omp/skills/playwright-cli
Command: npx skills add https://github.com/autopus-ai/autopus-adk --skill playwright-cli-autopus-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Manually testing web pages, filling forms, and capturing screenshots in a browser is repetitive and hard to script. This Skill lets an AI agent drive a real browser through playwright-cli commands to navigate pages, interact with elements, and verify results. ## Core Features & Use Cases - Element Interaction via Refs: Snapshot a page to get element references (e1, e2, e3), then click, fill, drag, hover, or select using those refs. - Session & State Management: Run named persistent sessions, save and load authentication state, and manage cookies, localStorage, and sessionStorage. - DevTools & Network Control: Capture screenshots and PDFs, mock network routes, record tracing and video, and inspect console and network activity. - Use Case: Automate a login flow by opening the site, snapshotting the form, filling credentials via element refs, saving the auth state to auth.json, and reusing it in later sessions. ## Quick Start Use playwright-cli to open https://example.com, snapshot the page, fill in the login form, click submit, and take a screenshot of the result.

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

Open the page with playwright-cli open, run snapshot to get element refs like e1 and e2, then use fill with each ref and value, and click the submit button ref. Finish with a screenshot to verify the result.

playwright-cli vs agent-browser for browser automation?▼

playwright-cli supports multiple browsers (Chrome, Firefox, WebKit, Edge), explicit session management, test generation, and DevTools like tracing and video. agent-browser is Chrome-only but offers AI-optimized JSON output and automatic session persistence.

How do I save and reuse login sessions in playwright-cli?▼

After logging in, run playwright-cli state-save auth.json to store cookies and storage. Later, load it with state-load auth.json, or start a persistent named session using -s=mysession with the --persistent flag.

Can playwright-cli mock network requests during testing?▼

Yes. Use playwright-cli route with a URL pattern to intercept requests and return custom status codes or response bodies. List active routes with route-list and remove them with unroute.

Which browsers does playwright-cli support?▼

playwright-cli supports Chrome, Firefox, WebKit, and Microsoft Edge, selected with the --browser flag when opening a session. It also supports persistent profiles, custom profile paths, and connecting via a browser extension.