UiPath Documentation
activities
latest
false
UI Automation activities

GetText

GetText in the UI Automation coded automation API: extracts and copies the text from a UI element.

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.

GetText(
    string target)
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.

GetText(
    string target, 
    GetTextOptions getTextOptions)
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`
* `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.

GetText(
    TargetAnchorableModel target, 
    GetTextOptions getTextOptions)
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`
* `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?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated