Drag and Drop#
DragAndDropGestures
#
Access pinch/zoom related gestures.
Source code in src/interaction/gesture/drag_and_drop.py
drag_and_drop(element_source, element_target, speed=1.0)
#
Perform a drag and drop action from the source element to the target element.
This function only supports initial and final elements which are both visible within the viewport.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
element_source
|
WebElement
|
The source element to begin the drag and drop gesture on. |
required |
element_target
|
WebElement
|
The target element to finish the drag and drop gesture on. |
required |
speed
|
float
|
The velocity of the drag-and-drop gesture as a percentage. For Android, this is multiplied by the device's DPI to calculate the final velocity. For iOS, this value is multiplied by the default value of 400. Defaults to 1.0 (100%). |
1.0
|
Source code in src/interaction/gesture/drag_and_drop.py
DragAndDropParameters
dataclass
#
Encapsulates the parameters needed to perform the drag and drop gestures.
Source code in src/interaction/gesture/drag_and_drop.py
speed: float
property
writable
#
Get the velocity factor for the drag and drop gesture.