Pega Robotics: How to Wait and proceed only when certain property changes
I'm new to Pega robotics and I would like to know if this is possible.
Basically, I would like wait and proceed to next step only when the CSS property changes from "display: block" to "display: none". There's a message "Loading..." and it would like wait and go to next step when this message disappears on screen.
If there is an event that you can detect when this change occurs, then you can wait for that event. Perhaps the loading screen gets destroyed, or perhaps a new control is created. There may not be an event that you can wait for though. If that is the case, just setup a simple forLoop (using the ForLoop control from the Toolbox window's Advanced tab). On the forLoop yielded, add a pause for a brief period (500 ms or so) and the check the property to see if it equals Display none or whatever). If it does, then call the break method of the forLoop (to access this method, click on the forLoop in your automation and then locate the break method in Object Explorer to drag out to your automation surface).
Just an update on this. As sasnt advised, I looked for other elements that became present and found that page number changes when the result came. I then used that element instead of div style. Thanks for all the help on this.
I am trying to do the same, but in this case the styles appear to remain the same. There is a table which is already available in the page.
When I click on a button, the table refreshes. While refreshing, the table is disabled as shown in the first screen-shot in the attached document.
So I was testing IsEnabled property of the table, to check if the table is fully loaded before proceeding to the next step. But the IsEnabled property also seems to be always true, so that does not help.
Going by the above suggestion, I was trying to check if there is a readystatechange event which can be waited, but looks like that is not available
Please let me know if there are any other options that can be tried.