I’m trying to get rid of an error pop-up that shows up unexpectedly in a web page. I want have a sort of a ‘listener’ so that if that pop-up shows up, it clicks in a button to remove it and continues the normal process it was doing before the pop-up showed up.
To do this I though of using a parallel activity, with the normal process on one side (let’s call it ‘left side’) and the error treatment on the other (let’s call it ‘right side’). Nonetheless, this doesn’t seem to work since the robot will just run one activity on the left side and one activity on the right side. So, if I have an ‘Element Exists’ activity catching the pop-up message initially on the error treatment (the right side), and if it turns to true (the pop-up exists), the parallel instead of continuing to the error treatment (the button click), will just return to the left side…
Does anyone have any ideia how to solve this?
Thanks!
Does the pop-up happen at the same spot in the workflow? If so, just use the ‘Element Exists’ and If activity at that point in the workflow to click the pop-up box if it exists. No need for parallel in this case.
If it pops up randomly that’s another matter entirely. I’ve never tried it, but you could use a While loop that checks for ‘Element Exists’ every few seconds. The While condition would be ElementExists = true OrElse left side is completed. The ‘left side completed’ would just be a simple assign activity that assigns some boolean = true
There are actually several different pop-ups that can show up, but they can show up randomly accross the process. I can never actually figure out exactly where or when they will show up, that’s why I need some sort of ‘listener’ to check inbetween each activity if a pop-up is there or not… And after the error treatment, I want it to continue where it left off, not restart the entire process.
I don’t think the While loop would work because I need to check if the pop-up is there inbetween every activity, otherwise it will fail the following actions.
The While loop on the right side of a parallel activity would mean it is constantly checking until the pop-up is found or the activity completes on the left side of the parallel activity
True, but then it will not continue to the error treatment. After it checks the ‘Element Exists’ on the right side, it will return to the left side and try to continue the process without closing the pop-up
Thanks for that! However if you run the workflow I attach here, I think you’ll understand what I mean. Please open notepad.exe and run the .xaml in debug mode with "step into"s to check how UiPath is processing it. It always alternates and does not continue to the error treatment. leopffm.xaml (14.3 KB)
@leopffm yes, the parallel alternates left then right, that’s how it is intended to work. I am not quite sure what you mean by “does not continue to error treatment”, but have you tried implementing in your actual solution to test it out?
If the parallel alternates from left to right then I cannot see the use of it… it’s just like an horizontal sequence lol. Answering your question, yes I have, and it does not work as I intended. The error treatment I was talking about was closing the pop-up action.