I have a Selenium script (Python) that clicks a reply button to make the class anonemail appear. The time it takes for the class anonemail to appear varies. Because of that I have to use sleep until the element has appeared.
I want to wait until the class has appeared instead of using sleep. I have heard about wait commands, but I don't know how to use them.
This is what I have thus far:
browser.find_element_by_css_selector(".reply-button").click()
sleep(5)
email=browser.find_element_by_css_selector(".anonemail").get_attribute("value")
question from:
https://stackoverflow.com/questions/59130200/selenium-wait-until-element-is-present-visible-and-interactable 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…