I am getting the following error while using Selenium in python:
selenium.common.exceptions.StaleElementReferenceException: Message: u\'stale element referen
Beyond the answers here, if you are using ActionChains, and the page has changed, be sure to reinstantiate your ActionChains object (dont reuse an old one), otherwise your ActionChain will be using a stale DOM. I.e. do this;
action_chain = ActionChains(driver)
action_chain.double_click(driver.find_element_by_xpath("//tr[2]/p")).perform()
Or better yet dont use an instantiation;
ActionChains(driver).double_click(driver.find_element_by_xpath("//tr[2]/p")).perform()