GetText

The GetText component enables extraction of text from webpages and standard Windows controls such as Textbox, Listbox, and Drop-down box. GetText component can also be used to get the status of check boxes and radio button controls.

Screenshot

Note

For web applications, the GetText component extracts only text from webpages displayed in Internet Explorer.

Ports

The GetText component exposes Control In, Control Out and Data Out port by default.

Port Description
Control In Must be connected to the Control Out port of one or more components.
Control Out Can be connected to the Control In port of any other component or connector, or the default end component.
Data Out Returns the extracted data (string).
Returns True if a Check box or Radio button is set, else false.

Properties

Property Description
Search Search for the respective property.
Delay After Execution Specifies the wait time (in seconds) after the Click actions is performed.
Delay Before Execution Specifies the wait time (in seconds) before the Click actions is performed.
Name Specifies the name to identify the component.Set the name to match the application field you are interacting with.
Click X Specifies the location of the GetText action on the X-axis.
Click Y Specifies the location of the GetText action on the Y-axis.
Search as A Gray Scale Image Defines the selected area as a gray scale image.
Target Platform Allows users to select the aaplication platform.
Threshold Specifies the image matching accuracy before performing the click operation. Value of 1 defines 100% match, 0.5 defines 50% match; Defaults value is 0.9 or 90% match.
Max Wait Time in Seconds Specifies the image matching accuracy before performing the click operation. Value of 1 defines 100% match, 0.5 defines 50% match; Defaults value is 0.9 or 90% match.
Max Wait Time in Seconds Defines the number of Seconds to wait for the image/application to appear on the screen. Default value is 30 Seconds.
Wait After Image Found Specifies the wait time (in seconds) after the image is found.
Wait For Create Define if the GetText component must wait for the image to appear on the screen. Default value is True.

Example

Let us consider the example of extracting text from a website.

Screenshot

To extract text:

  1. In the Toolbox, expand the Actions category.

  2. Drag the GetText component and drop it on the design surface.

  3. Double click on the GetText component to add multiple images .

    Screenshot

  4. To select the text to extract, click.Screenshot Then PressCTRL+SHIFTfor selection message to be displayed.

  5. Press CTRL+SHIFT. The mouse pointer becomes a crosshair.

  6. If the First captured image is not displayed on the screen then it searches for next captured image. Click Screenshot sign to add next image.

  7. Select the webpage content to extract. The selected content is displayed in the GetText component.

  8. To replace the selected content:

    • Right-click the content displayed in the GetText component.

    • Select Capture Image.

    • Press CTRL+SHIFT and select the required content. The updated content is displayed in the GetText component.

    Note

    To add an Anchor in the GetText component, right-click the captured image and click Add Anchor.

  9. To enable display of the extracted text, add a MessageBox component to the activity.

  10. To add the MessageBox component:

    • In the Toolbox, expand the General.

    • Drag the Show component and drop it on the design surface.

  11. Connect:

    • The control ports between Start and the GetText component.

    • The Control Out port of the GetText component with one MessageBox component.

    • The Data Out port of the GetText component with the Data in port MessageBox component.

  12. Click Run.

    If the text is successfully extracted, it is displayed in the MessageBox, as below.

    Screenshot