Selenium with Java 25 - Actions class doubleClick() and doubleClick(WebElement onElement) explained

Опубликовано: 28 Сентябрь 2024
на канале: Ankpro Training
598
6

Actions class doubleClick() and doubleClick(WebElement onElement) explained :
Like our facebook page www.facebook.com/ankprotraining

doubleClick method in Actions class :
doubleClick()-Double clicks the mouse at the last known mouse coordinates.
doubleClick(WebElement onElement)-Double clicks the mouse on the specified element.

Possible Interview Questions on selenium actions double click method :

How to use doubleClick method in action class with and without parameter.

Code :
actions
.moveToElement(driver.findElement(By.name("dblClick")))
.doubleClick()
.build()

actions
.moveToElement(driver.findElement(By.name("dblClick")))
.build()
.perform();