pywinauto_recorder.player.drag_and_drop
- pywinauto_recorder.player.drag_and_drop(element_path1, element_path2, duration=None, mode=MoveMode.linear, button=ButtonLocation.left, timeout=None)[source]
Drags and drops from element_path1 to element_path2.
- Parameters
element_path1 (
Union
[str
,UIAWrapper
,NewType()
(UI_Coordinates
, (float
,float
))]) – source element pathelement_path2 (
Union
[str
,UIAWrapper
,NewType()
(UI_Coordinates
, (float
,float
))]) – destination element pathduration (
Optional
[float
]) – duration in seconds of the mouse move (it doesn’t take into account the time it takes to find) (if duration is -1 the mouse cursor doesn’t move, it just sends WM_CLICK window message, useful for minimized or non-active window).mode (
Enum
) – move mouse mode: MoveMode.linear, MoveMode.x_first, MoveMode.y_firstbutton (
ButtonLocation
) – mouse button: ButtonLocation.left, ButtonLocation.middl, ButtonLocation.righttimeout (
Optional
[float
]) – period of time in seconds that will be allowed to find the element
- Return type
UIAWrapper
- Returns
Pywinauto wrapper found with element_path2
- Raises
FailedSearch – if the element is not found