Extract Datatable page number

Hi All,
How can i know which page am in for instance first or last page or “n” page from an extracted datatable using data scraping method.

Thanks in advance.

Hi @mozahra

There are different approaches to extract data using data scraping wizard.

  1. Directly use the data scraping wizard along with its page number tracking mechanism. This will be fully automated by the wizard. What happens here is while you configure the wizard along with the fields you specify to extract, it also asks you where to find the next page option. So when that’s configure and when you are running it, it will automatically do the extract and page change until the next page option is disabled or not visible. Basically it will run through all the pages. However in this option you will not be able to track the page number at a moment it’s in.

  2. Here data scraping is handled partially by the wizard and partially by how you configure the next page option. But you will need to manually configure the extract structured data activity to extract data from that particular page. Here how to change the page number depends on a different mechanism. You have to write a workflow that runs within a loop. Each iteration it changes the page incrementing the page number by one. And use a click activity on the next page to change the page in each iteration. After that, within the same loop have the extract structured data activity to extract the data in the page


@Lahiru.Fernando so if I understand you correctly the automated way can’t help to find the pages and hence the same for a Datatable?

Hi @mozahra

From the two points I described, if you use the first option you will not be able to get the page number to a variable because it is handled from the data scraping wizard internally. However if you use the second option I have listed here, then the page number is handled by your workflow, and the data scraping will happen only in that particular page you are in. So each time you can change the page number in the loop while keeping track of it and the data scraping will happen for each page separately within the loop. So if you wish to keep track of the page number which the data scraping is happening currently, second option would be the best approach :slight_smile:

1 Like

You can try getting the page number based on the row index.

Let’s say it’s standard in the website that each page contains 60 items and the row index is 61, you can divide the row index and round up.