I am getting Stale element exception when I try to automate angular js - drop down using Selenium with Java.

I am getting Stale element exception when I try to automate angular js - drop down using Selenium with Java. Can you help here?

Hey there Tom,

StaleElementReferenceException is thrown when an object for a particular web element was created in the program without any problem. However, this element is no longer present in the window.

This can happen if there was a navigation to another page, the DOM has refreshed, or a frame or window switch happened. To avoid issues due to DOM refresh, you could probably use Dynamic Xpath.

Hope it helps!!