swipe
Dispatch a swipe gesture on Android or iOS by providing start and end coordinates and duration. Optionally specify a device or platform.
Instructions
Purpose: Dispatch a swipe gesture on Android or iOS.
Inputs:
start and end coordinates
duration
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 = { x1, y1, x2, y2, duration }
success = true when the swipe was dispatched
failure_code/retryable when dispatch fails
ui_fingerprint_before/ui_fingerprint_after when available
Recommended Usage:
Determine swipe coordinates
Call swipe
If needed, wait for transition using wait_for_*
Verify with expect_screen or expect_element_visible when a deterministic outcome is expected
Verification Guidance:
Swipe outcomes are less predictable; choose the most specific verifier available for the intended effect
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 |
|---|---|---|---|
| x1 | Yes | Start X coordinate | |
| x2 | Yes | End X coordinate | |
| y1 | Yes | Start Y coordinate | |
| y2 | Yes | End Y coordinate | |
| deviceId | No | Device Serial/UDID. Defaults to connected/booted device. | |
| duration | Yes | Duration in ms | |
| platform | No | Platform to swipe on (android or ios) |