def mouse_down(
self,
mouse_button: Literal["left", "middle", "right"] = MouseButton.Left,
mouse_location: MouseLocation = MouseLocation(),
by: Union[Literal["default", "mouse-emulation", "control-invocation"], MouseActionBy] = MouseActionBy.Default,
modifier_key: Literal["nonekey", "alt", "ctrl", "shift","win"] = ModifierKey.NoneKey,
timeout: int = 30
) -> None
Mouse key down on the target element.
Parameters:
mouse_button: MouseButton
The available values are: ‘left’, ‘right’ and ‘center’, default is ‘left’.
mouse_location: MouseLocation
MouseLocation is set to define the element position to press down mouse button. Default position is center of element.
by: MouseActionBy
Defines the method to perform pressing mouse button down.
mouse-emulation
: perform the action by simulating mouse.
control-invocation
: perform the action by invoking its UI method. It may not be supported if it is a Windows desktop element.
default
: automatically choose method per element type. For Web element, use control-invocation
; for Window element, use mouse-emulation
.
modifier_key: ModifierKey
The modifier key(“alt”, “ctrl”, “shift”, “win”) to be pressed along with the action, and default is none.
timeout: int
Timeout for the operation, the unit is second, and the default value is 30 seconds.
Returns:
None
Example:
from clicknium import clicknium as cc, locator, ui
ui(locator.chrome.bing.svg).mouse_down(mouse_button = "left")