playwright-browser

Light-Brands's avatarfrom Light-Brands

Use when automating browsers, testing pages, or taking screenshots

0stars🔀0forks📁View on GitHub🕐Updated Jan 10, 2026

When & Why to Use This Skill

This Claude skill leverages Playwright to provide robust browser automation and web testing capabilities. It enables seamless interaction with web pages, including automated form filling, UI verification, and high-quality screenshot capture. Designed for developers and QA professionals, it supports headless execution, responsive design testing, and complex multi-step web workflows to streamline web-based tasks.

Use Cases

  • Automated End-to-End Testing: Execute and validate complex user journeys such as login, checkout, and registration flows to ensure site reliability.
  • UI/UX Audits and Screenshots: Capture visual snapshots of web pages across different viewports to verify responsive design and document UI states.
  • Web Interaction Automation: Automate repetitive tasks like filling out long forms, navigating paginated content, or interacting with dynamic JavaScript elements.
  • Cross-Browser Compatibility Checks: Test website behavior and rendering across Chromium, Firefox, and WebKit engines to ensure a consistent user experience.
nameplaywright-browser
description"Use when automating browsers, testing pages, or taking screenshots"
version1.0.1
categorytesting
Browser automation via Playwright. Write scripts, execute via run.js. Write Playwright code to /tmp, execute from skill directory:
node $SKILL_DIR/run.js /tmp/playwright-task.js

For inline code (variables are auto-injected, see below):

node $SKILL_DIR/run.js "const b = await chromium.launch(); const p = await b.newPage(); await p.goto('http://localhost:3000'); console.log(await p.title()); await b.close();"

$SKILL_DIR is where you loaded this file from.

Default: headless (invisible, less intrusive).

Use { headless: false } when user wants to see the browser. You know when that is.

Screenshots to /tmp. Use `slowMo: 100` for debugging. For inline code, these are available:
  • BASE_URL - from PLAYWRIGHT_BASE_URL env var
  • CI_ARGS - browser args for CI (['--no-sandbox', '--disable-setuid-sandbox'])
  • EXTRA_HEADERS - from PW_HEADER_NAME/VALUE or PW_EXTRA_HEADERS
  • chromium, firefox, webkit, devices - from playwright

Example:

node $SKILL_DIR/run.js "
const browser = await chromium.launch({ args: CI_ARGS });
const page = await browser.newPage();
await page.goto(BASE_URL || 'http://localhost:3000');
console.log(await page.title());
await browser.close();
"
run.js auto-installs Playwright on first use. No manual setup needed. For network mocking, auth persistence, multi-tab, downloads, video, traces: [API_REFERENCE.md](API_REFERENCE.md)