I was running some selenium automation tests in TestNG(Java), I am getting org.openqa.selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document
this error. I was trying to debug this, Can someone help me to fix this issue on multiple pages. My test has almost 2000 lines, I was randomly getting this error. I am using explicit wait and Thread.sleep in code.
thanks