So I was encountering a StaleElementReferenceException only when the UI tests run as part of CI, hence it’s almost impossible for me to reproduce locally as compared to when I run on Bamboo. I’ve concluded by seeing this answer and by looking at the timing logs that it’s running much faster in the CI build than when I run it on IntelliJ, so it’s not giving the page enough time to completely load the results. Rather than asking for solutions, since I figured this part out, I’m wondering if this is a valid claim and why it’s performing this way and ways to debug to get to the root of the problem. My local maven build is actually not much faster than the IntelliJ run, but somehow it’s significantly faster on Bamboo.
Any explanations for this, and how I might be able to reproduce the error locally? I’ve been trying to set a breakpoint in Chrome when certain DOM children change, but I can’t pinpoint the time in which the element becomes stale. I have IntelliJ’s debugger running and I’ll look for an element, store it, step through the DOM changes in Chrome, checking each time if it breaks Any suggestions on how I can better debug/reproduce and if I’m on the right track with it being from the CI build running faster?