browser_visual_snapshot
Capture screenshot, DOM snapshot, and computed CSS properties in one call. Automatically detects UI issues like invisible text, overlapping elements, and overflow.
Instructions
Three-level snapshot: capture screenshot + DOM state snapshot + CSS computed properties in one call, with automatic L1+L2 UI issue detection (invisible text, overlapping elements, large blank regions, z-index occlusion, small click targets, overflow).
中文详情:
用途:三级快照工具,一次性获取截图 + DOM 状态快照 + CSS 计算属性,并自动检测 L1+L2 级别 UI 问题
何时使用:UI 缺陷排查时需要同时查看图/结构/样式时;调试元素不可见原因时;自动化发现问题后人工定位时;回归测试前留档页面状态时
输出:{ ok: boolean, screenshotPath: string, dom: object, computedStyles: object, issues: array, viewport: { width, height }, timestamp: string }
参数:
selector (string, 可选):CSS 选择器;不传则全页
fullPage (boolean, 可选):是否全页截图,默认 true
includeMetadata (boolean, 可选):是否包含完整元数据,默认 true
detectIssues (boolean, 可选):是否自动检测 UI 问题,默认 true
viewportWidth (integer, 可选):自定义 viewport 宽度
viewportHeight (integer, 可选):自定义 viewport 高度
sessionName (string, 可选):浏览器会话名称,默认当前活跃会话
错误:selector 无匹配抛出 'element not found';浏览器未启动抛出 'Browser not launched'
示例:{"selector":".header","fullPage":false,"detectIssues":true,"viewportWidth":375,"viewportHeight":812}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fullPage | No | 是否全页截图,默认 true | |
| selector | No | 可选 CSS 选择器;不传则全页 | |
| sessionName | No | 浏览器会话名称,默认当前活跃会话 | |
| detectIssues | No | 是否自动检测 UI 问题,默认 true | |
| viewportWidth | No | 自定义 viewport 宽度 | |
| viewportHeight | No | 自定义 viewport 高度 | |
| includeMetadata | No | 是否包含完整元数据,默认 true |