playwright-cli

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

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually testing web applications, filling repetitive forms, and extracting data from websites is slow and error-prone. This Skill drives a real browser through the playwright-cli command line, letting you navigate pages, click elements, fill forms, and capture page state 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 browser sessions, save and restore cookies/localStorage auth state, and reuse persistent profiles. - Network & Debugging Tools: Mock API responses, capture console logs and network traffic, record traces and videos, and generate Playwright TypeScript test code from your actions. - Use Case: Log into a web app once, save the authenticated state with state-save, then reuse it in later sessions to scrape dashboard data or verify UI flows without repeating the login. ## Quick Start Ask the assistant 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 get element refs like e5. Interact with commands such as click, fill, type, and press, and finish with close to stop the browser.

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 element ref and value, and click the submit button ref. A final snapshot confirms the submission result.

Can playwright-cli run multiple isolated browser sessions?

Yes, use the -s flag with a session name to run isolated browsers concurrently. Each session has independent cookies, storage, cache, and tabs, and you can manage them with list, close, and close-all.

Does playwright-cli support saving login or authentication state?

Yes, state-save writes cookies and localStorage to a JSON file after logging in. Later sessions restore it with state-load, letting you skip the login flow entirely.

How do I mock API responses during browser testing?

Use playwright-cli route with a URL pattern plus --status, --body, or --header options to intercept requests. For conditional logic or response modification, use run-code with page.route handlers.

What is the difference between tracing and video recording in Playwright?

Tracing captures DOM snapshots, network activity, console logs, and per-action timing for debugging, while video recording produces a WebM file of the session. Use traces for analysis and videos for demos or documentation.