To check if there is a next row/item through web browser

Hey all,

I want to check if there is a next row/item through web browser
if present then process it (perform some activities)
if not present then stop

Is there any activity to check if there is a next row/item.

Any advice on how to get the desired solution?

Thanks in advance

Use the data scraping tool in studio to extract the datatable from the web browser.

Next, use the for each row activity to loop through each row. The for each row loop will automatically stop when there are no more rows, regardless of if you have 1 row or 100000000000 rows.

Hey @Dave,

Tried that.
its not giving me the desired output in data table.

The table in web browser has:
A1 A2 A3
aa bb cc

where A1, A2, A3 are as columns
and aa, bb, cc are rows

The output in the Data scraping is:
A1 A2 A3
aa aa bb bb cc cc

any suggestions?

So it is duplicating the information? So each row has exactly twice the amount of columns you would expect?

If so, you will just need to do some data cleanup after extracting the data. I would use a for each activity (change the TypeArgument property to and in the loop I’d alternate skipping the column, then delete the column. That would remove all the duplicate columns. Then use the for each row to loop through all the data


I was trying with some clean up approach.
Is this possible without data scraping?

Thanks in advance!

It’s impossible to be sure because I don’t have access to the website, have never seen it, and have no other description about it besides “I want to check if there is a next row/item through web browser”

It is up to you to determine the best way to get the data from the website. Usually i’ve found the data scraping wizard to be the best with minimal changes, although sometimes you need to mess around with the properties or selectors a bit to get the right data. One of the most important things as an RPA developer is learning which selectors to use and how to extract the correct data from a variety of sources. Each source is unique, so it is up to you to determine how (if possible at all) to get that data in a reliable way

Hello Ray,
In this video I filter the text in multiple ways to have a perfect format for Generate DataTable (maybe this will help you):

30:30 Generate DataTable
33:00 Filter data for multiple fake spaces before Generate DataTable
38:20 Filter data with multiple spaces inside of column
Cristian Negulescu