playwright-cli

Automate browser tasks with playwright-cli commands like open, click, fill, and screenshot.

Updated Oct 15, 2024
One-click install
npx skills add https://github.com/viasnake/dotfiles --skill playwright-cli-viasnake
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright-cli
Source: https://github.com/viasnake/dotfiles/tree/main/config/opencode/skills/playwright-cli
Command: npx skills add https://github.com/viasnake/dotfiles --skill playwright-cli-viasnake

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates repetitive browser interactions, such as navigation, form input, and artifact capture, by using the local playwright-cli, reducing manual effort and human error.

Core Features & Use Cases

  • Open URLs and navigate pages, inspect page state, and reuse sessions across commands.
  • Fill forms, click elements, type text, and trigger interactions to automate end-to-end flows.
  • Capture artifacts like screenshots, PDFs, and network traces for verification and debugging.
  • Store and reuse browser context data (cookies, localStorage) to accelerate repeated tasks.

Quick Start

Open a page with playwright-cli to navigate to a site and capture a screenshot.

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 tasks like form filling and capturing screenshots?

To automate browser tasks, you use Playwright CLI to navigate pages, fill forms, and capture artifacts like screenshots. It executes deterministic steps such as open, click, fill, type, and close commands to automate end-to-end web workflows.

Can I reuse browser sessions and local storage across multiple CLI commands?

Yes, you can reuse browser sessions across multiple CLI commands. The tool stores and reuses browser context data, including cookies and localStorage, to maintain session-aware web workflows and accelerate repeated interactions.

Do I need to install the local playwright-cli before using this automation tool?

Yes, you need the local playwright-cli installed and PATH-enabled before using this tool. It invokes the local command-line interface directly to execute browser automation steps and manage page states.

What is the best way to inspect page state during headless web testing?

The best way to inspect page state during headless web testing is using Playwright CLI commands. It supports rapid end-to-end interactions across desktop and headless contexts, allowing you to trigger clicks, type text, and capture network traces for debugging.

Why does my browser automation workflow fail to capture PDF artifacts?

Browser automation workflows fail to capture PDF artifacts if the local playwright-cli is not properly PATH-enabled or the page state is not fully loaded. Ensure deterministic steps are correctly sequenced before triggering the capture command.

Does playwright-cli support rapid end-to-end interactions for desktop browsers?

Yes, playwright-cli supports rapid end-to-end interactions for desktop browsers. It is designed to handle session-aware web workflows and page state inspection across both desktop and headless contexts.