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.
Playwright 浏览器自动化 API、网络抓取和工具。涵盖定位器策略、断言、API 测试、隐身模式、反机器人绕过、经过身份验证的会话、屏幕截图/PDF、Docker 部署、配置、调试以及 MCP 与 AI 代理的集成。防止记录错误,包括 CI 超时挂起、扩展测试失败和导航问题。 在自动化浏览器、抓取受保护网站、绕过机器人检测、生成屏幕截图/PDF、配置 Playwright 测试、排除 Playwright 错误或学习 Playwright API 模式时使用。对于 E2E 测试架构、页面对象模型、CI 分片策略或测试组织模式,请改用 e2e 测试技能。 来源:oakoss/agent-skills。