Pre-General Availability: 2024-09-02

Add a List Action

The list action interacts with a list, such as by selecting, deselecting, or getting the value of one or more items.

Use Cases

This action has specific requirements for the page's underlying HTML code.

You can use this action only when a UI element has a web element of select. For drop-down and multi-select lists, the HTML code might wrap the select element in an option element.

Add a List Action Using the Recorder

  1. 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.
  2. Start the recorder.
    1. On the canvas, select the action that you want to record after.
    2. On the toolbar, select Record after the selected action Record after the selected action.
    3. In the Smart record panel, open the Select browser tab to target drop-down, and select the application that you want to work in. You might need to scroll down to find the application.
      If the application doesn't appear in the list, close the Smart record panel, open the application in another tab, and start the recorder again.
      A splash screen appears, and then the RPA Smart Recording panel appears.
    4. Select Begin Recording.

      The Smart Recording window appears in the lower-left corner of your browser. Additionally, your mouse cursor can now target elements in the user interface.

      The Smart Recording window says Targeting. The window contains two buttons: Pause and Stop

  3. Identify the element in the user interface that the robot needs to interact with.
    1. Point to the list that the robot needs to interact with, but don't select the list 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.

      The box for a single-select dropdown list is shaded purple, and a magnifying lens icon appears above it

      The box for a multi-select dropdown list is shaded purple, and a magnifying lens icon appears above it

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

      The box for a single-select dropdown list is shaded green, and a target icon appears above it

      The box for a multi-select dropdown list is shaded green, and a target icon appears above it

      For more tips, see Quick Start for Building Robots.

      The Smart Recorder panel appears with details about the element you selected.
    3. Review and update the fields as needed.
      • Name: Enter the name of the target. This text appears on the robot action in the canvas and in the list of targets that are in the robot.

        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.

      • Target name: Review the XML Path Language, or XPath, for the element that you selected. Underscores (_) appear in place of invalid characters. You can update the value, if you want.

      • Action: Select how the robot interacts with the list.

        Option Description Selection list type
        Get Selected List Label

        Get the HTML label attribute of the selected item in a list.

        If no items are selected, the robot returns an empty value.

        Single Selection List
        Get Selected List Labels

        Get the HTML label attribute of each item that is selected in a list.

        If no items are selected, the robot returns an empty value.

        Multiple Selection List
        Get Selected List Value

        Get the HTML value attribute of the selected item in a list.

        If no items are selected, the robot returns an empty value.

        Single Selection List
        Get Selected List Values

        Get the HTML value attribute of each item that is selected in a list.

        If no items are selected, the robot returns an empty value.

        Multiple Selection List
        Select From List By Index

        Select one or more items in a list according to the HTML index attribute that you provide.

        The indexes of list options start from 0. That means that the first entry in the list is numbered 0, the second entry is numbered 1, and so on.

        Single Selection List

        Multiple Selection List

        Select From List By Label

        Select one or more items in a list according to the HTML label attribute that you provide.

        Single Selection List

        Multiple Selection List

        Select From List By Value

        Select one or more items in a list according to the HTML value attribute that you provide.

        Single Selection List

        Multiple Selection List

        Unselect From List By Index

        Deselect one or more items in a list according to the HTML index attribute that you provide.

        The indexes of list options start from 0. That means that the first entry in the list is numbered 0, the second entry is numbered 1, and so on.

        Multiple Selection List

        Unselect From List By Label

        Deselect one or more items in a list according to the HTML label attribute that you provide.

        Multiple Selection List

        Unselect From List By Value

        Deselect one or more items in a list according to the HTML value attribute that you provide.

        Multiple Selection List

    4. For Save to, specify where to save the text that you get from the field. You have the following options:
      • Assign the value to a variable.

        1. Click within the Save to field, and select Variables Variables.

          The Variables panel appears.

        2. Determine whether the variable that you need appears in the list. If not, create it. See Create a Variable.

        3. Select the variable to assign the value to, and drag it to the Save to field.

      • Assign the value to a property of the output property.

        1. Click within the Save to field, select More options, and then select Output Flow Input/Output.

          The Input & Output panel appears.

        2. Select the Output tab.

        3. Determine whether the output property that you need appears in the list. If not, create it. See Create a Trigger's Input or Output.

        4. Select the output property to assign the value to, and drag it to the Save to field.

    5. Select Save.
  4. Choose the appropriate next step:
    • Add another action using the recorder.

      See Add an Action to a Robot.

    • To pause the recorder so you can figure out your next steps, select Pause Pause in the Smart Recording window in the lower-left corner of the browser.

    • To stop the recorder and return to the canvas, select Stop Stop in the Smart Recording window in the lower-left corner of the browser.

      If you close the application that you're recording in, you can still stop the recorder. Select Stop Stop in the toolbar of the canvas.

    • To customize the action you just added, such as by creating validation or identifying the screenshots to capture, stop the recording, double-click the action on the canvas, and update the action as needed.

      All actions are read-only until you stop the recorder.

  5. Above the canvas, select Save.

