
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.
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
)
A selenium_action
object.
The mouse button to press.
The 'width' of the click, a number.
The 'height' of the click, a number.
The amount of pressure to apply to the click: a number between 0 and 1.
A number between 0 and 1.
A whole number between -90 and 90.
A whole number between -90 and 90.
A whole number between 0 and 359.
A number between 0 and pi/2
.
A number between 0 and 2*pi
.
The x coordinate of the mouse movement.
The y coordinate of the mouse movement.
The duration of the mouse movement, in seconds.
The point from which x
and y
are measured. Can be a
WebElement
object, in which case x
and y
are measured from the
center of the element.
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")
)
Run the code above in your browser using DataLab