org.openqa.selenium.StaleElementReferenceException: Cached elements do not exist in DOM anymore

The problem

I am getting errors whenever I am running my test cases. I never get a similar issue before but now I am getting this error across a project.


  • Appium version: 1.20
  • Last Appium version that did not exhibit the issue (if applicable): I didn’t get this issue before with the same version
  • Desktop OS/version used to run Appium: Windows 10
  • Node.js version (unless using|exe): 14.15.5
  • Npm: 6.14.11
  • Mobile platform/version under test: Android 10
  • Real device or emulator/simulator: Real
  • Appium CLI or|exe: Appium CLI

Link to Appium logs


Code To Reproduce Issue

project repo:
run Suite_ParentalControl file and error will generate while execution of test class: Check_Device_SocialHistory