Data scrapping with Next button if exist

How should I scrap table structured data with next button if exist and if not . Sometimes more orders on the page so next button exist and sometimes few oredrs are there so no next button .

What things I can make dynamic here ?
Can anyone help me?

Hi

Hope theee steps would help you resolve this

—first let’s use a ELEMENT EXISTS activity, click on next button as a selector And get the output of boolean type which denotes whether next button exists or not
—now use a IF condition and mention as
ElementExists = True

If true it will go to THEN block where we can have one EXTRACT STRUCTURES DATATABLE which will use next button

If the condition is false it will go to ELSE block where we can have another different EXTRACT STRUCTURED DATATABLE activity which will not use next button

This will make the flow dynamic

Cheers @pari_patel

1 Like

Without next page, the page is look like this.
FYI… I am filtering orders on the page ( i have to findout unfullfiled orders as shown in pictures)

See below with next page.

FYI: Boolean not berify here because on this website, next and previous button gives same output.

Not sure but let me try with the logic you provided me. Thanks

The data scraping wizard/activities automatically take into account if the Next button doesn’t exist. You’ll just need to have multiple pages, so the Next button is there, when you set up the data scraping.

Currently I have only one page data ( filtered data on the page ) so Do I need to wait for that ?

I tried to scarp one page data then remove fileter and capture next button but it is showing me unfiltered data sometimes and sometimes only filtered data.

Add enough items to the list, or unfilter it, so that it shows the Next button, then do the data scraping wizard.

I used that logic so, sometimes it is working, sometimes it not works ( no next page , still it will fetch next page records woth remove filters ) .

How should I make it dynamic ?

It should automatically be dynamic. Is the “next” button always there, but sometimes greyed out or not clickable? If so, you’ll have to edit its selector so it is only found by UiPath if it’s an active button.

Next button will appear then only when there are more rows . If not then no ne t button option is there.

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