Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

how to mouse over element

Solved 1 Answers 80 Views Selenium
0 1
I have an element where I have to perform Mouse over. How do I achive this?

1 Answer

Best answer

Try using function given below.


     * Function to hover over the designated element
     * @param driver
     *            -WebDriver currently in use by script
     * @param by
     *            -By identifying the element to hover over
    protected static void hoverOverElement(WebDriver driver, By by) {
       new Actions(driver).moveToElement(driver.findElement(by)).perform();
answered by

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.