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

用户界面自动化活动

上次更新日期 2026年1月14日

获取属性

检索指定用户界面元素的指定属性的值。

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

定义

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

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

重载

重载描述
GetAttribute(RuntimeTarget, GetAttributeOptions)检索由对象存储库元素的运行时实例标识的指定用户界面元素的指定属性值以及其他配置。
GetAttribute(TargetAnchorableModel, GetAttributeOptions)检索由“ TargetAnchorableModel ”对象标识的指定用户界面元素的指定属性值以及其他配置。
GetAttribute(String, GetAttributeOptions)从对象存储库中检索由字符串标识的指定用户界面元素的指定属性值以及其他配置。
GetAttribute(IElementDescriptor, String)检索指定用户界面元素(由对象存储库中元素描述符标识)的指定属性的值,同时指定属性的名称。
GetAttribute(IElementDescriptor, GetAttributeOptions)检索指定用户界面元素的指定属性值以及其他配置,该元素由对象存储库中的用户界面元素描述符标识。
GetAttribute(String, String)检索指定用户界面元素(由对象存储库中的字符串标识)的指定属性的值,同时指定属性的名称。
GetAttribute(TargetAnchorableModel, String)检索指定用户界面元素的指定属性的值(由“ TargetAnchorableModel ”对象标识),同时指定属性的名称。

GetAttribute(RuntimeTarget, GetAttributeOptions)

检索由对象存储库元素的运行时实例标识的指定用户界面元素的指定属性值以及其他配置。

GetAttribute(
    RuntimeTarget target,
    GetAttributeOptions getAttributeOptions)
GetAttribute(
    RuntimeTarget target,
    GetAttributeOptions getAttributeOptions)

target RuntimeTarget :从中获取所需属性的目标,由对象存储库元素的运行时实例标识。

getAttributeOptions GetAttributeOptions :用于自定义检索属性值流程的其他选项。您可以选择自定义以下项目:

* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.
* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.

GetAttribute(TargetAnchorableModel, GetAttributeOptions)

检索由“ TargetAnchorableModel ”对象标识的指定用户界面元素的指定属性值以及其他配置。

GetAttribute(
    TargetAnchorableModel target,
    GetAttributeOptions getAttributeOptions)
GetAttribute(
    TargetAnchorableModel target,
    GetAttributeOptions getAttributeOptions)

target TargetAnchorableModel :从中获取想要的属性的目标,由TargetAnchorableModel对象标识。

getAttributeOptions GetAttributeOptions :用于自定义检索属性值流程的其他选项。您可以选择自定义以下项目:

* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.
* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.

GetAttribute(String, GetAttributeOptions)

从对象存储库中检索由字符串标识的指定用户界面元素的指定属性值以及其他配置。

GetAttribute(
    string target,
    GetAttributeOptions getAttributeOptions)
GetAttribute(
    string target,
    GetAttributeOptions getAttributeOptions)

target String :从中获取想要的属性的目标,由对象存储库中的字符串标识。

getAttributeOptions GetAttributeOptions :用于自定义检索属性值流程的其他选项。您可以选择自定义以下项目:

* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.
* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.

GetAttribute(IElementDescriptor, String)

检索指定用户界面元素(由对象存储库中元素描述符标识)的指定属性的值,同时指定属性的名称。

GetAttribute(
    IElementDescriptor elementDescriptor,
    string attribute)
GetAttribute(
    IElementDescriptor elementDescriptor,
    string attribute)

elementDescriptor IElementDescriptor :要从中检索属性值的元素,由对象存储库中用户界面元素的描述符标识。

attribute String :要检索的属性的名称。

GetAttribute(IElementDescriptor, GetAttributeOptions)

检索指定用户界面元素的指定属性值以及其他配置,该元素由对象存储库中的用户界面元素描述符标识。

GetAttribute(
    IElementDescriptor elementDescriptor,
    GetAttributeOptions getAttributeOptions)
GetAttribute(
    IElementDescriptor elementDescriptor,
    GetAttributeOptions getAttributeOptions)

elementDescriptor IElementDescriptor :要从中检索属性值的元素,由对象存储库中用户界面元素的描述符标识。

getAttributeOptions GetAttributeOptions :用于自定义检索属性值流程的其他选项。您可以选择自定义以下项目:

* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.
* `GetAttributeBaseOptions`:
  + **Attribute** - The name of the attribute you want to
    retrieve.

GetAttribute(String, String)

检索指定用户界面元素(由对象存储库中的字符串标识)的指定属性的值,同时指定属性的名称。

GetAttribute(
    string target,
    string attribute)
GetAttribute(
    string target,
    string attribute)

target String :从中获取想要的属性的目标,由对象存储库中的字符串标识。

attribute String :要检索的属性的名称。

GetAttribute(TargetAnchorableModel, String)

检索指定用户界面元素的指定属性的值(由“ TargetAnchorableModel ”对象标识),同时指定属性的名称。

GetAttribute(
    TargetAnchorableModel target,
    string attribute)
GetAttribute(
    TargetAnchorableModel target,
    string attribute)

target TargetAnchorableModel :从中获取想要的属性的目标,由TargetAnchorableModel对象标识。

attribute String :要检索的属性的名称。

返回值

属性的值。

此页面有帮助吗?

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