playwright

Run Playwright CLI commands to capture screenshots and render web pages.

Updated Dec 6, 2016
One-click install
npx skills add https://github.com/majunbao/learn --skill playwright-majunbao
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: playwright
Source: https://github.com/majunbao/learn/tree/main/openai-agents-python_tags/openai-agents-python-0.14.6/examples/sandbox/tutorials/vision_website_clone/skills/playwright
Command: npx skills add https://github.com/majunbao/learn --skill playwright-majunbao

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automate browser interactions from the command line to capture, render, or test pages without needing to start a server, enabling deterministic outputs and streamlined workflows.

Core Features & Use Cases

  • Headless browser automation with Playwright CLI to capture screenshots and render pages directly from the terminal.
  • Validate layouts across viewports and environments, or generate deterministic outputs for documentation and testing.
  • Use Case: Quickly produce a screenshot of a local or remote page for quality checks or progress reporting.

Quick Start

Run the Playwright CLI to capture a page screenshot and save the output to an image file.

Frequently Asked Questions about playwright

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

FAQPage Schema
How do I capture a screenshot of a web page from the command line?

You can capture a web page screenshot from the command line by running Playwright in headless mode to launch a Chromium browser, render the target URL, and save the output directly to an image file without starting a server.

Can I validate responsive layouts across different viewports using headless browser automation?

Yes, headless browser automation allows you to validate layouts across different viewports by setting specific viewport sizes in Playwright before rendering, ensuring your page displays correctly in various environments for testing or documentation.

Do I need to start a server to render dynamic web pages for testing?

No, you do not need to start a server to render dynamic web pages. Playwright automates real-browser tasks directly from the terminal, allowing you to capture and interact with pages deterministically for testing or progress reporting.

What is the best way to generate deterministic browser output for documentation?

The best way to generate deterministic browser output for documentation is using Playwright CLI to automate real-browser tasks, capturing rendered pages or screenshots with consistent viewport sizes and headless execution directly from your terminal.

Does Playwright CLI support running in both headless and non-headless environments?

Yes, Playwright CLI supports running in both headless and non-headless environments. You can configure the browser launch settings to either run silently in the background or display the browser UI during automation and testing.

How do I install dependencies for Chromium browser automation in a CLI workflow?

To install dependencies for Chromium browser automation, you execute deterministic Playwright commands that handle installing required browser binaries and system dependencies before launching the browser to capture or interact with web pages.