How to iterate the row in browser?

Hi Everyone,
i want to iterate the rows and click each row of particular thing like below image i want to click "show ".


how to do that?

thanks in advance
krishnaredddy

Hi @krishnareddy
Follow the following steps.

  • Scrape the all data using Data Scrapping.
  • The data will be stored in Data-table Variable Lets say ExtractDatatable.
  • Use For Each Row and give the outout of Scrapping to For each row.
  • Get the Item Using row(YourRequiredColumnName).
  • Use Click Activity and make selector as dynamic Using the variables. there will be changes in the Selectors according to it make the selectors dynamic.
    Thanks & Regards

Hi @jitendra_123 thanks for ur response.
Here what i have to use inside the For Each…to get the item and wr i have to change selectors?
thanks & regards
krishnareddy

@krishnareddy
Can you show me the selectors of the multiple elements using UIExplorer.

@jitendra_123

what i have to use inside the For Each

Hi @krishnareddy

Try to use Find Children Activity where all the elements in table will be stored in List
and then use For each and Loop through each and every element

Regards,
A Manohar

@krishnareddy

Can you please share the selectors for the 3 shows in first 3 rows in the table?

Because I think you can use the count as variable in place of index idx = ’ " + count +" ’ and iterate through each row.

@krishnareddy
Can you show the selectors of another rows show. if the only Idx is changing then in for each row use Click activity and create a counter with Default value 1 and use this counter in place of 1 of index in the selector of click activity. after that Increase the counter by 1 so it will change the value according to our loop so you have to increase counter as Counter = counter+1.

@jitendra_123
image

@krishnareddy

Just before the click activity. Initialize Count as variable with default value “1” and type “int”.

Then use while activity with condition “count < finalcount” final count should be the max number of rows present on a single webpage.

And after all the things are done. Use assign activity as count = count + 1

Please try. This should work.

And if you don’t have the finalCount or the final count is dynamic Then, you can data scrape the table, which will give you datatable[ExtractedDataTable] variable.

Then use assign activity as given below:

finalCount(Type “Integer”) = ExtractedDataTable.Rows.Count

Cheers

@krishnareddy
As I said earlier Use Counter in Index of the Selector and remove the Tag from selectors.

Not Working…


@krishnareddy

Use While activity.

This will work. I have done the same process using While.

@AryanSingh Where Should i Create finalCount Var

@krishnareddy

U can use assign then directly use it like this. [Create finalCount before the while just after scraping the Datatable]

finalCount = ExtractDataTable.Rows.Count

Then use condition in the while activity like count <= finalCount

It should work.

Cheers

@krishnareddy
What error you are getting?

@jitendra_123

it stay in running mode only no error coming.