mcpField
P
playwright

playwright

github.com/full-stack-skillsTesting & quality288 installsUpdated 4w ago
Repository

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

  1. 01Playwright setup and configuration
  2. 02Locator and fixture guidance
  3. 03Browser and API test patterns
  4. 04Test execution and UI mode
  5. 05Reports, traces, and screenshots

Use cases

  1. 01Creating browser end-to-end tests
  2. 02Configuring tests for CI runs
  3. 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 playwright

After installing, type/playwrightin Claude Code to confirm it loaded.

Bundled filesagents/openai.yamlLICENSE.txt

Details

From the project README

When to use this skill

Use this skill whenever the user wants to:

  • 用 Playwright 编写或调试浏览器 E2E 测试(多浏览器、多标签、自动等待)
  • 配置项目、定位器、Fixture 与 CI 运行

How to use this skill

  1. 安装:npm init playwright;选浏览器与语言;生成示例与配置。
  2. 编写:page.goto、getByRole、click、fill、expect;自动等待与断言;多页与 API 请求。
  3. 运行:npx playwright test;headed/UI 模式;报告与 trace。

Best Practices

  • 优先用 getByRole/getByLabel;避免脆弱 xpath。
  • 用例独立、可重复;用 fixture 或 beforeEach 准备状态。
  • CI 中安装依赖与浏览器;失败时保留 trace 与截图。

Keywords

playwright, E2E, 端到端测试, 多浏览器

Comments

Markdown supported