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

用户界面自动化活动

上次更新日期 2026年2月19日

查找元素

UiPath.Core.Activities.WaitUiElementAppear

等待指定用户界面元素显示在屏幕上(位于前台),并将其返回为“用户界面元素”变量。如要确定元素是否已启用,请使用“获取属性”“等待属性”等活动,并搭配aastate属性(仅举一例)。

属性

输出
  • “已找到的元素”- 查找到的用户界面元素。该字段仅支持用户界面元素变量。
选项
  • “等待可见”- 选中该复选框后,活动将等待指定用户界面元素变为可见状态。
  • “等待激活”- 选中该复选框后,活动将等待指定用户界面元素变为启用状态。
其他
  • “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。
  • “Target.Selector”- 用于在执行活动时查找特定用户界面元素的“文本”属性。它实际上是 XML 片段,用于指定要查找的图形用户界面元素及其一些父元素的属性。
  • Target.TimeoutMS - Specifies the amount of time (in milliseconds) to wait for the activity to run when the element does not exist. The default value is 30000 milliseconds (30 seconds).
  • “Target.WaitForReady”- 待目标准备就绪后,再执行操作。可用的选项如下:
    • “无”- 在执行操作之前,系统不会等待显示除目标用户界面元素之外的任何内容。例如,如果希望只从网页检索文本或单击特定按钮,则可以使用此选项,而不必等待用户界面元素全部加载。请注意,如果按钮依赖尚未加载的元素(如脚本),这可能会产生不良后果。
    • “交互/完成” - 待目标应用程序中的所有用户界面元素全部显示之后,再实际执行操作。 为了评估应用程序处于“交互”状态还是“完成”状态,系统将验证以下标签:
    • “桌面应用程序”- 系统会发出一条“wm_null”消息,以检查是否存在“<wnd>”、“<ctrl>”、“<java>”或“<uia>”标签。如存在,则执行活动。
    • 网页应用程序:
    1. Internet Explorer - The <webctrl> tag is used to check if the Ready state of the HTML document is set to Complete. Additionally, the Busy state has to be set to "False".
    2. Others - The <webctrl> tag is used to check if the Ready state of the HTML document is Complete.
    • “SAP 应用程序”- 首先验证是否存在“<wnd>”标签,然后使用 SAP 特定 API 来检测会话是否繁忙。
  • “Target.Element”- 使用另一个活动返回的“用户界面元素”变量。该属性不能与“选取器”属性一起使用。该字段仅支持用户界面元素变量。
  • “Target.ClippingRegion”- 按照左、上、右、下四个方向定义相对于用户界面元素的剪切矩形(以像素为单位)。支持正数和负数。
常见
  • “显示名称”- 活动的显示名称。

  • ContinueOnError - Specifies if the automation should continue even when the activity throws an error. This field only supports Boolean values (True, False). The default value is False. As a result, if the field is blank and an error is thrown, the execution of the project stops. If the value is set to True, the execution of the project continues regardless of any error.

    备注:

    如果“Try Catch 异常处理”中包含该活动且“出错时继续”属性的值为“True”,则系统在执行项目时不会捕获任何错误。

“查找元素”活动使用示例

您可以在此查看包含多个活动的示例,了解如何使用查找元素活动。

  • 属性
  • “查找元素”活动使用示例

此页面有帮助吗?

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