How to click 2nd occurence of image


there are couple of same images on the web
i need to click on 2nd ocurence of image
i followed this approach and stuck on the step no.4

  1. load image
  2. find images match
  3. for each
    4.inside foreach using click image (what method should i use here so that it will click 2nd image ?)
  4. inside foreach use break


You can use normal click and pass the uielement in target which you are iterating in for each.
check the screenshots.

but i need to click only on 2nd image and it has no selector


remove for each and directly use click activity.
if Find Image Matches output is MatchedImages
and then use click and in its properties Target/Element give MatchedImages(1)

Thanks @SaurabhDisawal but will it work in background or whole entire page which is not visible
what needs to be done in such case ?

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