ACTION_WAIT_FOR_ELEMENT
Waits for a UI element to appear or disappear by polling the active window through accessibility, returning element_found so workflows can branch on the condition.
Instructions
等元素:每 500ms 轮询,等待界面元素出现或消失(需无障碍)。输出:element_found。结果为 true 表示条件满足:wait_for=disappear 时 true 是「已消失」。只查当前活动窗口。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | text=可见文字或内容描述包含关键字(不区分大小写)、id=完整 viewId、class=类名子串(默认 text) | |
| require | No | 执行后要求为 true 的变量名(如 click_success),不满足按出错处理 | |
| on_error | No | 节点出错时:skip=跳过继续(默认),stop=停止整个工作流 | |
| selector | Yes | 关键字 / 完整 viewId(如 com.pkg:id/xxx)/ 类名(按 mode)。支持 ${var} | |
| wait_for | No | 等出现还是等消失(默认 appear) | |
| output_var | No | 结果变量名(默认 element_found) | |
| timeout_ms | No | 最长等待毫秒(默认 10000)(也认:timeout) | |
| node_timeout_ms | No | 单节点超时毫秒,0=不限;默认 30 分钟 |