About playwright
A skill for setting up, writing, and running Playwright browser end-to-end tests. It covers locators, fixtures, multiple pages, CI, and debugging with reports and traces.
Key features
- 01Playwright setup and configuration
- 02Locator and fixture guidance
- 03Browser and API test patterns
- 04Test execution and UI mode
- 05Reports, traces, and screenshots
Use cases
- 01Creating browser end-to-end tests
- 02Configuring tests for CI runs
- 03Investigating failures with traces
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ full-stack-skills/ testing-skills --skill playwrightAfter installing, type/playwrightin Claude Code to confirm it loaded.
Bundled filesagents/openai.yamlLICENSE.txt
Details
From the project READMEWhen to use this skill
Use this skill whenever the user wants to:
- 用 Playwright 编写或调试浏览器 E2E 测试(多浏览器、多标签、自动等待)
- 配置项目、定位器、Fixture 与 CI 运行
How to use this skill
- 安装:npm init playwright;选浏览器与语言;生成示例与配置。
- 编写:page.goto、getByRole、click、fill、expect;自动等待与断言;多页与 API 请求。
- 运行:npx playwright test;headed/UI 模式;报告与 trace。
Best Practices
- 优先用 getByRole/getByLabel;避免脆弱 xpath。
- 用例独立、可重复;用 fixture 或 beforeEach 准备状态。
- CI 中安装依赖与浏览器;失败时保留 trace 与截图。
Keywords
playwright, E2E, 端到端测试, 多浏览器
Comments
Markdown supported