How to loop a web table?

Hello friends of the Uipath forum

I have the following query, I hope you can guide me.

I have to loop in a table and click on a magnifying glass icon, how can I do that?

I have to click on the “Historico” column, which is where the magnifying glass is for each of them.

with ui explorer it brings me this if I select the icon

image

Hi @Ivan_torres_oliva

You can try in two ways .

  1. Using data Scrapping Approach

This approach may be faster if it is possible to scrap the link associated with magnifying glass icon.
Using data Scraping scrap all details including the Total, Htistorica (Like there are links associated with the magnifying glass icon which would direct to the page same way when u click the icon), after scrapping store in datatable. Then loop through the each rows of datatable and open each link associated with each row using browser activity.

  1. Using counter in selector

As per the selector shown by in the query, There is a attribute called table Row=‘3’,

So first what u need to do is , click on first icon and find the value of table Row attribute when clicked on first glass icon, lets say if it is 3, next glass icon will have values 4,5,6 etc. so u can put click activity in a loop by incrementing the counter variable by one and end of each iteration.(Initialize it value of when of table Row attribute when u click on first icon.)
then put the counter variable in selector so that it click on the required icon.

Please make sure that there are no other attributes in selectors which keeps varying

Hope the above information helps you

Regards

Nived N

Happy Automation

I think the second option would be the best since I tried the first one but it doesn’t bring me any link to go to the internet but how could I do option two, will you have an example?

Can u share the link where i can provide u the xaml file for this?

no, I couldn’t as it is confidential information :frowning:

I tried this but it fails


in the image click, in the selector I put my variable counter
image

This is the error
image

Did u intialise the contador variable?

@Ivan_torres_oliva

Use selector like this way


Also initialize the value of Contador as @NIVED_NAMBIAR said.

Regards
Anand

1 Like

Hello what I would like to know:
I have a process which first logs in with a username and password, and once inside what it does is the extraction of the table where I have put the counter in the tablerow, I would like that when there is an exception and web closure, continue through the counter number by which it was

Hi @Jose_Rodriguez_Rodriguez
i did not understand by exception and webclosure ?

I have a database with users, within the web you log in with each one of the users and in a datatable you download the corresponding files, you add the counter in the idx to go through the table,
´
What I want is that if there is any error, it is that it continues through the row of the data table that it was going through