Add a List Action Using the Low-Code Tools

  1. 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.

  2. 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 List.

      A List action appears on the canvas, and the List panel appears.

  3. 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.

  4. From the Selection List Type drop-down, select the type of list that the robot interacts with.
    Option Description
    Single Selection List

    The list allows you to select only one option.

    If the robot will select only one option, but the list allows multiple items to be selected, select Multiple Selection List instead.

    Multiple Selection List The list allows you to select one or more options.
  5. From Operations, select how the robot interacts with the list.
    Option Description Selection list type
    Get Selected List Label

    Get the HTML label attribute of the selected item in a list.

    If no items are selected, the robot returns an empty value.

    Single Selection List
    Get Selected List Labels

    Get the HTML label attribute of each item that is selected in a list.

    If no items are selected, the robot returns an empty value.

    Multiple Selection List
    Get Selected List Value

    Get the HTML value attribute of the selected item in a list.

    If no items are selected, the robot returns an empty value.

    Single Selection List
    Get Selected List Values

    Get the HTML value attribute of each item that is selected in a list.

    If no items are selected, the robot returns an empty value.

    Multiple Selection List
    Select From List By Index

    Select one or more items in a list according to the HTML index attribute that you provide.

    The indexes of list options start from 0. That means that the first entry in the list is numbered 0, the second entry is numbered 1, and so on.

    Single Selection List

    Multiple Selection List

    Select From List By Label

    Select one or more items in a list according to the HTML label attribute that you provide.

    Single Selection List

    Multiple Selection List

    Select From List By Value

    Select one or more items in a list according to the HTML value attribute that you provide.

    Single Selection List

    Multiple Selection List

    Unselect From List By Index

    Deselect one or more items in a list according to the HTML index attribute that you provide.

    The indexes of list options start from 0. That means that the first entry in the list is numbered 0, the second entry is numbered 1, and so on.

    Multiple Selection List

    Unselect From List By Label

    Deselect one or more items in a list according to the HTML label attribute that you provide.

    Multiple Selection List

    Unselect From List By Value

    Deselect one or more items in a list according to the HTML value attribute that you provide.

    Multiple Selection List

  6. On the Input tab, specify input details for the action.
    1. In another browser window, open the application that the robot needs to work in.
    2. In the robot, click within the Locator 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 list that the robot needs to interact with, but don't select the list 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.

      Regardless of the operation that you chose, always point to the list itself.

      The box for a single-select dropdown list is shaded purple, and a magnifying lens icon appears above it

      The box for a multi-select dropdown list 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.

      The box for a single-select dropdown list is shaded green, and a target icon appears above it

      The box for a multi-select dropdown list is shaded green, and a target icon appears above it

      For more tips, see Quick Start for Building Robots.

      The recorder enters a value in the Locator 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.
  7. On the Input tab, specify whether to capture any screenshots as part of the action.

    See Capture Screenshots in Robots.

    If you choose an operation that gets a label or value, Oracle recommends taking a screenshot of the list.

  8. On the Output tab, specify where to save the value(s) that you got from the action.

    The Output tab appears for only some operations, including Get Selected List Label(s) and Get Selected List Value(s).

    • Assign the value to a variable.

      1. Click within the Save to field, and select Variables Variables.

        The Variables panel appears.

      2. Determine whether the variable that you need appears in the list. If not, create it. See Create a Variable.

      3. Select the variable to assign the value to, and drag it to the Save to field.

        If the action interacts with a multiselect list, you must select a collection variable, even if the operation gets a single value. If the action interacts with a single-select list, you must select a non-collection variable. Otherwise, an error occurs for the action when you save the robot.

    • Assign the value to a property of the output property.

      1. Click within the Save to field, select More options, and then select Output Output.

        The Output panel appears.

      2. Determine whether the output property that you need appears in the list. If not, create it. See Create a Trigger's Input or Output.

      3. Select the output property to assign the value to, and drag it to the Save to field.

        If the action interacts with a multiselect list, you must select a collection variable, even if the operation gets a single value. If the action interacts with a single-select list, you must select a non-collection variable. Otherwise, an error occurs for the action when you save the robot.

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