How to work with java cells and tables
Starting with version 8, UiPath can work with Java tables in depth, scrapping data from rows or individual cells, iterating on columns and datatypes.
For our example, we will use the table from Configure Java -> Java tab -> View as you can find that with a common "Windows address" (selector) on every machine running Java.
Steps to automate
- Open Configure Java; go to Java tab; click View button
- You will see the list of installed java versions. You're free to add a new row for testing
- The robot will read the list of java versions existing, from the first column of the table
- This could be used for compatibility checks (of course, it's not the only way to check java versions)
- In the Activities panel, search for Find Children and drag it to the workflow / sequence
- Indicate which Java table you want to get information from. In our case it is the table of java versions from the settings. You can use UI Explorer or even easier, the Indicate on Screen button, to select the whole table element
- In the Properties view of the activity, add a filter to specify which column you are intersted in. In this case it is the Platform column
4. In the same Properties panel, set the output to be saved as a variable.
5. In the Activities panel, find the For Each element and drag in the workflow / sequence
6. Set the variable created at number 4. in the second field so you can cycle on it
7. In the Activities panel, find the Get Text element and drag in the workflow / sequence
8. In the properties view, set the Element as item and the Output -> Value as itemValue. This way you will extract the value from the UI cell.
You can view the example Java_tables workflow file