title: In selenium Anchor tag onclick function not working?
body: <p>I have javascript onclick as:</p>
  
  <pre><code>&lt;a href="#" id="download" onclick="Exceldownload('sites')"&gt;
      &lt;i class="fa fa-download card-down-icon" aria-hidden="true"&gt;&lt;/i&gt;
  &lt;/a&gt;
  </code></pre>
  
  <p>In selenium I added like this:</p>
  
  <pre><code>public void x() {
      driver.findElement(By.xpath("//a[@onclick='Exceldownload("sites")']")).click();
  }
  </code></pre>
  
  <p>But I am getting error as element is not clickable.</p>