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?
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
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)
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