Can we compare two images & take decisions out of it in uipath

I have one image with Down arrow button for sorting purpose, if i want to check if arrow is Down then click on it to make it up i.e. Ascending from Descending - as i dont have any text to compare & take decisions - can i store Down arrow image in one UiElement variable & compare it with Actual Arrow position & take my actions ?Untitled

Ignore this, didn’t notice Citrix tag:
Before going with Image match, do you see a variable selector for Up and Down Arrows?

Hi Jingneshjk,

Could you try using a Click Image activity within a Try Catch? Have the Click Image activity attempt to click a Down arrow to the right of the “Date Time” text. If it can’t find the Down arrow image then that means the arrow is already pointed the correct direction (up), and the activity will just error out and be caught by your Try Catch.

Cheers!
Riley

1 Like

ImageExists is what you’re looking for.

Do an ImageExists for one arrow and an ImageExists for the other arrow, than add an IF(up AND NOT down) and proceed accordingly.

4 Likes

I think Click Image with ContinueOnError to True (or Try/Catch) or ImageExists to store a boolean both work so it is preference. However, make sure you are looking into a Region where there’s only one instance of that image, otherwise then you would need to include the “Date Time” part.

You could alternatively retrieve the data you want and sort it yourself using Sort methods. I guess it depends on what you are trying to do.

Thanks.

2 Likes

It is working but with accuracy level = 1