Python Selenium: wait until an element is no longer stale?
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: self.wait.until(EC.visibility_of_element_located((By.ID, "elementID"))) self.wait.until(EC.presence_of_element_located((By.ID, "elementID"))) Its opposite wait function is present which waits until an element becomes stale, which is: self.wait.until(EC.staleness_of((By.ID, "elementID"))) But I want it to wait until the element is NO LONGER STALE i.e. until it gets connected to the DOM. How can I achieve this functionality?