I have an odd issue whereby I've loaded up a page in selenium webdriver using IE. My next step is to select an option (e.g.Reports) from the navigation bar at the top of the page. However, the issue when I do this is that I don't have the ability to select another option from the navigation bar. In fact when I hover over another option from the navigation bar to view the drop-downs attached to that, the browser tries to force me back to the original option.
It's an odd one....the page has loaded up fully, so that isn't the problem. Also when I load up the webpage outside of selenium, just using my IE browser locally, and repeating the steps manually, the issue does not occur. The code I'm executing is basic but I'll attach it anyway to see if it assists:
package Reports;
import org.openqa.selenium.ie.InternetExplorerDriver;
import IeDriverServer.iEServerMethods;
public class programMain {
public static void main(String[] args) {
InternetExplorerDriver iedriver = iEServerMethods.IEOpenConnectingToExistingServer();
iedriver.get("<my test url>");
public static void terminatedReportCompletedPageLoad(InternetExplorerDriver driver)
{
driver.findElement(By.linkText("Reports")).click();
}
}
}
Any help would be appreciated as I am a bit stuck!
Andy
UPDATE - 18/11/14 Here is the code I am currently using
public static void terminatedReportCompletedFocus(InternetExplorerDriver driver)
{
WebElement terminatedReportCompletedFocus = driver.findElement(By.xpath("html/body/div[1]/form/div[2]/div/ul/li[4]/ul/li[1]/ul/li[2]/a"));
Actions hoverOnReportWindow = new Actions(driver);
hoverOnReportWindow.moveToElement(terminatedReportCompletedFocus).build().perform();
terminatedReportCompletedFocus.click();
}