How to auto detect and click all same elements on webpage?

Hi every friend here. I met a problem when I tried to make a auto-download RPA program.
What I want to do is download all the files on a web page by click all the download button
I'm sorry, but I can't see the image you're referring to. Could you please provide a description or more details? (Captioned by AI)
elements on web. But it appears on several pages which means I need to go through every page and click all of them. The problem is the elements number is not fixed on different pages.

Is there any activities in Studio can help me locate all the download button elements on one page then click them one by one, then go to next page repeat same process?

@james-jw.wu

Welcome to the community

try using for each ui element activity to find all similar elements and click on them using click activity inside it by passing currentelement into it as inout argument

cheers

Hi @james-jw.wu

you can use the find children activity to get all the download buttons on the page then use a for each loop to click them one by one after that click the next page button and repeat the process until no more pages are left.

If helpful, mark as solution. Happy automation with UiPath