Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
196 views
in Selenium by
retagged by
I have an element where I have to perform Mouse over. How do I achive this?

1 Answer

0 like 0 dislike
by
 
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();
       
    }


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

...