Skip to content

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.

NameTypeRequiredDefaultConstraintsDescription
directionenum: up | down | left | rightNoSimple directional swipe (delegates to scroll)
x1numberNoStart X coordinate (use with y1, x2, y2 for precise swipes)
y1numberNoStart Y coordinate
x2numberNoEnd X coordinate
y2numberNoEnd Y coordinate
durationMsnumberNomin: 50, max: 10000, integerSwipe 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.
countnumberNomin: 1, max: 50, integerRepeat swipe N times (incompatible with exact: true)
patternenum: one-way | ping-pongNoRepeat pattern: one-way (reset to start) or ping-pong (reverse direction). Incompatible with exact: true.
exactbooleanNoB123: 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()