I extracted a data table containing a Status column and a Reference column. The only clickable value in the table is the Status column. I need to click on it and access the item within that table. However, when I click on it, I get an error because there are multiple elements (in this case, four validated and one blocked). I need to access each element to extract the information. I have already tried creating an anchor and a fuzzy selector, but I am not able to do so. Does anyone have any ideas?
In the UI Editor, you’ll notice a tag named “idx”. Try to make the “idx” value dynamic and apply it in your Click activities.
here status and reference can be duplicate , so it might be throwing error for duplicate element, you can use idx within selector after comparing how idx is sequencing with your dt row number, with that you can click on each item.
Try this
Extract the table as a DataTable as dt and then use For Each Row in DataTable and inside the loop use a Click activity with a dynamic selector that uses both Status and Reference. Use tableRow attribut in UiExplorer and pass the {{rowIndex}} as index varibale from the loop.
You can use rowIndex = dt.Rows.IndexOf(row) + 2 because tableRow usually starts at 2 for the first data row.
Cheers
Hi @Kanael
Can you show the selector of status column row.
Make the ‘idx’ tag name dynamic.
Assign a variable of Int type as 1 and use for each activity. Add the click activity inside for each activity. In click activity change selector tag name idx = {counter}
Thanks!!
Hi @Kanael,
Best way to handle clicking each status item in your table when duplicates exist is to first create a unique identifier by combining status and reference columns in your DataTable, then use that identifier to build a more precise dynamic selector that anchors on unique visible text or related container elements; remember one more thing, programmatically scroll to bring each item into view before clicking, if selectors remain unreliable, UiPath’s Computer Vision activities offer flexible alternatives.
Hope it works for you
Step 1: Identify a Parent Selector
- Use UI Explorer to capture the entire table (or tbody/div that contains all rows).
- Get a selector for the parent container — something like:
-
Add Find Children activity and target the parent table selector.
-
In Filter use
<webctrl tag='td' />or whatever matches the Status column cell. -
You’ll get a collection of UIElements — one for each Status cell.
Step 3: Iterate and Click Each Status -
Use For Eachactivity over the result of Find Children.
-
Inside the loop:
- Use Click activity with Element property set to the current item.
- Extract the details you need from the page.
- Go back (if needed) to return to the table and continue with the next item.
Good morning/afternoon, everyone,
After much trial and error, I decided on the following approach:
1 - Extract the table
2 - For each row
3 - Simulate a click (here I added an anchor) I click on the current text of the item, but looking at the anchor
Thank you all very much for your help and tips (I am new to this process).
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
