expect_screen
Confirm navigation success by matching the current screen against a predefined fingerprint or exact screen identifier.
Instructions
Purpose: Deterministically verify that the intended navigation outcome of an action has occurred.
Inputs:
fingerprint: preferred exact-match screen fingerprint
screen: exact semantic screen identifier when a fingerprint is not available
Output Structure:
success: true when the expected screen matches the observed screen
observed_screen: current fingerprint and screen identifier
expected_screen: the expected fingerprint and/or screen identifier
confidence: 1 for an exact match, otherwise 0
Recommended Usage:
Define the expected screen before executing the action
Resolve the target element or screen state
Call an action tool such as tap_element
If needed, wait for transition using wait_for_*
Call expect_screen as the final verification step
If success=false, treat the outcome as unverified and follow the action tool retry guidance
Verification Guidance:
Primary and authoritative verification tool for navigation outcomes
Prefer fingerprint whenever you have one
Use screen only as a fallback exact match against known identifiers
Works best when the expected screen identifier is known ahead of time
If the expected screen is not already known, capture or define it before executing the action
Constraints:
Returns structured binary success/failure only
Must not rely on natural-language interpretation or reasoning
Failure Handling:
success=false means the expected screen was not reached; retry or recover using the action tool's failure strategy
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| screen | No | Expected exact screen identifier when no fingerprint is available. | |
| deviceId | No | Optional device id/udid to target | |
| platform | No | Optional platform override (android|ios) | |
| fingerprint | No | Expected screen fingerprint. Preferred verification mechanism. |