public void doubleClick(WebDriver driver, String objectLocator) throws Exception {
try {
Actions action = new Actions(driver).doubleClick(findElement(driver, objectLocator));
action.build().perform();
APPLICATION_LOGS.info("Performed double click on " + objectLocator);
} catch (Exception e) {
APPLICATION_LOGS.error("Not Performed double click on " + objectLocator + " " + e.toString());
}
}
}
// Add all the actions into the Actions builder.
Actions builder = new Actions(driver);
builder.keyDown(Keys.CONTROL).click(one).click(three).click(five)
.keyUp(Keys.CONTROL);
// Generate the composite action.
Action compositeAction = builder.build();
// Perform the composite action.
compositeAction.perform();
// Add all the actions into the Actions builder.
Actions builder = new Actions(driver);
builder.keyDown(Keys.CONTROL).click(one).click(three).click(five)
.keyUp(Keys.CONTROL);
// Perform the action.
builder.perform();
No comments:
Post a Comment