playwright

Installation
SKILL.md

Playwright

Overview

Playwright is a browser automation framework for Node.js and Python supporting Chromium, Firefox, and WebKit with a single API. It provides auto-waiting, web-first assertions, and full test isolation for reliable end-to-end testing.

When to use: Browser automation, web scraping, screenshot/PDF generation, API testing, configuring Playwright Test, troubleshooting Playwright errors, stealth mode and anti-bot bypass.

When NOT to use: Simple HTTP requests (use fetch), unit testing (use Vitest/Jest), serverless scraping at scale (consider Cloudflare Browser Rendering). For E2E test architecture (Page Object Models, CI sharding, test organization, authentication patterns), use the e2e-testing skill.

Quick Reference

Pattern API / Config Key Points
Basic test test('name', async ({ page }) => {}) Auto-wait, web-first assertions, test isolation
Locator page.getByRole() / page.locator() Prefer role/label/text selectors over CSS
Assertion expect(locator).toBeVisible() Auto-retrying, configurable timeout
API testing request fixture / apiRequestContext Send HTTP requests, validate responses
Aria snapshot expect(locator).toMatchAriaSnapshot() Validate accessibility tree structure via YAML
Related skills
Installs
199
GitHub Stars
11
First Seen
Feb 20, 2026