I have to type values in a table(grid) in a webpage. How do I type into n number of lineitems?

Lets say there is a div of class(1) which is the table, div of class(2) indicating the line items excluding the header, div of class(3) indicating the whole row of a line item and div of class(4) indicating the div where i want to type my value. Now how do I type into n number of line items using selector concept in UiPath?

1->class

2->class

3->class

4->class
image

@companir

Ideally if it is a table…then you would have tabelrow and tablecol properties which you can leverage to select each cell of the table

And can be little wlaborate if this does not hep as the question is little unclear on what the classes are doing

Cheers

Lets say the webpage is in this format
image

Here div1 indicates the whole table, Inside div1 we have another div called div2 which indicates the lineitems apart from the column field names, inside div2 we have 2 more divs(div3) for the 2 rows(2 lineitems), and to get the specific cell we have another div(div4)

So,
div1 → whole table
div2 → only lineitems apart from field labels
div3 → a specific row(In our case we have 2 lineitems so there are 2 div3’s)
div4 → specific cell in the row where we have to enter the data

1 Like

Unfortunately the lineitems are not in a table tag format(HTML) but in a nested div format

@companir

Then your aelector should look like this(if class is not identifying the table the first line …then use any other attribute which is unique for the first level div)

<webctrl tag=‘DIV’ class = ‘somereliableattribute’ />\\(have a unique attribute to ifentify this div)
<webctrl tag=‘DIV’ class = ‘class2’ />\\class can be removed as well if there is no other dic as same level)
<webctrl tag=‘DIV’ class=‘class3’ idx = ‘2’ />\\(this will technicaly get second row as udx is 2..use a varible in place of 2 to use in loop or so)
<webctrl tag=‘DIV’ class = ‘class4’ idx=‘3’ />\\(this will give 3rd column …as previous idx is 2 ..so second row third column is fetched. Here also variable can be used)

This gets second row third column

Hope this is clear

Cheers

Tried but was not able to validate the selector

@companir

Then that means …your selector is not unique with the class…first go line by line…and add more lines…try spying table first and get reliable…on top add rows etc

Cheers

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