appium_drag_and_drop
Perform drag-and-drop gestures from a source to a target location. Use element UUID or coordinates to move items, reorder lists, or delete by drag in mobile app tests.
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 to target. If omitted, uses 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. |