playwright-cli

Automate browser interactions and test web pages using Playwright CLI commands.

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/ComputerUni/.NetYapayZekaEntegrasyonlar --skill playwright-cli-computeruni
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/ComputerUni/.NetYapayZekaEntegrasyonlar/tree/main/NetCoreAI/NetCoreAI.Project14_WebScrapingAI/bin/Debug/net9.0/.playwright/package/lib/tools/cli-client/skill
Command: npx skills add https://github.com/ComputerUni/.NetYapayZekaEntegrasyonlar --skill playwright-cli-computeruni

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually driving a browser to test pages, fill forms, scrape content, or debug failing Playwright tests is slow and error-prone. This Skill lets you control a real browser through simple CLI commands, with automatic snapshots and generated Playwright TypeScript code for every action. ## Core Features & Use Cases - Browser Automation: Open pages, click elements, fill forms, navigate tabs, and manage cookies, localStorage, and sessionStorage via commands like playwright-cli click e5. - Test Authoring and Debugging: Run Playwright tests with --debug=cli, attach to the paused session, and rehearse fixes while every action emits copy-paste-ready TypeScript code. - Network Mocking and Diagnostics: Intercept requests with custom responses, capture console logs, network requests, traces, screenshots, and annotated video recordings. - Use Case: A failing login test needs investigation. Run the test in debug mode, attach with playwright-cli attach tw-XXXX, snapshot the page to find the renamed button, rehearse the corrected click, and paste the generated locator back into the test file. ## Quick Start Open example.com in a browser, take a snapshot of the page elements, and click the sign-in button using playwright-cli.

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 <url>` to launch a browser, then `playwright-cli snapshot` to list elements with refs like e5. Interact using commands such as `playwright-cli click e5` or `playwright-cli fill e1 "text"`, and close with `playwright-cli close`.

How to debug a failing Playwright test with playwright-cli?▼

Run the test with `PLAYWRIGHT_HTML_OPEN=never npx playwright test --debug=cli` in the background, then attach using `playwright-cli attach tw-XXXX` with the printed session name. Explore the paused page with snapshots and console commands, and copy the generated TypeScript into your test.

Can playwright-cli mock network requests?▼

Yes, use `playwright-cli route "**/api/users" --body='[{"id":1}]'` to mock responses with custom bodies, statuses, or headers. For conditional logic or response modification, use `run-code` with `page.route()` handlers.

Does playwright-cli support multiple browser sessions?▼

Yes, use the `-s=name` flag to run isolated sessions with separate cookies, storage, and tabs, for example `playwright-cli -s=auth open https://app.example.com`. List sessions with `playwright-cli list` and clean up with `close-all` or `kill-all`.

What are the limitations of playwright-cli snapshots?▼

Snapshots show the accessibility tree with element refs but omit attributes like id, class, and data-* values. Use `playwright-cli eval "el => el.id" e5` or `getAttribute` calls to inspect properties not visible in the snapshot.