playwright

Automate browser interactions from the terminal to navigate pages, fill forms, and capture screenshots.

Updated May 26, 2026
One-click install
npx skills add https://github.com/XWIlluDelu/agent-share --skill playwright-xwilludelu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/XWIlluDelu/agent-share/tree/main/lib/playwright
Command: npx skills add https://github.com/XWIlluDelu/agent-share --skill playwright-xwilludelu

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

It eliminates the slow, error-prone process of manually operating a web UI to navigate pages, fill forms, debug element interactions, and capture screenshots or traces.

Core Features & Use Cases

  • Terminal-driven real browser automation: Open pages, click, type, fill forms, navigate, and extract UI data without switching to a visual browser workflow.
  • Snapshot-first stable element referencing: Capture a snapshot to obtain stable element refs, then re-snapshot after navigation or DOM changes to avoid stale references.
  • Debugging and artifact capture: Record headed runs, start/stop tracing, and generate screenshots/PDF outputs to support investigation and reliable replay.
  • Use cases: Automate UI verification for a checkout or signup flow, reproduce a UI bug and capture artifacts, and extract data from dynamic pages for analysis.

Quick Start

Open a page, create a snapshot for stable element refs, and then interact by using ref IDs, for example: export PLAYWRIGHT_SKILL_DIR=./.agent/skills/playwright and run the command to open the target URL in headed mode so you can confirm what happens visually.

Frequently Asked Questions about playwright

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

FAQPage Schema
How do I automate browser flows from the terminal without stale element errors?

To automate browser flows from the terminal, use a snapshot-then-interact workflow. You capture a snapshot to obtain stable element refs, interact using those refs, and re-snapshot after DOM changes to maintain ref stability and avoid errors.

Can I capture screenshots and PDFs during UI testing using a terminal CLI?

Yes, you can capture screenshots and PDFs during UI testing using a terminal CLI. The automation script supports recording headed runs, starting and stopping traces, and generating screenshot or PDF outputs to support investigation and reliable replay.

Do I need npx and node installed to run Playwright browser automation scripts?

Yes, you need npx and node installed to run Playwright browser automation scripts. The workflow uses a wrapper script executed via npx --package @playwright/cli playwright-cli, requiring prerequisite checks for npx availability before automating web interaction.

What is the best way to debug a UI bug and capture artifacts from a dynamic web page?

The best way to debug a UI bug and capture artifacts is using terminal-driven real browser automation. You can reproduce the bug, navigate dynamic pages, extract UI data, and record screenshots, PDFs, and traces for reliable replay without manual operation.

Why do element references become stale during web scraping and how do I fix it?

Element references become stale during web scraping because the DOM changes after navigation or dynamic updates. You fix it by re-snapshotting the page to obtain new stable element refs before continuing interaction, ensuring your automation workflow remains stable.

Does terminal browser automation work for filling forms and navigating checkout flows?

Yes, terminal browser automation works for filling forms and navigating checkout flows. You can open pages, click, type, fill forms, and navigate to automate UI verification for signup or checkout processes directly from your command line interface.