Performing Mouse Hover Using selenium Webdriver

Sometimes its not really possible to perform a 'mouse hover' action, instead you need to chain all of the actions that you want to achieve in one go. So move to the element that reveals the others, then during the same chain, move to the now revealed element and click on it.

When using Action Chains you have to remember to 'do it like a user would'.
/********************************************************************
 
Actions action = new Actions(webdriver);
 
WebElement we = webdriver.findElement(By.xpath("xpath here")); 
 
action.moveToElement(we).moveToElement(webdriver.findElement(By.xpath("/expression-here"))).click().build().perform();
 
************************************************************************/ 

Comments

Popular posts from this blog

Testing Webservice with SoapUI Having Windows Authentication

Data Driven Testing Using Selenium -WebDriver in Python

How to Re-run Failed Scenarios in Cucumber