Styrow.dev
Question 63 of 64

How to perform double click in selenium?

Question

How to perform double click in selenium?

Answer

Double click action in Selenium web driver can be done using Actions class. Actions class is a predefined class in Selenium web driver used to perform multiple keyboard and mouse operations such as Right Click, Drag and Drop, etc.

Actions actions = new Actions(driver);

WebElement elementLocator = driver.findElement(By.id(""ID""));

actions.doubleClick(elementLocator).perform();