title: Cannot find any elements in Selenium using Internet Explorer Driver
body: <p>I cannot get Selenium to identify any elements with Internet Explorer Driver regardless of the page used or the selection type.</p>
  
  <pre><code>String iedriver = "C:\\selenium-server\\IEDriverServer.exe";
  System.setProperty("webdriver.ie.driver", iedriver);
  WebDriver driver = new InternetExplorerDriver();
  driver.get("http://www.google.com");
  WebElement element = driver.findElement(By.xpath("//body"));
  </code></pre>
  
  <p>Selecting by xpath gives  <strong>org.openqa.selenium.InvalidSelectorException:</strong> The xpath expression '//body' cannot be evaluated or does notresult in a WebElement. Other selection types also fail:</p>
  
  <pre><code>WebElement element = driver.findElement(By.cssSelector("body"));
  </code></pre>
  
  <p>or</p>
  
  <pre><code>WebElement element = driver.findElement(By.tagName("body"));
  </code></pre>
  
  <p>or </p>
  
  <pre><code> WebElement element = driver.findElement(By.name("q"));
  </code></pre>
  
  <p>By CSS Selector, Name, or Tag Name always results in  <strong>org.openqa.selenium.NoSuchElementException</strong></p>
  
  <p>All selections work perfectly fine with Firefox Driver, Chrome Driver, and even Html Unit Driver.</p>
  
  <p>The browser correctly starts and the page loads as expected.  <strong>driver.getCurrentUrl();</strong> and <strong>driver.getPageSource();</strong> return the expected values.</p>
  
  <p>I tried introducing explicit and implicit waits before selecting an element but to no effect, using </p>
  
  <pre><code>Thread.sleep(10000); 
  </code></pre>
  
  <p>or</p>
  
  <pre><code>WebDriverWait(driver,60).until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//body")));
  </code></pre>
  
  <p>Also tried stepping through the code to manually wait for elements to be displayed.</p>
  
  <p>Other things I tried included 1) setting the security settings to the same level in all zones 2)  disabling Enhanced Protected Mode 3) setting the FEATURE_BFCACHE in the registery</p>
  
  <p>I am using Selenium and IEDriverServer versions 2.41. The problem is observed running both locally and remotely. The environment is on Windows 7 64-bit using IE10 64-bit and IEDriverServer 64-bit. The same problem was observed on IE11 32-bit using IEDriverServer 32-bit. I used www.google.com here as a publicly viewable test but the problem is also observed on our internal site.  </p>