When working on a script, you might face some scenarios where the image analysis sometimes works but sometimes fails. After investigating, you realize it was caused by a dialog box or any pages that fail to load or have an inconsistent appearance. You may think it’s hard to solve this problem. It’s not that hard. You only need some actions to solve it.
We give you an example that handles that kind of problem. In this example, we will retry login when Robotiive cannot find the main page. The actions that you have to pay attention to are “Set Variable”, “While”, and “Wait For Result”, the Key Stroke and Typing are just for inputting process.
Wait for Result is used to save the wait result (in this case, we are waiting for the page to load), whether true or false. Then you can rewrite the variable value you created earlier using Set Variable. You can call this variable in the While to keep retrying when the result is false. This iteration will stop when the condition is no longer met, which is wait_result = true. The "true" result means that the page is loaded and found.
By doing those little hacks, the inconsistent appearance of any dialog box or page will no longer become an issue.