swipe
Execute a swipe or drag gesture from one point to another on an Android device. Specify start and end coordinates in true device pixels, and set duration to control between a fling and a slow, controlled drag.
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. |