How to Retrieve Pagination Data in Web Page Automation

Element Exists
Do While
Element Exists → isFound
If
then
Click ※Retrieved Data
Break
Else
Click (Next) ※Since there are multiple pages, if not found, go to the next page
Check App State
Loop

Using this flow, only one page can be turned while waiting for loading, and after that, it doesn’t proceed to the next page.
The data to be retrieved is on the last page, which is not displayed yet.

Is there a solution for this case?

Hello @Jimmy_Ji

Key issue is the “Loading Gap”

When you click “Next,” there is a split second where the old page disappears and the new page hasn’t fully rendered. Your flow likely checks for the “Next” button during this gap, thinks it’s gone, and stops.

Here’ the optimized flow:

  • Do While (True)
    • Check App State (Target Data)
      • Target Appears:
        • Click the data.
        • Break (You found it!).
      • Target Does Not Appear (Else):
        • Check App State (“Next” Button)
          • Target Appears:
            • Click (“Next”).
            • ADD THIS: Wait for Element Appear (Wait for a specific element that only appears on the new page, or wait for the “Loading” spinner to disappear). This forces UiPath to pause until the next page is actually ready.
          • Target Does Not Appear (Else):
            • (This means you reached the end of the site without finding data).
            • Log Message: “Data not found after all pages.”
            • Break.