AGENT SKILL
playwright-web-test
使用 Playwright 对本地网页、静态 HTML 或在线页面执行自动化测试、元素发现、控制台日志采集与截图。
- License 许可
- MIT
- 最近更新
- 2026-06-10
- Stars
- ★ 3
- Forks
- 0
01 前言 Front Matter
- name
- playwright-web-test
- version
- 1.0.0
- metadata
- { "openclaw": { "requires": { "bins": [ "python3" ] }, "capability": [ "web-automation", "screenshot", "ui-testing", "dom-inspection", "console-capture" ] } }
- entrypoint
- agents/main/agent.yaml
- description
- 使用 Playwright 对本地网页、静态 HTML 或在线页面执行自动化测试、元素发现、控制台日志采集与截图。
03 SKILL.md 正文
Playwright Web Test
这是一个面向 ClawHub / OpenClaw 的网页自动化技能,适合以下场景:
- 打开网页并截图
- 自动发现按钮、链接、输入框等元素
- 采集浏览器 console 日志
- 测试本地静态 HTML 文件
- 在启动本地服务后执行自动化脚本
推荐触发方式
你可以直接对 agent 说:
- 打开
http://localhost:5173并截图 - 分析这个页面上有哪些按钮和输入框:
http://localhost:3000 - 访问
file:///tmp/demo.html,点击按钮后截图 - 采集
http://localhost:5173的 console 日志
目录说明
agents/main/agent.yaml:技能入口scripts/run_task.py:统一执行入口scripts/with_server.py:先启动服务再执行自动化examples/:示例脚本
使用建议
- 动态页面先等待
networkidle - 优先先做元素发现,再编写精确操作
- 需要启动本地服务时,优先使用
with_server.py - 截图输出会使用
MEDIA:规范,便于网关直接展示
注意事项
- 需要本地 Python 环境可用
- 首次运行前需安装 Playwright:
python3 -m pip install playwright && python3 -m playwright install chromium - 如果目标页面依赖本地服务,请确认端口可访问
04 同仓库更多 Skills
youtube-content
YouTube transcripts to summaries, threads, blogs.
★ 3
xurl
X/Twitter via xurl CLI: post, search, DM, media, v2 API.
★ 3
touchdesigner-mcp
Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.
★ 3
test-driven-development
TDD: enforce RED-GREEN-REFACTOR, tests before code.
★ 3
teams-meeting-pipeline
Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.
★ 3
systematic-debugging
4-phase root cause debugging: understand bugs before fixing.
★ 3