Please help me.
I need to check if an element appears. The element may or may not appear. I want to check if the element appears in an x period of time, but, I still need to refresh the page during this entire period of time, the element does not appear without refreshing the page
JavaScript
x
3
1
wait = WebDriverWait(driver, 9000)
2
element = wait.until(ec.visibility_of_element_located((By.XPATH,"//b[contains(text(), '" + autor + "')]")))
3
This code is not what I need, besides what I need to check in x period of time, during this entire period I also need to refresh the page
Advertisement
Answer
Thanks all, solution in my problem:
JavaScript
1
7
1
while True:
2
if autor in driver.find_element(By.XPATH, "//tbody/tr/td[2]/b").text:
3
break
4
else:
5
driver.refresh()
6
time.sleep(15)
7
autor is variable who was receiving a text