actions_mousedown {selenium} | R Documentation |
Press, release or move the mouse
Description
Mouse actions to be passed into actions_stream()
. actions_mousedown()
represents pressing a button on the mouse, while actions_mouseup()
represents releasing a button. actions_mousemove()
represents moving the
mouse.
Usage
actions_mousedown(
button = c("left", "right", "middle"),
width = NULL,
height = NULL,
pressure = NULL,
tangential_pressure = NULL,
tilt_x = NULL,
tilt_y = NULL,
twist = NULL,
altitude_angle = NULL,
azimuth_angle = NULL
)
actions_mouseup(
button = c("left", "right", "middle"),
width = NULL,
height = NULL,
pressure = NULL,
tangential_pressure = NULL,
tilt_x = NULL,
tilt_y = NULL,
twist = NULL,
altitude_angle = NULL,
azimuth_angle = NULL
)
actions_mousemove(
x,
y,
duration = NULL,
origin = c("viewport", "pointer"),
width = NULL,
height = NULL,
pressure = NULL,
tangential_pressure = NULL,
tilt_x = NULL,
tilt_y = NULL,
twist = NULL,
altitude_angle = NULL,
azimuth_angle = NULL
)
Arguments
button |
The mouse button to press. |
width |
The 'width' of the click, a number. |
height |
The 'height' of the click, a number. |
pressure |
The amount of pressure to apply to the click: a number between 0 and 1. |
tangential_pressure |
A number between 0 and 1. |
tilt_x |
A whole number between -90 and 90. |
tilt_y |
A whole number between -90 and 90. |
twist |
A whole number between 0 and 359. |
altitude_angle |
A number between 0 and |
azimuth_angle |
A number between 0 and |
x |
The x coordinate of the mouse movement. |
y |
The y coordinate of the mouse movement. |
duration |
The duration of the mouse movement, in seconds. |
origin |
The point from which |
Value
A selenium_action
object.
Examples
actions_stream(
actions_mousedown("left", width = 1, height = 1, pressure = 0.5),
actions_mouseup("left", width = 100, height = 50, pressure = 1),
actions_mousemove(x = 1, y = 1, duration = 1, origin = "pointer")
)