Quality is delighting customers
StaleElementReferenceException is one of the different WebDriver Exceptions and this Exception occurs mainly because of page navigations in between the execution of Selenium code. i.e. This exception occurs, when Selenium navigates to a different page, come backs to the same old page and performs operations on the old page.
Please find the step by step explanation for handling Stale Element Exception at the below URL :
Here you get a complete information - StaleElementReferenceException
Thank you guys!
Stale means old, decayed, no longer fresh. Stale Element means an old element or no longer available element. Assume there is an element that is found on a web page referenced as a WebElement in WebDriver. If the DOM changes then the WebElement goes stale
Click here to more information.
In web application testing services the main reason of StaleElementReferenceException is due to the unavailability of an element being accessed by findelement method.
When an element which is found on a web page and referenced as a WebElement in WebDriver then the DOM changes that WebElement goes stale. It results the StaleElementReferenceException.
We can fix the StaleElementReferenceException by using below options: