Mouse Actions
Sometimes we would be in a situation to perform some complex mouse events such as double click, right click , hover over etc. Below are some of the key mouse actions that one would come across in most of the applications.
- Click - Perform a Click. We can also perform a click based on coordinates.
- contextClick - Performs a context click/right click on an element or based on the coordinates
- doubleClick - Performs a double click on the webelement or based on the coordinates. If left empty it performs double click on the current location.
- mouseDown - Performs a mouse down action on an element or based on co-ordinates.
- mouseMove - Performs a mouse move action on an element orbased on co-ordinates.
- mouseUp - Releases the mouse usually followed by mouse down action and acts based on co-ordinates.
void click(WebElement onElement) void contextClick(WebElement onElement) void doubleClick(WebElement onElement) void mouseDown(WebElement onElement) void mouseUp(WebElement onElement) void mouseMove(WebElement toElement) void mouseMove(WebElement toElement, long xOffset, long yOffset)
No comments:
Post a Comment