Pre-General Availability: 2024-09-02

Add a Define Web Table Action

The define web table action allows you to identify the columns in a table that you are interested in. After you add a define web table action, you can add more actions, depending on the work that the robot needs to complete for the table.

Use Case

Consider a table that contains invoice numbers in one column and a hyperlink in another column. You can add a get text action to get the invoice numbers and a click element action to click the link. Use a foreach loop to iterate on multiple rows of data.

You can use the read data table action only for a UI element that is coded as a table.

Output of the Action

The define web table returns an output: A collection of HTML table rows for the columns that you select. Each row consists of key-value pairs:

  • The key is the column name.

  • The value is the xpath of the corresponding row cell.

    You can use the xpath later, such as in a get text or click action.

Add a Define Web Table Action:

Note:

You must use the low-code capabilities to add this action to a robot. Keep reading for step-by-step instructions.
  1. Verify that the table in the application is coded as a table element in the page's HTML.

    For help understanding the HTML of a page, see View the HTML Code for a Page.

    If the table was coded using div elements and the page's CSS transforms the content into a table, you can't use this action. Instead, use the get text action and save the individual values as a variable collection. See Add a Get Text Action.

  2. Open the robot to edit.
    1. In the navigation pane, select Projects.
    2. Select the project name.
    3. In the left toolbar, select Robot Robot.
    4. In the Robots box, select the robot to open.

      The canvas appears.

  3. Add the action to the robot.
    1. On the canvas, point to an action, and click +.
      A mouse cursor points to an action in the canvas and hovers over the plus sign button, which appears at the bottom of the rectangle that represents the action. A plus sign button also appears at the top of the rectangle, for adding an action after the current action.

      A menu of available actions appears.

    2. Select Define Web Table.

      A Define Web Table action appears on the canvas, and the Define Web Table panel appears.

  4. In the panel, enter a Name and Description for the action.

    The Name appears on the action in the canvas and should help you and others understand the goal of the action.

  5. On the Input tab, identify the first column of data that the robot must interact with.

    Remember that the first column that the robot interacts with might or might not be the first column in the table. In the define web table action, you don't need to identify every column in the table. Instead, just identify the columns that the robot interacts with.

    1. In another browser window, open the application that the robot needs to work in.
    2. Click within the Header field, and select Target a page element Target a page element.

      The Target a page element panel appears.

    3. In the Target a page element panel, open the Select browser tab to target drop-down, select the application that you want to work in, and select Go. You might need to scroll down to find the application.

      The application that the robot needs to work in opens.

    4. In the application that the robot needs to work in, point to the header of the first column that the robot needs to interact with, but don't select the column header yet.

      For example, do not select the UI element while the magnifying lens icon appears and the field is shaded purple. The recorder is still collecting information about the UI element.

      A table header is shaded purple, and a magnifying lens icon appears above it

    5. After the icon changes to a target, the shading turns green, and the mouse icon changes to a hand, select the UI element.

      x

      For more tips, see Quick Start for Building Robots.

      The recorder enters a value in the Header field in the robot.

      Tip:

      Your settings determine whether Oracle Integration reuses targets for previously selected UI controls. You can override this setting, if needed. Reusing a target offers benefits. For example, you can update a target one time, and all robots that use the target get the update.
    6. Click within the Row 1 field, and repeat the previous steps to target the first row in the column to target.
    7. Click within the Row 2 field, and repeat the previous steps to target the second row in the column to target.
  6. If the robot must interact with one or more additional columns in the table, identify the additional columns on the Input tab.
    1. Select Add Install icon.
    2. Repeat the previous steps to identify the header and first row of the column that the robot interacts with.
    3. Add more columns as needed until you've identified all the columns that the robot interacts with.
  7. On the Output tab, review the variable name that the table information is saved to.

    The define web table creates a custom data type and variable. The properties of the data type are the columns that you identified in the define web table action. The variable is a collection of the data type that the define web table action created.

  8. On the Pre Validate and Post Validate tabs, specify whether to complete any validation before and after the action.
  9. Click OK.
  10. Above the canvas, select Save.

Your next steps depend upon your goals:

  • To iterate over the records in the table, add a foreach loop.

  • To record the values from the table to the activity stream, add a log action.

  • To view the data type or variable that the define web table action created, select Data types Data types or Variables Variables on the toolbar in the canvas.