Downloading documents on different pages

Hello everyone,
I’m having trouble finding the solution to download documents.
As the image shows, I have this case that I have 10 items to download on the first page, on the second plus 10 and on the third 2 items only, but this is variable, there may be a number of different pages. The download is being done, extract to a table and put the counter, but when it finishes the first 10 he needs to click next and download the items on the next page, but the items are not always set to ten to use do while . I don’t know if I was clear, but what I need is to download documents from all pages considering this variation

1 Like

Hey @KMota,

I can guide you through an approach,

  1. You need to set two counters - FileCounter, PageCounter. Initialize both counters as 1 & don’t set any max limit.

  2. Do an Element Exists for Page - By passing page counter dynamically to the page number element selector. If it is present initialize file counter to 1 you will proceed to #step3 else break.

  3. Do an Element Exists for File - By passing file counter dynamically to the file element selector (may be in the idx attribute). If it returns true meaning file is present proceed to #step4 else Increment page counter & go to #step2

  4. Download and process file & Increment file counter and go to #step3

Hope this helps.

Let me know for queries.

Thanks :slight_smile:

Thank you, I will test and see if I have any questions
thanks for the help

1 Like

I did something like that using the extract datatable activity.
1 - I used extract datatable.

2 - I put the extracted table in a for each row.

3 - I used the click text activity inside the for each row saying that it has to click on row.Item (0) that would be the first field in the table.

4 - I modified the CursorPosition property of the click text activity to click the download link instead of the name of the first field.

1 Like