How to mouse hover over a web element?

How to mouse hover over a web element?

Hello Michael-webb,

Actions class utility is used to hover over a web element in Selenium WebDriver

Instantiate Actions class.

Actions action = new Actions(driver);

In this scenario, we hover over search box of a website

actions.moveToElement(driver.findElement(By.id(““id of the searchbox””))).perform();