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.
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Constraints | Description |
|---|---|---|---|---|---|
direction | `enum: up | down | left | right` | No |
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: agent-device daemon caps at ~60ms via safe-normalized timing — use exact: true to bypass. | |
count | number | No | min: 1, max: 50, integer | Repeat swipe N times (incompatible with exact: true) | |
pattern | `enum: one-way | ping-pong` | No | ||
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()