press_back
Dispatch the Android Back action to navigate to the previous screen, then verify the resulting UI state to confirm the intended destination.
Instructions
Purpose: Dispatch the Android Back action.
Inputs:
platform/deviceId (optional)
Output Structure:
action_id, timestamp (ISO 8601), action_type
lifecycle_state: post-dispatch lifecycle state (pending_verification or failed)
source_module: runtime source of the action envelope
target.selector = { key: "back" }
success = true when the back action was dispatched
failure_code/retryable when dispatch fails
ui_fingerprint_before/ui_fingerprint_after when available
Recommended Usage:
Call press_back
If needed, wait for transition using wait_for_*
Verify with expect_screen when a known destination is expected
If verification fails, retry once or recover explicitly
Verification Guidance:
Back outcomes can vary by screen, so verify against the intended destination when possible
Follow RESOLVE → ACT → WAIT (if needed) → EXPECT
Do not use wait_for_* alone as final verification when an applicable expect_* tool exists
Failure Handling:
TIMEOUT → retry once
UNKNOWN → capture a snapshot and stop
Conditional input: optionally supply expectedState { snapshotSessionId, snapshotRevision, timeoutMs? } from a successful get_ui_tree on the same explicit platform/deviceId. A fresh normalized UI-tree check runs immediately before input, even with verification disabled. PRECONDITION_FAILED or PRECONDITION_UNAVAILABLE means no input was dispatched; inspect condition evidence and re-observe before deciding what to do next. Compact failures summarize the fresh condition evidence; use get_interaction_diagnostics with the returned diagnostics reference for the retained UI tree. This is not atomic with OS input delivery. Compact results summarize observations, condition trees, state deltas and readiness probe evidence within a byte budget. Use get_interaction_diagnostics with the returned diagnostics session_id/result_id to retrieve the original result without replaying input. Debug output is unchanged. Results include device_readiness with timestamped device blocker evidence. Android reports supported power/keyguard signals; iOS signals may be unknown or explicitly unsupported. Launch/input dispatch success does not establish app visibility or input readiness. No automatic unlock or wake is performed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | Device Serial/UDID. Defaults to connected/booted device. | |
| platform | No | Platform (currently only android supported) | |
| responseMode | No | debug | |
| expectedState | No | ||
| actionTimeoutMs | No | Dispatch budget in milliseconds, clamped to 100–30000. | |
| verificationMode | No | full | |
| verificationTimeoutMs | No | Light observation budget in milliseconds, clamped to 100–60000. |