Hello Sir,
How can we handle stalelementElementRefreneceException. I am frequently getting this exception.
Please tell the best way to handle it.
Instructor
Ashish Thakur Replied on 11/08/2021
Caused by 2 reasons:
If you extract element and use it before its completely loaded
If you extract element, change page and then come back to original page and use element
Okay Sir. Could you please suggest best way to handle it., In my script I have to enter one value in the text box and then I have to hit enter. it is givign excpetion at that time staleElementReferenceException. Could you please advice.
Instructor
Ashish Thakur Replied on 16/08/2021
You can put some delay like thread.sell or explaicit wait before interaction