wait_for_ui_change
Waits for in-place UI mutations or non-navigation updates to stabilize before continuing, using a snapshot revision as the synchronization point. Use for non-navigation changes, not screen navigation.
Instructions
Purpose: Wait for a non-navigation UI mutation or in-place update to become stable.
Inputs:
expected_change (optional): hierarchy_diff, text_change, or state_change
timeout_ms (optional)
stability_window_ms (optional)
scope (optional): screen or subtree
target (optional): element_id when scope=subtree
Guidance:
Prefer wait_for_screen_change for navigation transitions.
Prefer wait_for_ui_change for in-place mutations and non-navigation updates.
Use the returned snapshot_revision as the observed synchronization point when available.
Scoped waits return scope-aware stability metadata and a lightweight change summary.
Failure Handling:
TIMEOUT means the UI did not change in a stable way within the allotted time. Device-readiness blockers prevent readiness success; unknown/unsupported device signals remain explicit. Set requireReady=true to require both the existing predicate and settled UI readiness, using the same fresh samples and one timeout budget. The readiness summary explains uncertainty. Default predicate semantics are unchanged.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Synchronization scope for the wait | screen |
| target | No | Target element_id when scope is subtree | |
| deviceId | No | Optional device id/udid to target | |
| platform | No | Optional platform override (android|ios) | |
| timeout_ms | No | Timeout in ms to wait for change (default 60000) | |
| requireReady | No | ||
| expected_change | No | Optional type of UI change to wait for | |
| stability_window_ms | No | How long the change must remain stable before success (default 300) |