Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Selenium Webdriver with Python: Element is not clickable & Cannot read property 'click' of null

when running this command, I'm getting an error:

driver.find_element_by_link_text("Confirm").click()

selenium.common.exceptions.WebDriverException: Message: unknown error: Element <a href="javascript:void(0);" class="c-button u-fontSize13 c-button--blue transparent-button js-connect-button js-request-connection" data-href="https://angel.co/user_graph_requests" data-invited-id="5911955">...</a> is not clickable at point (67, 581). Other element would receive the click: `<div class="mfp-container mfp-ajax-holder mfp-s-loading">...</div>`

After searching answers on this issue, I've changed the above code to:

element = driver.find_element_by_link_text("Confirm").click()
driver.execute_script("arguments[0].click();", element)

For the first click it worked and then printed this error:

selenium.common.exceptions.WebDriverException: Message: unknown error: Cannot read property 'click' of null

The HTML code is:

<a href="javascript:void(0);" class="c-button js-close s-vgLeft0_5 c-button--blue" data-modal="true" data-url="https://angel.co/user_graph_requests/102006082/verify">Confirm</a>
like image 783
Annie Shlepak Avatar asked Feb 16 '26 21:02

Annie Shlepak


1 Answers

So this worked for me:

driver.find_element_by_link_text("Confirm").send_keys('\n')

Thanks to everybody :)

like image 178
Annie Shlepak Avatar answered Feb 19 '26 11:02

Annie Shlepak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!