Problems with CV screen scope and Element exists activity

I am working on a project that requires me to indicate a picture in a webpage that is apparently less than 33x33px, so the CV screen scope cannot capture that.

I was planning to use “element exists” activity to indicate the presence of this button, however, the current version of UiPath Studio doesnt seem to allow me to use element exist activity on its own. Is there a way I can indicate the presence of a button smaller than 33x33px ???

Image is attached as a reference: the arrow highlighted is the button I want to indicate.
螢幕截圖 2023-06-05 下午5.38.23

Hi @Ben_siu

Please try using the Find Image activity to indicate the presence of a button smaller than 33x33 pixels on a webpage. This activity allows you to search for an image within a specified area of the screen.

https://docs.uipath.com/activities/other/latest/user-guide/wait-image-appear

Hope this helps,
Best Regards.

Dear,

thanks for the answer. It seems to work fine, however, the output is an UIelement and I would like to make the output to a boolean value, and then pass it on to a while loop. To do this, should I use assign activity or what?

thanks

@Ben_siu

You can use the following expression to derive a boolean value in order to drive decisions in the loop further:

imageFound = (foundImageElement IsNot Nothing)

This expression will assign True to imageFound if the foundImageElement is not null, indicating that the image was found. Otherwise, it will assign False.

Hope this helps,
Best Regards.

@Ben_siu

Find image will fail if the required image is not found…so it is already like boolean…

Use it inside a try catch and in catch set the boolean to false and in the try after find image set the boolean to true

Hope this helps

Cheers

Hi, thanks for the reply, I typed in:
“arrow isNot Nothing”, for which arrow is my element, but it gave an error, could you please help me out on this?

@Ben_siu

isNot Nothing is the checker expression that you can check in the If condition (like the boolean check performed on element exists), not in the assignment activity.

Best Regards.

Hi, I wanted to use it in a while loop rather than a If-else activity, is there anything I mistyped?

Best,

@Ben_siu

Seems like you are getting the collection of UI objects in the arrow variable. Please indicate the same again & make sure you are indicating a single entity. The data type of the variable shall be UiPath.Core.UiElement. If these changes are done, you can use the above condition in the While loop easily.

Hope this helps,
Best Regards.

Hi, I made the changes but the error persists. However, when I type in “arrow != Null” it works fine, are they the same? can I replace this with “arrow != null” ?

@Ben_siu

Can you share the screenshot of the remaining activities where you are trying to capture the UI element?

Best Regards.

Hi, is this enough?
I changed the Find image element a bit as I figured this would be more appropriate
also, when I try “arrow != Nothing”, an error gives saying that Nothing does not exist in the current context

best,

@Ben_siu

You are using the Find Image Matches activity. Kindly change it to Find Image & then perform the above actions.

image

Best Regards.

Hi,

is the activity not supported in 2023.4.1? I cant seem to find the “Find image” activity, I can only find the “Find image Matches” activity

How do their functionalities differ? Can I just use find image matches instead of find image?

Best,