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

Selenium StaleElementReferenceException when the element refreshes every second

$
0
0

In my web application there is a set of progress bars that update every second. When I look at the DOM in Chrome dev tools I can see that the elements are getting destroyed and recreated. So when I try to read the value or the text on a given label I get a StaleElementReferenceException.

Screenshot of Elements in Chrome

A specific example is I'm trying to get the value from the title attribute of this element. But I keep getting the error when running this line of code.

var progressBarCompletion = flyoutRow.JobProgressBar.GetAttribute("title");

Full error message: OpenQA.Selenium.StaleElementReferenceException: stale element reference: element is not attached to the page document


Viewing all articles
Browse latest Browse all 98380

Trending Articles



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