I have a question regarding \"Element is no longer attached to the DOM\".
I tried different solutions but they are working intermittent. Please suggest a solution th
Solutions to resolve them:
driver = webdriver.Firefox(); driver.get("http://www.github.com"); search_input = lambda: driver.find_element_by_name('q'); search_input().send_keys('hello world\n'); time.sleep(5); search_input().send_keys('hello frank\n') // no stale element exception
# Using Jquery queue to get animation queue length. animationQueueIs = """ return $.queue( $("#%s")[0], "fx").length; """ % element_id wait_until(lambda: self.driver.execute_script(animationQueueIs)==0)
self.driver.execute_script("$(\"li:contains('Narendra')\").click()");
# Wait till the element goes stale, this means the list has updated wait_until(lambda: is_element_stale(old_link_reference))
This solution, which worked for me