Image Exist_012

Iam using image exist activity to get a popup and click ok if appears.

i used a timeout for 2sec for each image exist activity.

MicrosoftTeams-image (34)

The thing is that it is taking 2 sec to check whether popup is there is not.

Note :- The popup can only be cropped and captured thats why i used image exist activity.

Is there any way to reduce the timing of this activity

Hi there,

Instead of checking each image exists in a nested if (which means it will only check the next condition if the first condition does not apply, etc.), try using a ‘Pick’ activity with multiple ‘Pick Branch’ activities.

Each Pick Branch should have a trigger similar to the Image Exists activity that you have. I would also suggest not hard coding the timeout value and rather make it configurable, in case the system takes longer to respond or pop up in the future.

The workflow will loop through each Pick Branch parallelly and once an image exist is triggered, the Action Branch will allow you to determine the next steps (i.e. throw an error message, click Close, etc.) which will save time as compared to a nested if.

Do let me know if this method works.

can you share a sample workflow how can we use this pick branch activity, if possible

I never used this activity before

See, Pick activity contains a collection of PickBranch activities, where each PickBranch is a pairing between a Trigger activity and an Action activity.
You can use Element exist, Image exist as a Trigger like this
images%20(1)

this is from How to use Pick Branch? - #3 by MatsO

@kaiboon.lim

i tried pick branch activity.

But the thing is that it is clicking ok for not indicated one in image exist activity.

Do any of the images exist? If yes, then it will click the OK button. Otherwise, the Pick activity should timeout

@kaiboon.lim
Here i used image exist to indicate this popup.

MicrosoftTeams-image (36)

but rpa is clicking ok to this popup instead of timeout.

MicrosoftTeams-image (37)

are the selectors in your ‘Click Image’ activities pointing to the correct windows?

Also, if both windows exist, then the Pick will flow down the Pick Branch of the most left scenario first.

If both windows can exist at the same time, you will not be able to use this method. You may have to use Parellel activity to close all windows if needed

@kaiboon.lim

i have indicated it in the right window.

i cant tell which popup will come most because its depends on input data.

so how can i put the image exist activity in left have priority.

And also only one popup will be there in the window at a time

OK, then this method should work. You can simply drag and drop the scenario (Pick Branch) that is the highest priority to the most left side of the Pick activity. If you run in slow step, you can see that the Pick Branch is highlighted from left to right.

Ensure that the selector in your Click activity is specific to that window that is causing the trigger and you should be fine.

If that still doesn’t work, perhaps all images are present in the background after execution. Only way to check this is to run the automation step by step and pause before the Pick activity, check each selector in the Image Exists activities in a separate workflow to see if they are appearing together.

@kaiboon.lim
i will check that one and update you.

thanks. please help to like the post and mark as a solution so others can do the same. :slight_smile: cheers