P
P
Python Newbie2021-11-18 09:54:09
Python
Python Newbie, 2021-11-18 09:54:09

Why do I SOMETIMES get an ElementNotInteractableException error?

Sometimes when I go to the site I get this error. Why is this happening in python selenium?

This is how I click the button:

WebDriverWait(driver, 15).until(EC.presence_of_element_located((By.CLASS_NAME, 'btn-next'))).click()

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Medovochka, 2021-11-18
@Levman5

The problem is that Selenium can't detect the given element. Most likely you are not calling correctly + you have to wait, maybe not 15 seconds. Try it differently:
wait.until(EC.element_to_be_clickable(...
And do you have air conditioners added?

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC

Also, do not forget that there may be problems with the browser - Chrome always opens in full screen mode if you have not configured anything else.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question