I am trying to execute below Selenium Web driver script, But I am getting org.openqa.selenium.ElementNotVisibleException: Element is not currently visible and so may n
For some browsers it happens that once mouse hover action is performed, but the menu list disappear quickly before Selenium identify the next sub menu item. In that case it is better to use perform()
action on the main menu to hold the menu list till the time Selenium identify the sub menu item and click on it.
Here
WebElement xWL = driver.findElement(By.xpath("x path text"));
Actions xAct = new Actions(driver);
Instead of this:
xAct.moveToElement(xWL).build().perform();
Below code will resolve the "element not visible" issue
xAct.moveToElement(xWL);
xAct.click();
xAct.perform();