Mouse Interactions

Learn how to perform mouse actions using Selenium.

Double click a control

We can double click on a control by:

Press + to interact
driver.get("file://" + __dirname + "/../../site/text_field.html");
var elem = driver.findElement(By.id("quickfill"));
driver.actions()
.doubleClick(elem)
.perform();
driver.findElement(By.id("pass")).getAttribute("value").then(function(pwd_value) {
assert.equal("ABC", pwd_value);
})

Move the mouse to a control - Mouse Over

We can pair the mouse pointer with the desired element by:

Press + to interact
var elem = driver.findElement(By.id("email"));
driver.actions()
.mouseMove(elem)
.perform();

Click and hold - select multiple items

The te ...

...