Webapp Testing
使用 Playwright 与本地 Web 应用程序交互及进行测试的工具包。支持验证前端功能、调试 UI 行为、捕获浏览器截图以及查看浏览器日志。
Install
npx skills add LeastBit/Claude_skills_zh-CN --skill webapp-testinggit clone --depth 1 https://github.com/LeastBit/Claude_skills_zh-CN.git /tmp/Claude_skills_zh-CN
mkdir -p ~/.claude/skills
cp -r /tmp/Claude_skills_zh-CN/skills/webapp-testing ~/.claude/skills/webapp-testingPersonal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.
From the SKILL.md
# Web 应用程序测试
要测试本地 Web 应用程序,请编写原生的 Python Playwright 脚本。
**可用的辅助脚本**:
- `scripts/with_server.py` - 管理服务器生命周期(支持多服务器)
**务必先运行带有 `--help` 参数的脚本**以查看用法。除非您在尝试运行脚本后发现绝对需要自定义解决方案,否则不要阅读源码。这些脚本可能非常庞大,从而污染您的上下文窗口。它们旨在作为黑盒脚本直接调用,而不是摄入到您的上下文窗口中。
## 决策树:选择您的方法
```
用户任务 → 是静态 HTML 吗?
├─ 是 → 直接读取 HTML 文件以识别选择器 (selectors)
│ ├─ 成功 → 使用选择器编写 Playwright 脚本
│ └─ 失败/不完整 → 视为动态(见下文)
│
└─ 否 (动态 Web 应用) → 服务器是否已在运行?
├─ 否 → 运行:python scripts/with_server.py --help
│ 然后使用辅助工具 + 编写简化的 Playwright 脚本
│
└─ 是 → 侦察并行动:
1. 导航并等待 networkidle
2. 截图或检查 DOM
3. 从渲染状态中识别选择器 (selectors)
4. 使用发现的选择器执行操作
```
## 示例:使用 with_server.py
要启动服务器,请先运行 `--help`,然后使用该辅助工具:
**单个服务器:**
```bash
python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py
```
**多个服务器(例如,后端 + 前端):**
```bash
python scripts/with_server.py \
--server "cd backend && python server.py" --port 3000 \
--server "cd frontend && npm run dev" --port 5173 \
-- python your_automation.py
```
要创建自动化脚本,仅需包含 Playwright 逻辑(服务器由程序自动管理):
```python
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch(headless=True) # 始终以无头模式启动 chromium
page = browser.new_page()
page.goto('http://localhost:5173') # 服务器已在运行并就绪
page.wait_for_load_state('networkidle') # 关键:等待 JS 执行
# ... 您的自动化逻辑
browser.close()
```
## 侦察并行动模式Details
- Skill name
webapp-testing- Repository
- LeastBit/Claude_skills_zh-CN
- Path
skills/webapp-testing/SKILL.md- Repo updated
- 19 January 2026
FAQ
What does the Webapp Testing skill do?
使用 Playwright 与本地 Web 应用程序交互及进行测试的工具包。支持验证前端功能、调试 UI 行为、捕获浏览器截图以及查看浏览器日志。
How do I install the Webapp Testing skill?
skills CLI (Claude Code, Cursor, Codex and more): npx skills add LeastBit/Claude_skills_zh-CN --skill webapp-testing. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.
Is Webapp Testing popular?
It lives in LeastBit/Claude_skills_zh-CN, which has 617 GitHub stars and 96 forks.
Related skills
Skill Creator
617LeastBit/Claude_skills_zh-CN
创建高效技能的指南。当用户想要创建新技能(或更新现有技能)以扩展 Claude 的能力,包括专业知识、工作流程或工具集成时,应使用此技能。
Algorithmic Art
617LeastBit/Claude_skills_zh-CN
使用 p5.js 创建带有种子随机性和交互式参数探索的算法艺术。当用户请求使用代码创建艺术、生成艺术、算法艺术、流场或粒子系统时使用此技能。创作原创算法艺术,而不是复制现有艺术家的作品,以避免版权侵犯。
Brand Guidelines
617LeastBit/Claude_skills_zh-CN
将 Anthropic 官方品牌颜色和字体应用于任何可能需要 Anthropic 视觉风格的作品。适用于品牌颜色或样式指南、视觉格式化或公司设计标准的场景。
Broadband Test
757chujianyun/skills
宽带测试助手。用于用户要求测网速、测试当前宽带或网络质量时,默认不打开界面,通过本机无头浏览器或已验证接口在中科大、南京大学、测速网依次实测,聚合延迟、抖动、下载和上传速度;不用于仅解释网络术语、购买提速服务或修改网络配置。
Ab Test Setup
376mysticaltech/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," or "hypothesis." For tracking implementation, see analytics-tracking.
Vision
358kunchenguid/vision
Draft and stress-test a repository's vision - in an existing VISION.md, or otherwise as the Vision section of STRATEGY.md - then iterate with the author on an interactive review board until approved. Use on /vision or when asked to create or refine a project vision.
Browse the most popular Claude skills, all testing & qa skills, or write your own with the skills generator.