name: desktop-inspect description: 检查窗口 UI 元素树结构,用于调试和了解界面布局。当您需要调试 UI 自动化问题、了解应用程序结构或查找正确的元素标识符时使用。 system: true handler: desktop tool-name: desktop_inspect category: 桌面
桌面检查
检查窗口的 UI 元素树结构(用于调试和了解界面结构)。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| window_title | string | 否 | 窗口标题,不填则检查当前活动窗口 |
| depth | integer | 否 | 元素树遍历深度,默认 2 |
使用案例
- 调试 UI 自动化问题
- 了解应用程序界面结构
- 查找正确的元素标识符用于点击/输入
示例
检查当前窗口:
{}
检查记事本,深度 3:
{"window_title": "记事本", "depth": 3}
返回
- 元素名称
- 元素类型
- 元素 ID
- 元素位置
- 子元素列表
相关技能
desktop-find-element: 查找特定元素desktop-window: 窗口管理