I have this menu that is Javascript Generated. I already tried to locate this menu using xpath but there is an error 'NoSuchElemetFound'. My goal here is to press the menu generated by javascript or Execute the command of the menu (like you click the menu for real).
The menu is in a div tag that is hidden.
Here is the command called by this javascript menu:
parent.navFrame.gotoURL('url');
Here are my current codes that does not work:
WebElement menu = driver.findElement(By.xpath("html/body/span/div[11]/div/div"));
WebElement parentMenu = driver.findElement(By.xpath("html/body/table/tbody/tr/td[6]/a/img"));
Actions builder = new Actions(driver);
builder.moveToElement(parentMenu).moveToElement(menu).click().build().perform();
and this
Actions builder = new Actions(driver);
((HasInputDevices) driver).getMouse();
builder.moveToElement(driver.findElement(By.xpath("html/body/table/tbody/tr/td[6]/a/img"))).build().perform();
driver.findElement(By.xpath("html/body/table/tbody/tr/td[6]/a/img")).isSelected();
Thread.sleep(1000L);
builder.moveToElement(driver.findElement(By.xpath(".//*[@id='menuItem101']"))).build().perform();
driver.findElement(By.xpath(".//*[@id='menuItem101']")).click();
Thread.sleep(1000L);
Please Help me. Thanks