appium_drag_and_drop
Perform drag-and-drop in mobile apps: long-press a source element or coordinate, drag to a target, release to reorder lists, move items, or delete.
Instructions
Perform a drag-and-drop gesture from a source location to a target location. The gesture: long press the source (default 600ms), drag to the target (default 1200ms), then release. Source and target can each be specified as either an element UUID or coordinates. Useful for reordering lists, moving items, drag-to-delete.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceX | No | Source X coordinate. Required if sourceElementUUID is not provided. | |
| sourceY | No | Source Y coordinate. Required if sourceElementUUID is not provided. | |
| targetX | No | Target X coordinate. Required if targetElementUUID is not provided. | |
| targetY | No | Target Y coordinate. Required if targetElementUUID is not provided. | |
| duration | No | Duration of the drag movement in milliseconds. Default 1200. | |
| sessionId | No | Session ID; defaults to the active session. | |
| longPressDuration | No | Duration of the long press before dragging in milliseconds. Default 600. | |
| sourceElementUUID | No | UUID of source element to drag from. Either sourceElementUUID or sourceX+sourceY must be provided. | |
| targetElementUUID | No | UUID of target element to drop on. Either targetElementUUID or targetX+targetY must be provided. |