Check if image exists at a certain position on the screen

Hi there,

This is my first time using the UiPath forums so please let me know if I am asking this question in the right place.

I’m trying to make a workflow that can detect a specific image at a certain position on the screen and then click a button. This image appears multiple times on the page, so I need a way to make the workflow execute only on the condition that that image is at a certain spot.

I am currently using ‘anchor base’ activity that uses a ‘find element’ activity on the left side and a ‘image exists’ activity on the right side with the boolean variable “imgExists” as the output. Then I use an ‘if’ activity with the condition “imgExists = True”, Then click a button. This executes no matter where that image exists on the screen at the moment, which is not what I want. I intended for the anchor base activity to take care of that problem. Does anyone have any suggestions? Thanks in advance!



Have you tested with the Get Position activity?

Not yet. I’ll give it a try and get back to you, thanks!

Do you know how I could use the coordinates of the rectangle output of that activity in a conditional statement to check if a element exists at that position? I’m not sure what to put in the condition for my ‘if’ activity.

You should be able to use recOutput.Left and recOutput.Top to check horizontal and vertical position.