browser_traverse_menu
Auto-traverse page navigation menus by clicking each item and checking console, page, and network errors per step. Validates navigation functionality for regression testing.
Instructions
Auto-traverse page navigation menus level by level (1/2/3 tier), clicking each item while checking console errors, page errors, and network errors per step. Auto-detects standard nav containers, sidebars, and UI framework menus (Ant Design/Element UI); falls back to full-page link scan if not found.
中文详情:
用途:自动遍历页面导航菜单,逐级点击一级/二级/三级菜单项,每步检查控制台/页面/网络错误,验证功能链路是否正常
何时使用:站点功能回归测试时;页面健康检查时;新版本上线前菜单遍历验证时;UI 框架迁移后菜单稳定性测试时
输出:{ ok: boolean, totalItems: number, clickedItems: number, results: array, errors: array } — 每项含 { text, url, urlChanged, pageTitle, consoleErrors, networkErrors, success }
参数:
maxDepth (number, 可选):最大遍历深度(1=仅一级,2=含二级,3=含三级),默认 3
maxItems (number, 可选):最大点击次数,防止无限遍历,默认 30
waitMs (number, 可选):每次点击后的等待时间(毫秒),默认 500
includeSubMenus (boolean, 可选):是否自动展开并点击子菜单,默认 true
错误:未找到菜单容器时降级扫描全页面链接;遍历超时会在 results 中标记 timeout
示例:{"maxDepth":2,"maxItems":20,"waitMs":800,"includeSubMenus":true}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| waitMs | No | 每次点击后的等待时间(毫秒),默认500 | |
| maxDepth | No | 最大遍历深度(1=仅一级,2=含二级,3=含三级),默认3 | |
| maxItems | No | 最大点击次数,防止无限遍历,默认30 | |
| includeSubMenus | No | 是否自动展开并点击子菜单,默认true |