Data Extraction in Infinite Scroll

Hi Team,

I have a requirement where i need for errors in network of the website. I tried data extraction using scrolling in do while loop but datatable have the latest data after scroll but the data extracted before scroll is not adding.

@Madhups

Can you please elaborate

also it depends on the logic that you are using in while loop..you need to append the extracted data to a separate datatable as needed in the loop ..looks like you are rewriting the same datatable

cheers

Hi Anil, Yes i am using only one datatable variable that means it is rewriting the datatable after every scroll.like shown in the image i want to extract name, status,type and other details in the table and need to check for any error status codes. i am trying that using data table extraction inside the do while loop using mouse scroll.

Hi @Madhups,
This happens because each extraction after scrolling overwrites the same DataTable. The fix is to extract into a temporary DataTable inside the loop and merge it into a master DataTable using Merge DataTable. Initialize the master DataTable before the loop and use it after the loop so data from all scrolls is accumulated.

This is happening because each extraction after scroll replaces the same DataTable. If you want to keep all rows from every scroll, you cannot reuse a single DataTable directly.

Correct approach is to use two DataTables. Inside the do while loop, extract data into a temporary DataTable (dtTemp). After each extraction, append it to a master DataTable (dtFinal) using Merge DataTable or dtFinal.Merge(dtTemp). Initialize dtFinal before the loop and never overwrite it inside the loop.

After the loop ends, use dtFinal to check Status or error codes. Using only one DataTable inside the loop will always rewrite previous data, which is what you are seeing now.

@Madhups

as mentioned use merge datatable and after extraction merge the extracted data to a different datatable, that way you can get all the data

also if that info is needed instead of extract you have a download button on top which will download the data

cheers

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