Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99410

Elements keep going stale using PageFactory

$
0
0

I have a list of objects i want to confirm some attributes on, the issue is that they reload on the page around once a second.

Whenever I try to refer to any of the elements in the list i get a stale element exception. I tried refreshing the elements just before checking but i still get the exception.

Is it possible to cache the elements when i initialize them?

This is how i get the elements:

            [FindsBy(How = How.XPath, Using = @"//*[@id='Log']/table/tbody/tr/td[4]")] 
            public IList<IWebElement> logs;

Viewing all articles
Browse latest Browse all 99410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>