power_settings_new

how to mouse over element

by
asked
0 votes
87 views
I have an element where I have to perform Mouse over. How do I achive this?

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.

1 Answer

answered by
0 votes
 
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();
       
    }
add
...