It’s a WebDriver error that occurs because the referenced web element is no longer attached to the DOM

Some of the methods to avoid the exception

  1. Use Explicit wait
  2. Use try catch
  3. By using POM
    @findBy Annotation
  4. use refresh command in the code