Answer the question
In order to leave comments, you need to log in
How to wait for an element to change using selenium?
There is an element on the site that changes at intervals of 30 to 60 seconds. What methods can be used to determine that an element has changed. It is desirable that expectations are used. I implement it like this:
r = 1
def sleep_element(element, r):
try:
element = wait.until(EC.text_to_be_present_in_element((By.XPATH, element), str(r)))
finally:
print("Метод отработал")
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question