Showing posts from February, 2013

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 =newActions(webdriver);WebElement we = webdriver.findElement(By.xpath("xpath here"));action.moveToElement(we).moveToElement(webdriver.findElement(By.xpath("/expression-here"))).click().build().perform();************************************************************************/