Extract text from web pages on the Internet Explorer and standard Windows controls using the Get Text component in RPA Desktop Design Studio.

Before you begin

Role required: none

About this task

The properties of the Get Text component are common with other Actions UI components, to configure these properties, see Properties of Actions (UI) components.

Procedure

  1. In the Toolbox pane, navigate to Actions (UI) > Get Text.
  2. Drag the Get Text component to the Design surface.
  3. In the Get Text component, click the camera icon (Camera icon.).
    The Press "CTRL+SHIFT" for selection message appears.
  4. Press the Ctrl + Shift keys.
    The mouse device turns into a crossover icon (Crossover icon.).
  5. Drag the mouse device over the application to capture the area where you want the component to perform an action and release.
    The selected area is captured as an image in the Get Text component.
  6. Drag the green plus icon (Green plus icon.) over the captured image and place in the location where the component will perform an action.
  7. (Optional) Add an anchor to the captured image by doing the following actions:
    An anchor is a unique identifier that enables the Get Text component to identify the application where the component will perform an action. Although adding an anchor is a good approach, it's optional. If you don't add an anchor, the Get Text component treats the whole captured image as an anchor. To know more about an anchor, see the steps to use the Anchor.
    1. In the Get Text component, right-click the image, and click Add Anchor.
      The anchor appears as a yellow rectangle with red borders.
    2. To identify the part of the image for the Get Text component, drag and place the anchor at the unique location on the image.
      Tip:

      To change the dimensions of the anchor, position the mouse device along the edge of the anchor until the mouse device turns into a diagonal two-sided arrow (Two-sided arrow.) and then drag the anchor.

  8. (Optional) Capture alternate images by doing the following actions:
    Alternate images prevent an execution failure when the Get Text component doesn't find the image that was captured first. In that case, the Get Text component then searches for alternate images to execute. You can add as many alternate images as you need.
    1. In the ALTERNATE IMAGES window, click the add image icon (Add image icon.)
    2. Click the camera icon (Camera icon.).
      The Press "CTRL+SHIFT" for selection message appears.
    3. Press the Ctrl + Shift keys.
      The mouse device turns into a crossover icon (Crossover icon.).
    4. Drag the mouse device over the application to capture the area where you want the component to perform an action and release.
      The selected area is captured as an image in the ALTERNATE IMAGES window.
    5. Drag the green plus icon (Green plus icon.) over the captured image and place on the location where you want the component to perform an action.
    6. To close the ALTERNATE IMAGES window, click OK.
  9. (Optional) To configure the ways that the output fields show the output, see Configure output port properties.
  10. (Optional) Connect the data and control ports of the Get Text component to the corresponding ports of the other components as described in the following table.
    Port type Port name Data type Purpose of connection
    Data out Extracted Data String Returns the extracted text.
  11. (Optional) To test the component, right-click the component bar and then click Run From Here.

Example: Extract a line of text from a window and display with the Show component

Extract a line of text from a window and display with the Show component.

The Get Text component extracts the text "The world works with ServiceNow" and passes the text through its Data Out port to the Show component (To use the Show component, see Use the Show component). The Show component displays the same text in a pop-up window.