Is there a way to close a pop-up(warning window) during a for each loop is executing? So in my case I am entering some data (for each loop on the right). While I do that, I want to check for pop-ups or any warning that would appear during that process. I have tried with Parallel operation, so I am checking if something pops-up with element appear, and if it does I want to close down the pop-up window. To my disappointment it does not work.
When the pop up appears my for each loop still continues to the next uielement, which breaks my robot. The pop up is not getting closed, so there are uielemts under it.
1. Global Exception Handler - Whenever there is an error, the execution flow will navigate to the handler & you can handle the popup and continue the execution
2. Parallel - You are already halfway through it, But still some logic to be implemented.
Your parallel activity to be in such a way that,
Every sec or a time very less than for-each activities delay - It should check for the popup (Infinite Loop)
Handle the popup immediately if identified & Repeat
Mark the parallel condition property as true so that the infinite loop gets terminated as soon as the main for-each with actual business logic comes to an end
To add a 3rd: 3. Pick Branch - Use a pick with 2 branches. ONe that finds the popup, one that finds something that appears if no popup comes. I’d prefer this over the parallel, since it will execute the branch that matches and drops all others. This prevents you continiously waiting for a find element on the popup to expire if you’d run it in a parallel flow, where little or no popups appear.
@Nithinkrishna Do you have any example how that would be implemented. So lets say we want to use the parallel option. " 1. Every sec or a time very less than for-each activities delay - It should check for the popup (Infinite Loop)" how would I implement point 1?
@Nithinkrishna Thanks for the suggestion, but this way it still doesn’t stop the for each from continuing. will try to implement it in the for each as @Angel_Llull and @postwick suggested
This was the right solution. So When the pop up appeared I navigated the robot to a state from which the for each loop could continue. Logged the error and used the “Workflow->control->contin ue” operation, so the program proceeded to enter other data.