I can't extract several pages with the "Extract Data Table" activity

Hello,
I have a website with 63 pages for which I want to scrape some results. When I use the “extract data table” activity, I select the “next button”. When I run it, everything works fine. However, in my final Excel file, I only get the results for 2 pages. How do I do the rest of the pages?
Thanks in advance

Hi @Kiha1
Extract the data of each and every page by passing the variable counter dynamically in the selector in the while loop by incrementing it by using following steps

  1. Initialize a counter variable to keep track of the current page number. Let’s call it pageNumber and set its initial value to 1.
  2. Place the scraping activities, including the “Extract Data Table” activity, inside a “Do While” loop. This loop will execute as long as there are more pages to scrape.
  3. Within the loop, perform the following steps: a. Scrape the data from the current page using the “Extract Data Table” activity. b. Write the scraped data to the Excel file or any other desired output. c. Increment the pageNumber variable by 1.
  4. After scraping data from each page, you need to check if there is a next page. You can do this by using the UiPath “Element Exists” activity or by checking if the “Next” button is visible or clickable on the current page.
  5. If a next page is found, click the “Next” button using the appropriate activity to navigate to the next page. If there is no next page, exit the loop.
    Hope it helps!!

Hi @Kiha1
Please find below xaml for your reference
Data Table Use Case.zip (1.9 MB)

I hope it will helps!!

Thanks for your feedback!

I can’t find While or Do while, in my activities I only have For each which seems to be something like that.

Can you send me a photo of the scenario, I’m not sure I understand where to place the pagenumber variable and how to specify ElementsExists.

Thanks a lot.

Can you check if this works for you?

image

I could reproduce the issue with the site you’re using, and changing the input mode to “Simulate” did the trick for me.