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
directionunknownNoSimple directional swipe (delegates to scroll)
x1unknownNoStart X coordinate (use with y1, x2, y2 for precise swipes)
y1numberNoStart Y coordinate
x2numberNoEnd X coordinate
y2numberNoEnd Y coordinate
durationMsunknownNomin: 50, max: 10000, integer
countunknownNomin: 1, max: 50, integerRepeat swipe N times (incompatible with exact: true)
patternunknownNo
exactunknownNo
device_swipe()