I’m trying to loop through an unknown number of pages, performing one function effectively per page. The function is to download a set of files by a click sequence, then paginating. There is a “Next” button, so this isn’t the issue. I’ve tried For Each, which works by selecting each individual file to download, but is incredibly slow and I want to use the page’s download all function on each page. So For Each doesn’t seem to work or I haven’t figured out how to configure it to do it for just one group download. When I tried For Each for the clicks desired it incorrectly identified other boxes on the page beyond the one I want and errors. Suggestions on how to loop where functions are click sequence then paginate?
I suspect that the problem here is with the selectors you are using not being precise enough for the ‘Download All’ button as they are clicking other buttons instead. Other than that I think you are on the right track using a loop, you may want to consider using a While or Do While instead depending on how you manage the loop stopping. Either way you should be able to use a loop with a click or clicks to download all the files, then click next button, which will loop back to the beginning
Thank you, correct on selector precision. I was finally able to get it to work. I still used For Each, but had to reconfigure the selector. Eventually had loops within loops within loops. Since almost no matter what I did in reconfiguring the Selector it still hit the back page button when next page button wasn’t available, I used a While also for the pagination where I scraped the total pages, converted to integer and paginated until hit the correct number and then sent to the next larger loop (3rd level loop with entering date ranges).