StaleElementReferenceException – Element’s “Reference” Stales – Get New Reference Of Element
Let’s start with some lines of code :- Launch login page of a website. Locate a WebElement “EmailAddress” and store in a WebElement reference variable. Perform some actions multiple times on already located WebElement. Refresh the web page. Perform same actions on Already located WebElement EmailAddress again. package StaleElementException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement;…