title: Selenium: Select a div Element using java
body: <p>I have to select "Module Name" in the below code using selenium can anybody help me?</p>
  
  <pre><code>&lt;iframe width="142" height="225" frameborder="0"
          disabled="true" src="blank.htm" scrolling="no"&gt;
     &lt;div style="position: absolute; visibility: inherit; overflow: hidden; cursor: default; color: rgb(0, 86, 143); background-color: rgb(237, 238, 240); text-align: left; width: 139px; height: 14px; padding-left: 1px; padding-top: 1px; left: 1px; top: 1px;"&gt;
         Module Name
     &lt;/div&gt;
  </code></pre>
  
  <p>I tried like this:</p>
  
  <pre><code>driver.findElement(By.tagName("div"))
      .findElement(By.xpath("/html/body/div[20]/div[2]"))
      .click();
  </code></pre>
  
  <p>Thanks for all, for ur valuable suggestions.But, Still not able to click.Is there any compatibility or Installation issues can effect this??
     Please see the output to understand the issue better.</p>
  
  <p>Getting Output like this :</p>
  
  <pre><code>Started InternetExplorerDriver server (32-bit) 
  2.44.0.0 
  Listening on port 41280 
  log4j:WARN No appenders could be found for logger (org.apache.http.client.protocol.RequestAddCookies).
  log4j:WARN Please initialize the log4j system properly.
  Latest
  Exception in thread "main" org.openqa.selenium.NoSuchElementException: Unable to find element with xpath == /html/body/div[8]/div[1] (WARNING: The server did not provide any stacktrace information)
  </code></pre>