How can I click on every row on a HTML table (rows, I want to click on the text on each row to “activate” the current row)? I can do this either while going through the table or doing them all in a bulk-manner after scraping the table data. Doesn’t matter.
I have tried to use “For each row in Data Table” and then using OCR click on text with CurrentRow.Field<string>("Column name"), but the OCR just keeps timing out.
Since UiPath does collect the table data to the datatable so nicely, I was thinking that there must be a sophisticated way to click on all the elements (for example column #2 for each row) so that I could activate each row while traversing the table. Could this forum help me here?
Thanks for the reply. Unfortunately I cannot find a click activity selector. Under click’s “Target” property however I can find Fuzzy Selector and Window Selector. If I change the “Native Text” to str_variable (CurrentRow.Field(“Name”)) as you pointed above, it will only give errors
“Error ERROR Validation Error Target is not valid because no targeting methods are enabled. Main.xaml”
I can find “Selector” field from under the Click activity’s “Target” property. Is this what we are looking for? Now it is null, but it would require some C# variable? However, I cannot find a “Selector” activity from the activities list.
Thank you very much @supriya117 ! I got it working now.
Now there’s only one thing left:
The extracted table data seems to miss a whitespace from the table cell string. When looking at the table from browser, the cell in question has an ID and then a document name followed by the ID in following format “ ”, for example “78123 Test Document” However, the aaname and innertext have two whitespaces between the ID and document name, whereas the extracted data and what the user sees when browsing only has one whitespace. For example:
“78123_Test Document”
vs
“78123__Test Document”
(spaces replaced with _)
How can I either change my table extraction rule or click target activity rule so that they would always match 100%?
My table extraction rule is currently:
extract metadata:
The element “text” actually seems to have 2 spaces in it. So it seems like the “Extract table data” actually removes one space from the attribute before storing it. Is this what happens really or am I just missing something?
With UI Explorer’s Property Explorer I can see that there is a property named “visibleinnertext” which has one space only! Choosing this as the click target worked! Thank you a lot everyone!