IE7 - NoSuchElementException with Selenium IE7 - NoSuchElementException with Selenium selenium selenium

IE7 - NoSuchElementException with Selenium


Ok - per the comments, you specified that you weren't running against the hub, yet, in your code - you point to a hub. I think it has something to do with this.

Change this block of code:

try {    driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), capabilities);} catch (MalformedURLException e) {    // TODO Auto-generated catch block    e.printStackTrace();}

to:

driver = new IEDriver(capabilities);

RemoteWebDriver(new URL("http://localhost:4444/wd/hub") this piece here is pointing your test to some remote driver, which means "a selenium node that is connected to a hub." You've already confirmed that this you are not using a hub, so this answer should solve your issue.

A breakdown:

RemoteWebDriver() = Selenium Node that is connected to a hubChromeDriver|IEDriver|FirefoxDriver = Local browser session


For IE 7 selenium server version 2.20 or below should given a try. Recently we face similar issue where few commands were working in IE 10 but not working in IE 8. When we downgrade upto selenium 2.20 (tried one by one) and it worked fine for IE 8 with 2.20. If you are using hub then make sure node running selenium server has older vesion (<2.20) of selenium running.