press_back
Dispatch the Android Back action to navigate to the previous screen. Optionally target a specific device. Verify the result with expect_screen.
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
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| deviceId | No | Device Serial/UDID. Defaults to connected/booted device. | |
| platform | No | Platform (currently only android supported) |