Hi Team ,
We have one scenario in our automation , We need to data scrap each page until end of the last page and put them in single excel sheet , Challenge is how to navigate to each page and put them single excel sheet .
Sometimes page Navigation button will not appear when date range data is in single page so table row is not constant.
Use a “While” loop to continuously scrape data from each page.
Inside the loop, use data scraping activities to extract data from the current page. You can use the “Data Scraping” wizard to select the data elements.
The scraped data should be stored in a DataTable. You can create a DataTable before the loop starts and use the “Append Range” activity to write the data into an Excel file.
If the “Next” button exists, use a “Click” activity to navigate to the next page.
The loop will continue to scrape data from each page and navigate to the next page until there’s no more data to retrieve.
After the loop is complete, use the “Append Range” activity to write the entire DataTable into an Excel file
Do While (ElementExists(“NextPageButtonSelector”))
Scrape data from the current page and write to Excel.
DataScrapingActivity(CurrentPageSelector)
Append the scraped data to the Excel sheet.
AppendToExcel()
Check if there is a "Next" button to navigate to the next page.
If (ElementExists("NextPageButtonSelector"))
Click("NextPageButtonSelector")
Else
Exit Loop