My javascript onclick function looks like this:
<a href="#" id="download" onclick="Exceldownload('sites')">
<i class="fa fa-download card-down-icon" aria-hidden="true"></i>
</a>
In my selenium script, I have added the following code:
public void x() {
driver.findElement(By.xpath("//a[@onclick='Exceldownload("sites")']")).click();
}
However, I am encountering an error stating that the element is not clickable.