I am using Webdriver and trying to click on a link (Billing) which further has a dropdown(My Quotes). To locate billing and then to click on My Quotes link, I am using the below code:
String xp = "//*[@id='Primary_Navbar-Billing']/a"; // With this xpath I can search on my Firefox browser but using the same in my code gives me an error:
WebElement menu = driver.findElement(By.xpath(xp));
driver.manage().timeouts().implicitlyWait(50, TimeUnit.SECONDS);
// Initiate mouse action using Actions class
Actions builder = new Actions(driver);
// move the mouse to the earlier identified menu option
builder.moveToElement(menu).build().perform();
//identify menu option from the resulting menu display and click
driver.findElement(By.linkText("My Quotes")).click();
I am getting an error:
Exception in thread "main" org.openqa.selenium.ElementNotVisibleException: