activities
latest
false
UiPath logo, featuring letters U and I in white

UI Automation Activities

Last updated Apr 2, 2025

GetText

Extracts and copies the text from a UI element.

This API must be added after Open or Attach.

Definition

Namespace: UiPath.UIAutomationNext.API.Models

Assembly: UiPath.UIAutomationNext.API.Models (in UiPath.UIAutomationNext.API.Models dll)

Overloads

OverloadDescription
GetText(String)Extracts and copies the text from a UI element, identified as a string.
GetText(String, GetTextOptions)Extracts and copies the text from a UI element, identified as a string, while customizing the extract action.
GetText(TargetAnchorableModel, GetTextOptions)Extracts and copies the text from a UI element, identified as a Target Anchorable Model object, while customizing the extract action.

GetText(String)

Extracts and copies the text from a UI element, identified as a string.

 [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]GetText(
    string target)
target String
Indicate the UI element captured in the Object Repository that you want to extract.

GetText(String, GetTextOptions)

Extracts and copies the text from a UI element, identified as a string, while customizing the extract action.

 [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]GetText(
    string target, 
    GetTextOptions getTextOptions)
target String
Indicate the UI element captured in the Object Repository that you want to extract.
getTextOptions GetTextOptions
Additional options to customize the text extraction process. You can choose to customize:
  • ScrapingOptions NScrapingOptions:
    • Default
    • TextAttribute
    • Native (enables you to Allow formatting and retrieve the screen coordinates of the words)
    • FullText (offers the option to Ignore hidden text)
  • ScrapingAPI NScrapingAPI
    • None
    • AllowFormatting
    • IgnoreHiddenText
    • GetWordCoordinates

GetText(TargetAnchorableModel, GetTextOptions)

Extracts and copies the text from a UI element, identified as a Target Anchorable Model object, while customizing the extract action.
 [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]GetText(
    TargetAnchorableModel target, 
    GetTextOptions getTextOptions)
TargetAnchorableModel TargetAnchorableModel
Indicate the UI element identified as a TargetAnchorableModel that you want to extract.
getTextOptions GetTextOptions
Additional options to customize the text extraction process. You can choose to customize:
  • ScrapingOptions NScrapingOptions:
    • Default
    • TextAttribute
    • Native (enables you to Allow formatting and retrieve the screen coordinates of the words)
    • FullText (offers the option to Ignore hidden text)
  • ScrapingAPI NScrapingAPI
    • None
    • AllowFormatting
    • IgnoreHiddenText
    • GetWordCoordinates

Return value

The text from the specified UI element.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
© 2005-2025 UiPath. All rights reserved.