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。