Reference
device_swipe
Swipe on the device screen. Use direction for simple scrolling, or x1/y1/x2/y2 for precise coordinate-based swipes (drag-to-reorder, bottom sheets). Pass exact: true for a precise unclamped gesture duration via the in-tree runner — needed for momentum-sensitive UIs like UIDatePicker wheels where a normalized/clamped duration causes overshoot. Requires an open session.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
direction | enum: up | down | left | right | No | Simple directional swipe (delegates to scroll) | ||
x1 | number | No | Start X coordinate (use with y1, x2, y2 for precise swipes) | ||
y1 | number | No | Start Y coordinate | ||
x2 | number | No | End X coordinate | ||
y2 | number | No | End Y coordinate | ||
durationMs | number | No | min: 50, max: 10000, integer | Swipe duration in ms (slower = more precise, default ~300). Note: the non-exact path may normalize/clamp very short durations — use exact: true for an unclamped duration. | |
count | number | No | min: 1, max: 50, integer | Repeat swipe N times (incompatible with exact: true) | |
pattern | enum: one-way | ping-pong | No | Repeat pattern: one-way (reset to start) or ping-pong (reverse direction). Incompatible with exact: true. | ||
exact | boolean | No | B123: REQUIRE fast-runner (no daemon fallback). Preserves user-supplied durationMs verbatim — needed for slow precise swipes on UIDatePicker wheels and similar momentum-sensitive UIs. Fails with EXACT_REQUIRES_FAST_RUNNER if fast-runner unavailable instead of silently degrading. |
device_swipe()