Parallel activity error while handling pop ups

Hello everyone,

I am fairly new to UiPath and build a workflow to handle popups that might appear based on the changes made to the webpage/online form.

I used parallel activity to handle the pop ups. But I keep getting following error on click activity and I don’t seem to understand what’s causing it or how to solve it.

Can someone please help.

Following is the error:
The activity ‘Click ‘OK’’ with ID 47 threw or propagated an exception while being canceled.

Which Studio version you are using? Try to update all the activities to latest version.

https://forum.uipath.com/t/cancelling-browser-operation-throws-an-error/1099

Hi, @abhishek.singh4

it’s not recommended to use Parallel activity to interacting with UI elemenets. It may doesn’t work properly

Hi @rikulsilva what do you suggest I use when we have pop ups appearing based on whether or not something is changed on the webpage.

Hi @AJ_Ask , I am using studio 2022.4.5 and I have updated all the dependent packages, seems like that was the issue but I will do a full test run and if the issue no longer persists, I will mark you suggestion as solution.

There is some strategies to do so, but the first option is Check App State Activity in Modern Design when we need to check only one popup by time. Other options is Element Exits, Check Execution etc.

A different approach is use Pick Branch activity:

Hi @abhishek.singh4

You can use Check App State to handle the Pop ups
You can refer this following video and go through the documentation

Hope this helps

Hi @sanjay3 I have used check app state inside the parallel activity, but the problem is the number of pop up differs based on whether or not a change has been made to the webpage, and there is no way to figure out when the change is going to take place.

Scenario 1: If no changes are made then only one pop up and a click action is performed to get rid of popup.

Scnerio2: Changes made and now we get two pop ups one after the other and 2 click actions are performed to get rid of the pop up.

Please not in both the scenario click action is performed in check app state.

Parallel activity is used to endure if scenario1 does not take place scenario2 is executed.

Hi @abhishek.singh4

Using the Parallel activity in UI Automation is not recommended because it can lead to unforeseen consequences (It is mention in UiPath Docs)

What I suggest you is

Use element exists, If the value of element exists is true then Drag and Drop IF activity in that you can use Check App state

For both the scenario you can you the that I suggest

Hope this helps

Hi @sanjay3 you seem to be right, the code runs ok for few continuous iteration but after a while it seems to break on click actions which should not happen. So I will try element exists now instead of parallel activity.

But out of curiosity does anyone know the code would break on click action eventho the element exists and the page is the same?

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.