activities
latest
false
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。
UiPath logo, featuring letters U and I in white

用户界面自动化活动

上次更新日期 2025年3月25日

GetText

从用户界面元素中提取并复制文本。

此 API 必须在“打开” 或“附加”之后添加。

定义

命名空间:UiPath.UIAutomationNext.API.Models

程序集:UiPath.UIAutomationNext.API.Models(在 UiPath.UIAutomationNext.API.Models dll 中)

重载

重载描述
GetText(String)从用户界面元素中提取并复制文本(标识为字符串)。
GetText(String, GetTextOptions)在自定义提取 Actions时,从用户界面元素中提取并复制文本(标识为字符串)。
GetText(TargetAnchorableModel, GetTextOptions)在自定义提取 Actions时,从标识为 Target Anchorable Model 对象的用户界面元素中提取并复制文本。

GetText(String)

从用户界面元素中提取并复制文本(标识为字符串)。

 [object Object],[object Object],[object Object],[object Object],[object Object],[object Object]GetText(
    string target)
target 字符串
指示在对象存储库中捕获并要提取的用户界面元素。

GetText(String, GetTextOptions)

在自定义提取 Actions时,从用户界面元素中提取并复制文本(标识为字符串)。

 [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 字符串
指示在对象存储库中捕获并要提取的用户界面元素。
getTextOptions GetTextOptions
用于自定义文本提取流程的其他选项。 您可以选择自定义:
  • ScrapingOptions NScrapingOptions:
    • 默认
    • TextAttribute
    • Native (使您能够 允许格式化 并检索文字的屏幕坐标)
    • FullText (提供 忽略隐藏文本的选项)
  • ScrapingAPI NScrapingAPI
    • AllowFormatting
    • IgnoreHiddenText
    • GetWordCoordinates

GetText(TargetAnchorableModel, GetTextOptions)

在自定义提取 Actions时,从标识为 Target Anchorable Model 对象的用户界面元素中提取并复制文本。
 [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
指示要提取的标识为 TargetAnchorableModel 的用户界面元素。
getTextOptions GetTextOptions
用于自定义文本提取流程的其他选项。 您可以选择自定义:
  • ScrapingOptions NScrapingOptions:
    • 默认
    • TextAttribute
    • Native (使您能够 允许格式化 并检索文字的屏幕坐标)
    • FullText (提供 忽略隐藏文本的选项)
  • ScrapingAPI NScrapingAPI
    • AllowFormatting
    • IgnoreHiddenText
    • GetWordCoordinates

返回值

指定用户界面元素中的文本。

此页面有帮助吗?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath Logo White
© 2005-2025 UiPath。保留所有权利。