Find how many times image exists on webpage

Hi, i am having a nightmare trying to find out how times an image exists on a webpage.

this is the current workfow i have made, can anyone point me in the right direction please

@nick.v - imageExists variable name is unhold?
if yes - just write the variable name if condition unhold

1 Like

in general find children activity is used for this. Some mor details would help us.

the idea behind is to look for html elements with some specific details e.g. clas, img src name part …
so with find children these elements are found and can be further evaluated and processed

i need the bot to recognise how of these images exists, theres a different process if theres more than 1

yes i agree with you @ppr however i am finding it difficult to get the bot to find the uielement

for this we are here to help, just share some details with us in form screenshots related to two images with details from Webtolls (Browser F12) UiExplorer

1 Like

i am using a virtual machine, will that effect me capturing the browser f12 information?

I am not sure If I got you total. But where is the Studio installed on which you develop the Bot. So is the bot accessing the browser directly or via Citrix, RDC extensions?

No so studio is actually installed on the virtual machine, so i can access it directly thru remote desktop

lets do one thing: do an inspect on a html element as the bot would do and share the selector with us.
Please use for posting the </> format button. Thanks

thank you for providing help, i have managed to get it all working using the find children approach.

1 Like

Perfect, so you can close the topic by marking the solving post as solution. Others can benefit from it. Thanks Happy Automation :+1:

Use Find Image Matches Activity it return a list of UiElements as output.
You use the count function to get the number of occurrence.
You can also loop through the list using for each loop and perform action on it.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.