Skip to content

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 to require fast-runner (precise unclamped duration) — needed for momentum-sensitive UIs like UIDatePicker wheels where the agent-device daemon’s safe-normalized 60ms cap causes overshoot. Requires an open session.

NameTypeRequiredDefaultConstraintsDescription
direction`enum: updownleftright`No
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: agent-device daemon caps at ~60ms via safe-normalized timing — use exact: true to bypass.
countnumberNomin: 1, max: 50, integerRepeat swipe N times (incompatible with exact: true)
pattern`enum: one-wayping-pong`No
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()