How to use for each uielement activity?



is this implementation is correct to click all the veiw notice and orders button in this page, after clicking the view notice and orders button the page will navigate to new page, there im clicking the back button to get back to this page. this neeed to be repeated for all the buttons in this page. how to achive this, can anybody help me to achive this?

1 Like

Hi @Prabhakaran_Elango

Kindly look into the link

Check ou the thread

Regards,
Gokul

Hey,
Your sequence seems correct unless I misunderstand you. If CurrentElements are correct you are good to go.

You can check the documentation to get more information Activities - For Each UI Element

The button is not getting clicked in any of the iteration.

That’s the problem, refreshing the page breaks the object references originally pickup up by the For Each. What you should try is CTRL+click the orders button so the new page opens in a new browser tab. Then Use App/Browser to attach to that tab, do what you need to do, then close that tab. This maintains the object references on the original tab for the For Each.

Hi @Prabhakaran_Elango

I prefer below steps while working with for loops:
First count how many view notices/orders are present
Then loop using on index for each iteration click on the button with current index do actions as per your requirements .

Hope it works for you!
If yes make this as a solution solved

Its looks fine, when you are clicking make sure you open this in a new tab, if you just use click, it will break for each ui properties and you may face issues..

@Prabhakaran_Elango

please dont create multiple topics

please try the method below

cheers