12.RPA Challenge - Count how many icons or images exists on screen


#1

Hello friends, i need to count how many images exists on web screen, my intention is to create a do while that will be executed under the value that the counter returns.

In this case I need to filter by the pattern of yellow icons
Capturar2

Therefore, the operation would return the value 3.

thanks…


#2

Like! Moved to challenge section. Regions…


#3

Boy, I really need help with this. I have been trying for a long time a logic inside the workflow only using the image exists, but sometimes it would return a false value, while in fact the image is there…


#4

Guess you need to play around with accuracy as the Image has Grey and White backgrounds.

One more way is capture two Image grey and white backgrounds and compare.

RPA12.zip (215.0 KB)


#5

HE STILL RETURNS ME ZERO IN THE MESSAGE. WHAT EXACTLY DO I NEED TO INDICATE IN THE “FIND IMAGE MATCHES” ACTIVITY?
I TRIED ALL OPTIONS … LOAD THE SAME IMAGE, GRAB FROM SCREEN AND INDICATE SCOPE :exploding_head:


#6

Please capitalize as usual, this is hard to read. :slight_smile:


#7

Try modifying this value (always <1 ) in Find Image Matches

image


#8

I am doing the challenge but I would like to askif you are 100% sure it has to be an image, instead why don’t you try to use a selector. can you please try that. Because it’s a web screen, let me know I am trying with SAP on citrix. but I see there is no real challenge, if you can get a table .


#9

@Diego_Nascimento

Use Find Image Matches for both images differently with accuracy 0.9, it returns object type IEnumerable<UiPath.Core.UiElement>

I have checked the same, it is working fine, but cant upload the xaml file.

If you need the position of the image, use for each loop with object elem as UiPath.Core.UiElement, and use below values…

elem.ClippingRegion.Rectangle.Value.Top.ToString elem.ClippingRegion.Rectangle.Value.Bottom.ToString
elem.ClippingRegion.Rectangle.Value.Left ToString
elem.ClippingRegion.Rectangle.Value.Right.ToString
etc.


#10

Main.xaml (5.1 KB)


#11

This solution finds the number of images of badida on this site:


#12

I found that I could read Diego’s post fine (after using the tolower function on the text and then I manually changed the letters at the beginning of the sentences back to Caps, also I had to wear my glasses otherwise it was a bit fuzzy but I don’t think I can blame Diego for that)


#14

My First Attempt at this was to use paint to open up the screen shot for counting.

I used a click activity to go to File and tried another click to go to Open but at that point either paint or UiStudio crashes. Can anyone confirm the same behaviour with paint. It seems odd that there should be an issue with a program as ubiquitous as paint (it’s probably me).

Main.xaml (10.6 KB)


#15

This was just a disaster really.

Here are my “solutions”

Chall12_CountIcons.zip (867.6 KB)

There are 3 attempts in that folder.

  1. Main: This one I tried using paint 3D instead of paint (because of the issues I was having with paint) to view the screenshot. However when I used the ‘open application’ activity and ‘indicate on screen’ to paint 3D when it ran it just opened up normal paint so that didn’t work.

  2. Test2: I opened up the screenshot using photos (couldn’t put that part of it into the xaml as I couldn’t work out how to open a single image with ‘photos’) anyway the workflow worked with Find image using an accuracy of 0.989 (other than that and I was getting incorrect numbers for the grey and white image comparisons) and as there are only 3 of them (yellow icons) to test that could just be luck!

  3. Used Load image and then find image activities and that worked with an accuracy of 0.74 for the 3 examples that were given (split into white background 1 and grey background 2 matches)

The accuracy value seems to be very random and I wouldn’t trust the results without a much greater test data set.

Anyway appalling effort by me sorry!

PS use find image matches (not find image) as this returns all the matches not a specific one.