title: How to click the exact element by finding the ID's in Selenium WebDriver?
body: <p>In my code when searching the element through <strong>ID</strong> it is clicking some other element. How can I find the exact element and need to click the same. I'm using <strong>Selenium WebDriver</strong> with <strong>java</strong>.</p>
  
  <pre><code>Log.info("Clicking on Overview and Evolution PR link");
  driver.findElement(By.id("ext-pr-backlog-evolution")).click();
  WebDriverWait wait = new WebDriverWait(driver, 10);
  wait.until(ExpectedConditions.elementToBeClickable(By.id("ext-pr-backlog-evolution")));
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/QCK8V.jpg" alt="enter image description here"></p>
  
  <p>I am trying to click the <strong>Overview &amp; Evolution</strong> tab but it is clicking the <strong>Average Time to Assign</strong> tab</p>
  
  <p>Entire HTML as follows:</p>
  
  <pre><code>&lt;li&gt;
      &lt;a id="ext-pr" class="submenu ext-pr" name="ext-pr" href="https://10.4.16.159/reports/"&gt;Problem Reports (PR)&lt;/a&gt;
      &lt;ul&gt;
          &lt;li&gt;
              &lt;a id="ext-pr-backlog-age" class=" ext-pr-backlog-age" name="ext-pr-backlog-age"    href="https://10.4.16.159/extranet_prbacklogage/reports/type/default/"&gt;Age&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-timetoassign-prs" class=" ext-timetoassign-prs" name="ext-timetoassign-prs" href="https://10.4.16.159/extranet_timetoassignprs/reports/type/default/"&gt;Average Time To Assign&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-timetodeliver-prs" class=" ext-timetodeliver-prs" name="ext-timetodeliver-prs" href="https://10.4.16.159/extranet_timetodeliverprs/reports/type/default/"&gt;Average Time To Deliver&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-timetoresolve-prs" class=" ext-timetoresolve-prs" name="ext-timetoresolve-prs" href="https://10.4.16.159/extranet_timetoresolveprs/reports/type/default/"&gt;Average Time To Resolve&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-new-prs" class=" ext-new-prs" name="ext-new-prs" href="https://10.4.16.159/extranet_newprs/reports/type/default/"&gt;New&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-open-prs" class=" ext-open-prs" name="ext-open-prs" href="https://10.4.16.159/extranet_openprs/reports/"&gt;Open&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-pr-backlog-evolution" class=" ext-pr-backlog-evolution" name="ext-pr-backlog-evolution" href="https://10.4.16.159/extranet_prbacklogevolutiontendency/reports/type/default/"&gt;Overview &amp; Evolution&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-pr-domain" class=" ext-pr-domain" name="ext-pr-domain" href="https://10.4.16.159/extranet_prperdomain/reports/"&gt;Per Prod/SW Pack/RDT Group&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-pr-tendency" class=" ext-pr-tendency" name="ext-pr-tendency" href="https://10.4.16.159/extranet_prtendency/reports/type/default/"&gt;Progression&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-rework-prs" class=" ext-rework-prs" name="ext-rework-prs" href="https://10.4.16.159/extranet_reworkprs/reports/type/default/"&gt;Rework&lt;/a&gt;
          &lt;/li&gt;
          &lt;li&gt;
              &lt;a id="ext-pr-timetosolveprs" class=" ext-pr-timetosolveprs" name="ext-pr-timetosolveprs" href="https://10.4.16.159/extranet_timetosolveprs/reports/type/default/"&gt;Time To Solve&lt;/a&gt;
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/li&gt;
  </code></pre>
  
  <p>Please find the soltion. how to exactly click the element..</p>