What is it?
一个通用浏览器自动化技能,使 Claude 能够为您的特定需求编写和执行自定义 Playwright 脚本。与预构建的测试框架不同,Claude 为任何任务动态生成定制的自动化代码 - 从简单的页面测试到复杂的多步骤流程。浏览器默认可见运行,便于调试和验证。
How to use it?
该技能遵循对话式工作流程:
-
描述您的需求 - 只需告诉 Claude 您想要测试或自动化什么(例如,"测试主页"、"检查联系表单是否有效"、"验证注册流程")
-
自动检测 - 技能自动检测您机器上运行的开发服务器。如果测试外部站点,Claude 会询问 URL。
-
代码生成 - Claude 编写针对您特定请求定制的 Playwright 代码并保存到
/tmp/playwright-test-*.js -
执行 - 脚本通过处理适当模块解析的通用执行器(
run.js)执行。浏览器默认可见打开,以便您可以实时观看自动化。 -
结果 - 查看控制台输出、截图和任何捕获的数据。测试文件由您的操作系统从 /tmp 自动清理。
无需配置文件,无需预构建测试 - 只需自然语言请求,Claude 即可将其转换为可工作的自动化代码。
Key Features
- 自定义代码生成 - Claude 编写针对您确切请求定制的新 Playwright 脚本,不受模板限制
- 默认可见浏览器 - 使用 `headless: false` 实时观看自动化执行,便于调试
- 自动检测开发服务器 - 自动查找并测试您的本地开发服务器
- 零模块解析错误 - 通用执行器确保无需配置即可正确访问模块
- 渐进式 API 文档 - 简洁的 SKILL.md,仅在需要时加载完整 API 参考
- 安全的临时文件管理 - 脚本写入 /tmp 并由您的操作系统自动清理
- 适用于任何站点 - 测试本地开发服务器或外部网站
- 全面的辅助函数 - 需要时可用于常见任务的可选实用函数
Related Skills
More from Developer ToolsiOS Simulator Skill
21 production-ready scripts for iOS app testing, building, and automation with semantic UI navigation
Auto Write Tests
Automated test writing orchestration system that discovers test infrastructure, analyzes code changes, and dispatches parallel agents to write comprehensive test coverage
Auto Fix Tests
Systematic failing test repair orchestration with auto-discovery, parallel agent fixes, and full verification, emphasizing fixing tests without modifying business logic