webapp-testing — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited webapp-testing (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
要测试本地 Web 应用,编写原生 Python Playwright 脚本。
可用辅助脚本:
scripts/with_server.py - 管理服务器生命周期(支持多个服务器)始终先用 `--help` 运行脚本以查看用法。不要读取源代码,直到你先尝试运行脚本并发现绝对需要自定义解决方案。这些脚本可能非常大,因此会污染你的上下文窗口。它们的存在是为了作为黑盒脚本直接调用,而不是被摄入到你的上下文窗口中。
用户任务 → 是静态 HTML 吗?
├─ 是 → 直接读取 HTML 文件以识别选择器
│ ├─ 成功 → 使用选择器编写 Playwright 脚本
│ └─ 失败/不完整 → 视为动态(如下)
│
└─ 否(动态 webapp) → 服务器是否已运行?
├─ 否 → 运行:python scripts/with_server.py --help
│ 然后使用辅助脚本 + 编写简化的 Playwright 脚本
│
└─ 是 → 侦察后行动:
1. 导航并等待 networkidle
2. 截图或检查 DOM
3. 从渲染状态识别选择器
4. 使用发现的选择器执行操作要启动服务器,先运行 --help,然后使用辅助脚本:
单个服务器:
python scripts/with_server.py --server "npm run dev" --port 5173 -- python your_automation.py多个服务器(例如,后端 + 前端):
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 逻辑(服务器自动管理):
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() page.screenshot(path='/tmp/inspect.png', full_page=True)
content = page.content()
page.locator('button').all()❌ 不要在动态应用上等待 networkidle 之前检查 DOM ✅ 要在检查前等待 page.wait_for_load_state('networkidle')
scripts/ 中可用的脚本之一是否有帮助。这些脚本可靠地处理常见、复杂的工作流程,而不会混乱上下文窗口。使用 --help 查看用法,然后直接调用。sync_playwright() 编写同步脚本text=、role=、CSS 选择器或 IDpage.wait_for_selector() 或 page.wait_for_timeout()element_discovery.py - 发现页面上的按钮、链接和输入static_html_automation.py - 对本地 HTML 使用 file:// URLconsole_logging.py - 在自动化期间捕获控制台日志~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.