playwright-automation

仓库创建 2026年3月24日最近提交 1 个月前SkillHot 收录 2 天前
▸ 精选理由

强调稳定性与可维护的测试模式,适合自动化生成代码场景

这个 Skill 做什么

提供生产级 TypeScript Playwright 测试的最佳实践、模式与禁忌清单。

用 TypeScript 做可上线的 Playwright E2E 测试,教你落地的模式:Page Object Model、fixtures、auto-wait、面向用户的 locator、并行执行与 CI/sharding。还会明确哪些做法会把套件搞成“偶尔通过、经常抖动”的坑(比如别用 waitForTimeout、别默认全用 CSS selector、少用 legacy page.click)。适合从头搭新测试框架或把现有测试稳定化时使用。

▸ 展开 SKILL.md 英文原文

Write production-grade Playwright tests in TypeScript: Page Object Model, fixtures, auto-waiting, user-facing locators, parallel execution, CI integration, sharding, and 2025-2026 feature awareness. Includes an explicit "do not" list for AI agents. Use when: "Playwright," "write E2E test," "page object," "new Playwright suite," "Playwright config." Not for: fixing one flaky test at runtime — use test-reliability. Not for: bulk regenerating selectors after a UI refactor — use selector-drift-recovery. Not for: visual baseline creation/management — use visual-testing. Not for: deep WCAG/axe audits — use accessibility-testing. Related: visual-testing, ci-cd-integration, api-testing, test-reliability, selector-drift-recovery, accessibility-testing.

开发编程PlaywrightE2ETypeScript稳定性通用
47
Stars
10
Forks
40
仓库内 Skill
+0
7 日增星
安装 / 使用
给你的 Agent 一句话(通用)
帮我安装这个 skill:https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/playwright-automation/SKILL.md
或 curl 直取 SKILL.md
curl -fsSL "https://raw.githubusercontent.com/petrkindlmann/qa-skills/main/skills/playwright-automation/SKILL.md"
SKILL.MD 节选查看完整文件 ↗
<objective>
How an expert agent writes stable, maintainable, production-grade Playwright tests in TypeScript. The failure this prevents: AI agents reflexively reach for the three patterns that produce suites which pass once and flake forever — never use `waitForTimeout`, never default to CSS selectors, and avoid the legacy `page.click()` family. This skill encodes the auto-waiting, user-facing-locator, fixture-based discipline that makes a suite survive a refactor.
</objective>

## Discovery Questions

Check `.agents/qa-project-context.md` first — if it exists, use it and skip any question answered there. Then ask only what's missing:

1. **TypeScript or JavaScript?** TypeScript is strongly 
via SKILL·HOT · 数据来自 GitHub 公开信息 · 原文版权归作者所有