swipe
Swipe from a start point to an end point on an Android device using true pixel coordinates. Scroll down by swiping from high y to low y, or reverse to scroll up; adjust duration_ms for controlled drag or fling.
Instructions
Swipe/drag from a start point to an end point. Params: x1,y1 (start) and x2,y2 (end) in true device pixels — x and y are accepted aliases for x1 and y1. To SCROLL DOWN a list, swipe from a HIGH y to a LOW y (drag the content up); reverse to scroll up. A longer duration_ms gives a slower, controlled drag; a short one flings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Alias for x1 (start X). | |
| y | No | Alias for y1 (start Y). | |
| x1 | No | Start X in true device pixels (alias: x). | |
| x2 | Yes | End X in true device pixels. | |
| y1 | No | Start Y in true device pixels (alias: y). | |
| y2 | Yes | End Y in true device pixels. | |
| serial | No | Target device serial (adb -s). Optional when exactly one device is attached. | |
| duration_ms | No | Swipe duration in ms. Default 300. |