WebDriver.Mouse

Mouse driver event.

Source

Summary

button_down(session, button \\ :left)

Send a Button Down event

button_up(session, button \\ :left)

Send a Button Up event

click(session, button \\ :left)

Click a mouse button

double_click(session, button \\ :left)

Send a double click mouse event

move_to(element, offsetx \\ 0, offsety \\ 0)

Move the mouse to the specified element

Functions

button_down(session, button \\ :left)

Send a Button Down event.

Parameters:

session : The session server process to send the event to.
button: The button to press, one of :left, :middle or :right

You will get an error if you fire a button down event on a button that is already down (on some browsers).

https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/buttondown

Source
button_up(session, button \\ :left)

Send a Button Up event.

Parameters:

session : The session server process to send the event to.
button: The button to raise, one of :left, :middle or :right

You will get an error if you fire a button up event on a mouse button that has not recieved a button down event previously.

https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/buttonup

Source
click(session, button \\ :left)

Click a mouse button.

Parameters:

session : The session server process to send the click to.
button: The button to click, one of :left, :middle or :right

https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/click

Source
double_click(session, button \\ :left)

Send a double click mouse event.

Parameters:

session : The session server process to send the event to.
button: The button to double click, one of :left, :middle or :right

https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/doubleclick

Source
move_to(element, offsetx \\ 0, offsety \\ 0)

Move the mouse to the specified element.

Parameters:

element: The element to move the mouse to.
offsetx: X offset to the element coordinates
offsety: Y offset to the element coordinates

https://code.google.com/p/selenium/wiki/JsonWireProtocol#/session/:sessionId/moveto

Source