Posted: 13 Mar 2018 15:29 EDT Last activity: 19 Jul 2018 16:46 EDT
Pega Robotics wait page refresh
I'm wondering what is the best way to wait on a page refresh / postback. Currently I wait on page destroyed event and then call waitforcreate for the same page. Most of the time it works but sometimes it failed to catch the destroyed event and then times out from there before jump to waitforcreate.
You can use a WaitForEvent Created. The difference between this and WaitForCreated is subtle but important. WaitForCreated will be true if the page is Created before or after you start waiting on it. WaitForEvent Created will only be satisfied by a Created event happening after you start waiting on it.
Pages that submit to themselves don't always seem to behave. I have seen the same behavior and can't really explain it. The only advantage to doing the WaitForEvent created is that you are only waiting on a single thing, but if you don't get destroyed it is likely you won't get a created either.
I might suggest that you filter your RuntimeLog.txt to just the lines with "Control is matched" and "Control is detached" and try to recreate the scenario where destroyed is missed. You may be able to find a pattern which you can code to.