Skip to main content

Timeline for answer to Python Selenium wait for innerHTML by Gaurang Shah

Current License: CC BY-SA 3.0

Post Revisions

5 events
when toggle format what by license comment
Mar 13, 2021 at 16:08 comment added Ice Bear I tried this WebDriverWait(browser, 20).until(lambda browser: re.search(regex,browser.find_element_by_xpath(my_xpath).get_attribute("innerHTML"))) and it works thanks!
Mar 13, 2021 at 15:59 comment added Ice Bear This does work! Thanks! may I ask if instead of comparing the string? to and "expected text"? How can we do this we regular expressions? hmm... also may I clarify that what happens here to the second code answer is that the driver waits for an element base on the XPATH given if the innerHTML of it is equal to the expected text right? THANKS!
Aug 28, 2017 at 12:42 comment added Gaurang Shah it's not a Boolean, it's a function. I have tested it and it works just fine.
Aug 28, 2017 at 12:28 comment added In_Circ Python won't let me use the == operator in the until() function. I'm pretty sure it doesn't accept booleans. The first answer still returns the same error message selenium.common.exceptions.StaleElementReferenceException: Message: {"errorMessage":"Element is no longer attached to the DOM"
Aug 28, 2017 at 9:13 history answered Gaurang Shah CC BY-SA 3.0