Need Help with an Automation using "Image exists" and "Click Image"

Hello Guys,
I Need Help with an Automation using “Image exists” and “Click Image”. It should click every button of a specific kind on a Webpage. I used a do while loop, the loop itself seems to work, unfortunatly just for the Buttons shown on my screen. However, i want it to work for the whole Webpage, not just the part shown on my screen.
Thanks in Advance, Tizian

Hello,

Just small remarks

  1. Never use do while loops like that, you need to have some counter and delay, you dont want your loop to go endlessly.
  2. Try using anchors
  3. try using UiAutiomationNext activities
  4. Every image has selector, where it is looking for image,try to check there what is going on.

Cheers,
Radomir

1 Like

hi @tizi12 ,

Welcome to the Uipath Community !

So as per my understanding , you want to click image only if it exist.

You can use only 1 activity : Click Image.

Now you have 2 scenarios - What do you want do do if image is not found .

Answer 1 : Continue the Process
– To achieve this - Specify Continue on Error Property to true of ClickImage … This will look for image for specified timeout - if found - click - else continue.

Answer 2 : Stop the Process / Retry / Send Mail / Log Error
– TO Achieve this - Put the Click Image activity inside the try catch and inside the catch - Specify your action. -- Here continue on error would be false.


Mukesh

Thanks for the answers, the do while loop ends if it cant find any more of the Buttons, once clicked their appearance Change, now the plan is that not just one of them is getting clicked but instead all of them, thats why i need Image exist, so it keeps going if there are still Buttons left that havent been clicked. Since they appear in different numbers every time ist nearly impossible to work with anchors and Selektors.