Answer the question
In order to leave comments, you need to log in
How does implicit wait work in selenium for python?
Used this tutorial. I'm trying to set an implicit wait for an element
driver = webdriver.Chrome()
driver.implicitly_wait(10)
driver.get('some_url')
user_name = driver.find_element_by_id('some_id')
wait = WebDriverWait(driver, 10)
wait.until(EC.element_to_be_clickable((By.ID,'some_id')))
Answer the question
In order to leave comments, you need to log in
ksenofobius It is possible that the element is NOT VISIBLE, which means it is in the DOM, but it is visually outside the working screen, so you cannot click on it. Or another situation when another element appears on top of the desired element. These are all examples from practice that I had to deal with.
See options for EC, there are many of them and choose according to the situation. Look in the DOM, the element may not have appeared yet. By the way, with implicitly_wait, I had a similar situation, and although I set it at the beginning of the program, where necessary, I still use wait or even sleep.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question