SuperAPI AI 工具集

playwright-core

测试与质量

查看项目

更新于 10-15 23:42

技能介绍

用途:Playwright Core 是该技能包的基础,适合日常 Playwright 实现工作,也是用户需要编写、修复或审查测试时的默认路径。

主要能力与标准:优先使用 getByRole() 等面向用户的定位器,而非脆弱选择器;优先使用 web-first 断言,而非手动 sleep 或临时轮询;保持测试隔离、不依赖执行顺序;使用 baseURL、fixtures 和可复用设置,避免硬编码环境漂移;有选择地 mock 外部依赖,不要无理由掩盖被测系统;选择仍能验证真实风险的最轻量测试类型。

按需查阅的指南主题:定位器与选择器策略(locators.md、locator-strategy.md、locator-resilience.md);断言、等待与异步行为(assertions-and-waiting.md、debugging.md、flaky-tests.md);测试结构与数据(test-organization.md、test-architecture.md、fixtures-and-hooks.md、test-data-management.md);认证与浏览器状态(authentication.md、auth-flows.md);API 与网络行为(api-testing.md、network-mocking.md、when-to-mock.md、api-handler-hardening.md);UI 能力领域(forms-and-validation.md、crud-testing.md、file-upload-download.md、drag-and-drop.md、search-and-filter.md);可靠性与诊断(common-pitfalls.md、error-index.md、error-and-edge-cases.md、stability-diagnostics.md、preflight.md);特殊环境(mobile-and-responsive.md、component-testing.md、browser-apis.md、service-workers-and-pwa.md、electron-testing.md);框架配方(react.md、nextjs.md、vue.md、angular.md)。

使用方式与边界:该技能用于实现指导和调试模式。当主要问题是测试架构归属时,转向 ../pom/SKILL.md;当主要问题是流水线执行时,转向 ../ci/SKILL.md。资料未提供安装命令、收费或价格信息。