1.

How can I use WebDriver to mouse hover over a web element?

Answer»

We can use the ACTIONS CLASS to mouse hover over a web element as shown below in the code SNIPPET:

WebElement ele = driver.findElement(By.XPATH("xpath"));//Create object 'action' of an Actions classActions action = new Actions(driver);//Mouseover on an elementaction.moveToElement(ele).perform();


Discussion

No Comment Found