Need Help to Navigate Pages with Dynamic Pagination and Download Files

Hello everyone,

I’m working on a project where I need to download files from a website. Here’s the situation:

  1. Each page contains 10 files that need to be downloaded.
  2. For each file, I need to update the file path dynamically based on the current time and two other variables.
  3. The total number of pages is unknown.
  4. After page 10, I need to click on 3 dots to access pages 11-20. Similarly, after page 20, I need to click 3 dots again to access pages 21-30, and so on.

Currently i am extracting the table for each page and then using the rows count method i am getting the number of files present on each page(in case of last page , the number of files will be less than 10, last page is unknown so have to follow this logic.) So basically i am able to download all files from a page jsut facing issues while navigating to next page.

My question:
Is there a simpler way to handle this kind of task in UiPath, without relying on multiple if and while loops?

Any suggestions or best practices for managing dynamic pagination like this would be greatly appreciated!

Hi @Ankit_Kumar2,

In my view, you are doing the right approach.

What is the issue you are facing in navigation to another page?

Regards
Sonali

1 Like

@Ankit_Kumar2

For each ui element with next page click should suffice

Cheers

1 Like

Thanks for the response, the issue I am facing is handling navigation to the next set of pages (e.g., 11-20, 21-30) after clicking on the 3 dots, as the total number of pages is unknown.
I want a good method to do this like is it possible to extract all pages data into a single table without moving to different pages… or some other better approach.

Hi @Ankit_Kumar2,

There few other ways to extract the all data but I don’t think that would work in your case as you just don’t need to extract data but download different files shown in those rows.

To handle the issue for 3 dots, I think you can do following:

  1. enable a check to see if 3 dots available, if yes then only click on 3 dots.
  2. now when you are navigated to next set of pages you won’t know how many pages are there, so in this case, enable a check to first see if next page available, if yes then only click else nothing.
  3. for these page numbers, I believe there would be a pattern in their selectors. You just need to find that common attribute that is changing in these selectors and using that you should be able to check if next page selector exists or not.
    For e.g sometimes their aaname itself will be the page number or may be table row or table column value is changing for those page numbers. Define that attribute as a variable and before clicking in next page selector, check if it exists.

This should help fix the issue.

Regards
Sonali

1 Like

Thank you, @sonaliaggarwal47, for taking the extra time to help in resolving my query.

There are already several conditions applied, and I am trying to reduce the no. of conditions to avoid complexity. For ex. after clicking the search button, the automation checks whether the table data is available or not. If available, it then checks for the next page and then 3 dots, and also for the number of files on the page.

As I have already mentioned in my post, “Is there a simpler way to handle this kind of task in UiPath, without relying on multiple if and while loops?”

UiPath is always evolving with new features, so that’s why I was exploring if there’s a better approach to simplify this part of the process.
Thanks again.

Hi @Ankit_Kumar2,

Have you tried extracting using table extraction wizard?

Regards
Sonali

1 Like

Yes but it is not working for all pages, need to give next page button and if i treat dynamic page number as next page button then it will be the same thing… checking the page number then 3 dots.

Hmm… makes sense!

I think, whatever you are doing currently might be the only option given the points we have discussed so far.

I don’t recall any else way to solve this problem statement differently.

I am sorry my brain says - That’s all from my end :slight_smile:

Regards
Sonali

1 Like

Thanks for the help! I also couldn’t find a better solution, so I developed the logic using a while loop and multiple conditions. :smiling_face_with_tear:

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.