I am getting the following error while using Selenium in python:
selenium.common.exceptions.StaleElementReferenceException: Message: u\'stale element referen
In my case, the problem
stale element reference: element is not attached to the page document
was because I tried to use
actions.move_to_element(element).perform() on actions that created from old Selenium tab.
So the solution is to create new actions instance after opening new tab:
actions = ActionChains(browser)
actions.move_to_element(element).perform()