I started to learn Selenium this morning lol but i'm stuck trying to click on a element like this:
<a rel="nofollow" style="" href="javascript:void(0);" time="" itemid="1523208" data-has-req="0" class="button okletsdothis nonsubscriber dl button-green" title="Download">
<span class="icon-download" time="" itemid="1523208"></span>
Download
</a>
In the console I'm getting this error
ElementNotInteractableError: element not interactable
This is the code where I wait until the element is located and then try to perform the click action
let downloadButton = await driver.wait(
until.elementLocated(
By.xpath(
'(//a[@class="button okletsdothis nonsubscriber dl button-green"])'
)
),
100000,
"Timed out after 30 seconds",
5000
);
await downloadButton.click();
If I change the xpath and click on a element like this
By.xpath('(//div[@class="download-button ide"])')
it works fine, but in the case before i can't make it work. Please help.