Click activity for similar icons at different locations multiple times

Hi,

If i have three same icon in website (these icons are to expand the sections) but in different locations in the website- as of now im using three click activities one below the other to click all three of them and expand all those sections together. But can this be done at once such that- whereever we have these icons, go and click on all of them at once.

Reason I’m looking for this is- today there are three such icons (arrow icon) for three sections, but later there can be 10 such icon for 10 different sections one below the other, in that case later i will have to add 7 more click activity by indicating the icon in website( as they will have different locations but same icon)

Thank you again for all your help.

Hi @gabrielribas4, here is the question. Thank you for all your help.

Hey @Swati4 !! Here we go again!! This approach will be very similar to the one I wrote a few days ago here. I ask you to read and make the following substitution. You will identify a common attribute of these icons and will search for them in “Get Attribute”. Instead of “Check” activity You will have your “Click” activity. See if you can do it from this post, if it gets too complex, let’s try to do it together!!

Hey @gabrielribas4 . Thank you for your response, I tried this, but it did not work. It clicked on few other icons along with one of the arrows i wanted it to click in. So the icon is a rightward arrow in the website and we have more below it. The “type” when i inspected the icon in website shows as “button” so I had put if Res.equals(“button”), however it did not work as expected. The buttons are in below format:

Let’s say there is one Main heading:

:arrow_forward: Main heading

Once you click on Main heading arrow, below three subheading appear in below format:

:arrow_forward: Main heading

     ▶️sub heading
     ▶️sub heading
     ▶️sub heading

And each of these sub headinghave many names, basically i want to click on all arrows and expand them all, these arrows might keep on increasing in future, depending on how many sub headings are added.

Thank you for your help here.

Hi @Swati4

I think you can use find children here, and then you can apply a loop that will click on each sub heading.

Thanks,
Prankur

Sound!! It works!! But using “type” as “button” is too generic and must contain other elements with that property on the page. You can do two things to solve it!
1- Decreasing the scope in the “Get Children” activity can place a node immediately parent of these arrows.
2- You can look for a much more specific attribute for these buttons, which will not be repeated in another element on the page. You can also combine attributes. Use more than one activity and do type=button AND some=some.

Try it and tell me if works!