StaleElemetReferenceException | Selenium Forum
M
Munish Sandal Posted on 10/08/2021

Hello Sir,

 

How can we handle stalelementElementRefreneceException. I am frequently getting this exception.

Please tell the best way to handle it.


A
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


M
Munish Sandal Replied on 13/08/2021

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.


A
Ashish Thakur Replied on 16/08/2021

You can put some delay like thread.sell or explaicit wait before interaction


Related Posts