expect_element_visible
Verify that a target UI element becomes visible after an action, confirming the intended outcome with deterministic binary success or failure.
Instructions
Purpose: Deterministically verify that the intended UI outcome of an action has occurred by confirming a target element is visible.
Inputs:
selector: required selector used to resolve the target element
element_id: optional previously resolved element identifier used only as context
Output Structure:
success: true when the element is visible
selector: selector used for verification
element_id: resolved element identifier when available
element: minimal resolved element info when visible
failure_code: TIMEOUT or UNKNOWN when verification fails
retryable: true when failure_code=TIMEOUT
Recommended Usage:
Define the expected element state before executing the action
Resolve the target element or triggering control
Call an action tool such as tap_element
If needed, wait for UI availability using wait_for_*
Call expect_element_visible as the final verification step
If success=false, follow the action tool retry guidance
Verification Guidance:
Primary and authoritative verification tool for expected element appearance or visibility
Use this when the screen should stay the same but the UI should reveal or update a specific element
selector is the primary input; element_id is an optional optimization only
The tool resolves the selector internally when needed
Constraints:
Returns structured binary success/failure only
Must not rely on natural-language interpretation or reasoning
Failure Handling:
TIMEOUT → retry verification once or retry the action after re-resolving
UNKNOWN → capture a snapshot and stop
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | Optional device serial/udid | |
| platform | No | Optional platform override | |
| selector | Yes | ||
| element_id | No | Optional previously resolved element identifier. | |
| timeout_ms | No | ||
| poll_interval_ms | No |