Resources

Knowledge Base

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.

Task

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.

2015-07-14_1915.png

 

Steps to automate

  1. Open Configure Java;  go to Java tab; click View button
  2. You will see the list of installed java versions. You're free to add a new row for testing
  3. The robot will read the list of java versions existing, from the first column of the table
  4. This could be used for compatibility checks (of course, it's not the only way to check java versions)

Solution

  1. In the Activities panel, search for Find Children and drag it to the workflow / sequence
  2. 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
  3. 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.

 

2015-07-15_1919.png

       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