playwright

Automate browser navigation, interaction, and screenshots from the terminal with playwright-cli.

1|Updated Jul 16, 2026
One-click install
npx skills add https://github.com/sota411/codex-config --skill playwright-sota411
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/sota411/codex-config/tree/main/user-skills/playwright
Command: npx skills add https://github.com/sota411/codex-config --skill playwright-sota411

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Manually testing web pages and repeating browser interactions is slow and error-prone. This Skill lets you drive a real browser from the terminal using playwright-cli, so you can navigate pages, fill forms, click elements, capture screenshots, and debug UI flows without writing test files. ## Core Features & Use Cases - Terminal-based browser automation: Open pages, snapshot the DOM to get stable element refs, then click, type, fill, and press keys using those refs. - Artifact capture and debugging: Take screenshots, generate PDFs, record traces, and inspect console and network activity for UI debugging. - Session management: Isolate work with named sessions, with automatic session naming via CODEX_THREAD_ID inside Codex. - Use Case: You need to verify a login flow on a staging site. Open the page with the wrapper script, snapshot to get element refs, fill the credentials, submit the form, re-snapshot to confirm the result, and capture a screenshot as evidence. ## Quick Start Ask the AI to open a website with the Playwright wrapper script, snapshot the page, and click or fill elements using the refs from the snapshot.

Frequently Asked Questions about playwright

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate browser tasks from the terminal with Playwright?▼

Use the playwright-cli wrapper script to open a URL, run snapshot to get stable element refs, then issue commands like click, fill, type, and press against those refs. Close the session with the close command when the workflow finishes.

How do I click elements with playwright-cli?▼

Run the snapshot command first to get element refs such as e3 or e12, then pass the ref to the click command. Re-snapshot after navigation or major DOM changes because refs can go stale.

Do I need to install playwright-cli globally to use it?▼

No. The bundled wrapper script runs the CLI through npx with the @playwright/cli package, so only Node.js and npx must be available on PATH. A global npm install is optional.

Why does a Playwright element ref fail or go stale?▼

Refs become invalid after navigation, modal changes, tab switches, or significant DOM updates. Run the snapshot command again to get fresh refs and retry the interaction.

Can I run multiple isolated Playwright browser sessions?▼

Yes. Pass --session or -s with a name, or set PLAYWRIGHT_CLI_SESSION, to isolate sessions. Inside Codex the wrapper defaults the session name to CODEX_THREAD_ID, and each named session must be closed with the same selector.