playwright-cli

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

Updated Jun 2, 2026
One-click install
npx skills add https://github.com/codebytes/btt --skill playwright-cli-codebytes
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/codebytes/btt/tree/main/.agents/skills/playwright-cli
Command: npx skills add https://github.com/codebytes/btt --skill playwright-cli-codebytes

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually testing web applications, filling forms, and extracting page data is repetitive and error-prone. This Skill drives a real browser through the playwright-cli command line, letting an AI navigate pages, click elements, fill forms, and capture snapshots without writing test code first. ## Core Features & Use Cases - Browser Automation: Open pages, click elements by snapshot refs, fill forms, press keys, and manage tabs across Chrome, Firefox, WebKit, and Edge. - State & Session Management: Run isolated named sessions, save and restore cookies/localStorage auth state, and use persistent profiles. - Network & Debugging Tools: Mock API responses, capture console logs and network traffic, record traces and videos, and generate Playwright test code from interactions. - Use Case: Verify a login flow end-to-end by opening the app, filling credentials, submitting the form, saving the authenticated state to a file, and reusing it in later runs. ## Quick Start Ask the AI to open a website with playwright-cli, take a snapshot of the page, and click or fill the elements you specify.

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 snapshot to see element refs like e5, and interact with click, fill, type, and press commands. Each command returns an updated page snapshot so you can chain actions reliably.

How to fill and submit a web form using Playwright?

Open the page, take a snapshot to identify field refs, then use playwright-cli fill with each ref and value, and click the submit button ref. A final snapshot confirms the submission result.

Can playwright-cli reuse login sessions across runs?

Yes. After logging in, run playwright-cli state-save to write cookies and localStorage to a JSON file, then restore it later with state-load to skip the login flow entirely.

Does playwright-cli support mocking API responses?

Yes. The route command intercepts URL patterns and returns custom status codes, bodies, or headers, while run-code enables conditional mocking, response modification, delays, and simulated network failures.

What browsers does playwright-cli support?

The open command accepts --browser=chrome, firefox, webkit, or msedge, and can also connect through a browser extension. Sessions run in-memory by default or with a persistent profile directory.

What to do when the playwright-cli command is not found?

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