18-03-22 01:31 PM
21-03-22 03:51 AM
21-03-22 09:43 AM
21-03-22 02:44 PM
Hi Steven,
I think Bruce Liu already solved your problem. I just wanted to add to his solution.
I think your problem is that the element exist on your original screen, then you update it to move to next screen, before it gets to load the new screen it find the element and goes thru the wait step, then fails on read as load is a bit further.(What Bruce Liu said in fewer words)
(my addition) If you don't have an unique element you can wait for. Make a wait stage which waits till the element doesn't exist, meaning you are in the process of loading the new page. Then insert a wait stage that waits for the element to reappear, meaning this will be your loaded document. *Takes two wait stages to Tango your problem*
26-03-22 04:20 PM
Bruce, I think you're on to it. As it turns out, there is a standard place for a page title in the app that I'm working with. We check this title to make sure we're on the right page before proceeding. Unfortunately, we don't always know which page will pop up next and we have to navigate through a series of pages (different from run to run) to get to the pages we need. So the original version of the process used hard-coded waits to give the page time to fully load before checking the title. When the client switched from IE to Edge it seemed like an opportunity to streamline things a bit.
What I realized was that the wait stages worked fine for the pages that had the title text in the spy. But they process was failing when looking for a "generic" title. In these cases all the process could look for was the container for the title since we don't know what text to look for. I suspect that the wait stage was recognizing the container for the title before the text actually existed. Then when the read was attempted there was no text there so it threw and exception.
What I have done is built my own wait stage that catches the read exception, waits 1 second, then tries again for x retries. So far it has worked well and, looking at the logs, haven't seen it go past the second try. This will still be faster than the hard coded waits (some as high as five seconds) but will also allow for inconsistent performance from the app (which I have seen since the switch to Edge).
We have just switched from 6.5 to 6.10.3 for the upgrade to Edge. Perhaps the parent document loaded option is an even more elegant solution to the problem. I was not familiar with it until just now.
Thanks, everyone, for your time and help!
28-03-22 11:31 AM