In this section we will see how to control the movement of mouse i.e how to move the mouse over a particular element over the page To move the mouse earlier an interface named Mouse was being used but nowadays a Class called Action is used.
We can move our move to a particular web element like this
Actions act = new Actions(driver);
act.moveToElement(element).build().perform();
And once we are hovering over that element we can even use explicit wait to wait explicitly till another element we are want to click becomes visible
WebDriverWait w = new WebDriverWait(driver,40);
w.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(xpath)));
driver.findElement(By.xpath(xpath)).click();