Similar selector click

Suppose on a web page you have two similar looking icons. They both have exact same selectors. Please suggest ways to click to desired icon.

Hello @kirti.srivastava

Plz use ui explorer andinspect on both of the element. For sureyou will able to find some attribute which is different.

You can use that to differentiate both. Maybe idx or rownum…

You can also share the screenshot of the ui element that you are trying to automate.


you can set an anchor for the element via ui explorer

or a better way is use the modern click activity, where it lets you set the anchor after selecting the element

Presumably they live in different segments of the app, you could add a parent element into the selector as a way to differentiate - thus avoiding the need to be able to visually identify element

Can you please explain a bit more what you are trying to suggest and how it can be achieved

Thanks for reply, but what if there is no anchor. Just two icons

Use UiExplorer to locate the button.
Then in the middle section you can add parent elements into the selector.

Let’s say that one of the buttons is in the header, the other is in the footer.

If you wanted to click the one in the footer your selector would be

This way even you though the button isn’t unique, the parent element you’re saying contains it is. Therefore the element is unique.

1 Like

Hi @kirti.srivastava ,

Welcome to the community !

If there are only two icons you can first finalize which icon to click for e.g. if its the left or the right one.

Accordingly make the other icon as anchor.

Hope this helps.


1 Like