Pre-General Availability: 2024-09-02

Add a Get Text Action

The get text action collects a value from a user interface and then assigns the value to a variable or an output parameter.

Use Cases

Consider a scenario in which a robot must verify that the invoice totals in a report are identical to the actual totals of the invoices.

After the robot uses the get text action to obtain the total of each invoice, you can take the following actions:

  • Report the actual total of each invoice: To complete this task, assign the value for an invoice total to an output parameter.

  • Complete additional processing on the invoice totals: To complete this task, assign the value for an invoice total to a variable.

Add a Get Text Action Using the Recorder

Consider creating any robot resources that the robot action will use, such as variables or a trigger's input and output. If you choose not to create them in advance, you can pause the recorder and create them as you build.

  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 field from which the robot needs to click a UI element, but don't select the element 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 text box with numbers in it 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.

      A text box with numbers in it 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.

      • Element: Review the HTML element that you selected. If you selected the wrong element type, select Discard in the panel, and select a different element.

      • Action: Select Get Text.

    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 Get Text 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 Get Text.

      A Get Text action appears on the canvas, and the Get Text 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. 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 field from which the robot needs to get text, but don't select the element 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 text box with numbers in it 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.

      A text box with numbers in it 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.
  5. On the Input tab, specify whether to capture any screenshots as part of the action.
  6. On the Output tab, 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 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.

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