Message: element click intercepted: Element is not clickable with Selenium and Python

Message: element click intercepted: Element is not clickable is an error which occurs in Selenium when the desired element isn’t clickable.

This post is a guide showing you why you are having this error and how you can get rid of it in the most efficient way possible, I will also include some alternative solutions that may help you.

Explaining the Error : Message: element click intercepted: Element is not clickable

The error can happen to anyone running Selenium and using an automation script, the error usually happens when you are trying to use Selenium to click on an element that isn’t clickable.

Here is an example of the error message.

Message element click intercepted Element is not clickable with Selenium and Python-problem-banner

Bellow I make my best attempt at solving the error and presenting multiple possible solutions according to your needs.

Solution 1 : Try driver.execute_script()

Like any scraping or automation solution you need to check if the xpath or selector is right.

If that is the case then try to use driver.execute_script() instead of .click().

So, instead of the code bellow.

use the following code.

If this has solved your problem, Great. If the error persists then try the solution bellow.

Solution 2 : invoke the click() method the right way

If the solution above did not work, please try this solution.

Keep in mind that this error happens when the element we want to click isn’t clickable because it was intercepted by another element.

You can directly use the click() method when using WebDriverWait .

First, you should start with some imports.

You can use the click method with an Xpath as follows.

The solutions above should be enough to solve the problem, if you like our effort make sure to consider donating to our Kofi account, there is a red button that you can use if you are feeling generous.

Summing-up

Thank you guys for reading, I hope this article helped you solve the issue at hand, I hope the error Message: element click intercepted: Element is not clickable is gone after following one of the solutions I described above.

Keep coding, errors are normal, keep learning, cheers. If you want to learn more about Python, please check out the Python Documentation : https://docs.python.org/3/