dsh-tool-app-verify
DiscoveredDSH Plugin: Browser & Electron UI Operations and Verification — Enabling Agents to Drive Applications and Assert Behaviors Like QA.
dsh-tool-app-verify
DSH 插件:Browser & Electron UI 操作与验证——让 Agent 像 QA 一样驱动应用并断言行为。
功能
Action 工具(操作应用):
app_launch— 启动浏览器或 Electron 应用app_click— 点击元素app_type— 输入文本app_navigate— 导航(goto/back/forward/reload)app_close— 关闭会话
Assert 工具(验证行为):
app_verify— 断言元素状态(存在/可见/文本/属性)app_screenshot— 截图(可保存为基线)app_screenshot_diff— 视觉回归:对比当前截图与基线,返回差异百分比和高亮图app_accessibility— 获取 accessibility tree 快照
安装
dsh plugin add dsh-tool-app-verify
配置
- id: app-verify
plugin: dsh-tool-app-verify
config:
mode: browser # browser | electron
headless: true
timeout: 30000
baselinePath: .app-verify/baselines
diffThreshold: 0.1 # pixelmatch 容差
viewport:
width: 1280
height: 720
使用示例
Browser 模式
User: 打开我们的登录页,验证登录按钮存在且可点击
Agent:
→ app_launch({ target: "http://localhost:3000/login" })
→ app_verify({ selector: "role:button[name=\"登录\"]", assertion: "visible" })
→ app_screenshot({ saveAs: "login-page" })
✓ 登录按钮存在且可见,已保存截图基线。
Electron 模式
User: 启动我们的桌面应用,检查主窗口标题
Agent:
→ app_launch({ target: "./dist/main.js", mode: "electron" })
→ app_verify({ selector: "role:heading", assertion: "text_contains", expected: "Dashboard" })
✓ 主窗口标题包含 "Dashboard"。
视觉回归测试
User: 对比当前首页和上次的基线截图
Agent:
→ app_launch({ target: "http://localhost:3000" })
→ app_screenshot_diff({ baseline: "homepage" })
结果:匹配度 97.3%,有差异区域已高亮显示。
选择器格式
| 格式 | 示例 | 说明 |
|---|---|---|
role: | role:button[name="Submit"] | Playwright role locator |
text: | text:Hello World | 文本匹配 |
testid: | testid:login-btn | data-testid 属性 |
// | //div[@class="main"] | XPath |
| 其他 | #id / .class / div > span | CSS 选择器 |
与 dsh-session-analyst 配合
- Agent 用本插件执行 UI 测试流程
- 测试完成后用
analyze_session审计会话效率 - 用
compare_sessions对比不同版本的测试表现
开发
npm install
npm test # 运行单元测试(选择器解析、图片对比)
npx playwright install chromium # 首次需安装浏览器
License
MIT
Comments
Loading…
Similar plugins
by kunjinkao-os
Android Mobile GUI Agent plugin for DeepSeek Harness with ADB control, iterative verification, approvals, and a Web mobile view
★ 11
MIT
JavaScript
Aug 20, 2026
dsh plugin --profile web add dsh-mobile-gui-agentby EChan684
把 agent 的网页验证请求路由进 DSH 窗口右侧栏的内嵌浏览器(dsh-better-sidebar),不再打开系统浏览器遮挡会话界面;自动加宽面板、只截页面区域、并在会话首轮开放工具
★ 0
MIT
JavaScript
Sep 3, 2026
dsh plugin --profile web add dsh-web-verify-panelby suzuran520yyz
DSH Web GUI 插件,用于对会话消息进行编辑、重试、高级重试和删除等功能的实现
★ 0
MIT
JavaScript
Sep 3, 2026
dsh plugin --profile web add dsh-more-message-actionsby wang-kaopu
Give coding Agents runtime evidence for debugging and verifying DSH / Cordis plugins. 让 Coding Agent 获得用于调试和验证 DSH / Cordis 插件的运行时证据。
★ 0
Apache-2.0
TypeScript
Aug 29, 2026
dsh plugin --profile web add dsh-cordis-devtoolsby sdegongzuo
DeepSeek Harness 客户端网页操作与调试插件:多会话、新窗口、多标签页调试和操作网页
★ 0
MIT
TypeScript
Oct 7, 2026
dsh plugin --profile web add dsh-webops-pluginby Hjay1101
DeepSeek Harness 插件:手机扫码遥控电脑上的 agent —— 在 dsh-remote-link 基础上增强会话持久化(dsh 重启后已配对设备保持登录)、iOS 主屏图标等
★ 0
MIT
JavaScript
Aug 23, 2026
dsh plugin --profile web add dsh-ios-control