Navigating through a table in UI

uiautomation
activities

#1

Hi,
I have a scenario for which any help is much appreciated.

I have a table in a webpage. One particular column in that table has links (say column B). For each row in that table,i will have to go to column B, click on that link and perform some actions. I am familiar with ‘For each row’ activity when we are using an excel application. But how will i navigate through a table in a webpage.

sample image
image

Thanks in advance!!


#2

Hi @Krishna_Prashanth,

Use Find children activity to get all the button in the table.
After that use for each activity to loop through it.

Regards,
Arivu


#3

I was able to get all the buttons in the table, but when i use ‘for each’ activity to loop and ‘click’ activity to click on that link, i end up clicking the same link 3 times (refer sample screen). can you pls let me know what m doing wrong here

image


#4

Hi @Krishna_Prashanth.

If I were guessing, when you added your Click TD, you just selected from the page and it’s just looping through and clicking with the same selector. Instead of using the Find Children activity, you may be able to use Data Scraping. It allows you to include both the column name and the underlying link in the dt. You can then use that in your selector.

https://studio.uipath.com/docs/about-data-scraping


#5

Hi @Krishna_Prashanth,

Did you passed dynamic selector for click activity?

pass child in the Element properties

Regards,
Arivu


#6

I used the ‘find_descendants’ as my ‘scope’ in 'find children activity.
In ‘selector’,I chose the whole table and in ‘filter’ i have this “”

When i verified this with ‘writeline’ it aptly says the count is ‘3’. (as in,there are 3 links in the table)

I tried dynamic click, but when i use ‘child’ as my element in ‘for each child’ loop, it is just clicking the first link once. For the second ‘child’ or the second ‘link’ it is unable to find.


#7

can you share your xaml file


#8

Thank u for the data scrapping suggestion.
But, the selector returns only this

And the extract meta datafield,returns the first link value alone (this is expected since we point jus one link to it)

extract meta data -






#9

m unable to attach my xaml file. Says new user will not be able to attach file. If there is anyother way to share xaml file , maybe to ur gmail id…?


#10

@Krishna_Prashanth
Use DataScraping to extract the data and store it in a datatable
Then Use For each row
Take the selector for Decision element and check how it’s varying for each row
Then create a dynamic selector and pass into Click Activity inside Foreach row

Regards,
Mahesh


#12

When i used data Scrapping, the extract data part has the following tag for ‘Decision’ button.

image

this corressponds to first ‘Decision’ link in the table (see sample screenshot)
how do i create a dynamic selector and use it in ‘click’ activity?


#13

please post the selector for second decision , open the selector in uiexplorer and check the property of row then post that selector

Regards,
Mahesh


#14

Selector for first decision
image

Selector for second decision

image


#15

@Krishna_Prashanth
Since the tableRow is incrementing by one just create one integer inta and intialise it by 2
then
add this ‘"+inta.ToString+"’ in tablerow tag

Then after Click activity increment the value by one
inta=inta+1

Regards
Mahesh


#16

Thank you.