For each ui-element and click

hi

I’m using ‘for each ui-element’ on a website, where the automation needs to click on a button per ui-element, the elements are on the same page and the button looks exactly the same for all elements, so the robot needs an anchor, in this case I can only use a name because that’s the only different thing in the ui-element. That is where things go wrong, every time i start the automation the robot cant find the button because there is a different name. Does anyone have any idea on how to fix this?

i need to it to click on the blue button.

Hi @Stef_Cox ,
First Try to find the button elements inside the control (let’s a div or table in your page containing the buttons) using FindChildren activity - Filter Property set to tag as Button/Submit - Scope as Find children/Find descendants whichever works to extract the buttons.
Then after fetching the button collections, use for each uielement and loop through the collection obtained from first property and use a click activity inside the loop with input element as the btn ui element (each loop item).

Thanks and Regards,
Geetishree Rao

thank you so much, it does indeed work now