playwright-web-automation
Installation
SKILL.md
Playwright 浏览器自动化
Step 0: 环境检测
npx playwright --version
- 有输出 → 继续
- 报错 → 告知用户安装:
npm install playwright && npx playwright install chromium npx能跑但脚本require('playwright')报错 → playwright 不在当前项目,执行npm install --no-save playwright- 不要自动安装浏览器内核
Step 1: 判断路径
| 场景 | 路径 | 跳转 |
|---|---|---|
| 需要操作网页(填表、点击、登录) | A: 录制式 | → Step A1 |
| 已知操作流程,无需探索 | B: 直接编写 | → Step B1 |
| 渲染图表/HTML 为图片 | B: 直接编写 | → Step B1 |
Related skills