I have a situation in which I want to wait until an element is no longer STALE i.e. until an elements gets connected to the DOM. Following wait options do not work somehow:<
As you want to pick up the text property once the WebElement
is no longer stale, you can use the following :
wait1 = WebDriverWait(driver, 10)
wait1.until(expected_conditions.text_to_be_present_in_element((By.ID, "elementID"), "expected_text1"))
OR
wait2 = WebDriverWait(driver, 10)
wait2.until(expected_conditions.text_to_be_present_in_element_value((By.ID, "elementID"), "expected_text2"))