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

用户界面自动化活动

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

存在元素

UiPath.Core.Activities.UiElementExists

即使用户界面元素不可见,依然可用于验证是否存在用户界面元素。

属性

常见
  • “显示名称”- 活动的显示名称。
输入
  • Target.Target - Identifies the UI element. Select From the drop-down one of the following options: Target, Null. The default option is Target.
  • Target.ClippingRegion - Defines the clipping rectangle, in pixels, relative to the UiElement, in the following directions: left, top, right, bottom. It supports both positive and negative numbers.
  • Target.Element - Use the UiElement variable returned by another activity. This property cannot be used alongside the Selector property. This field supports only UiElement variables.
  • “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..
  • “Target.WaitForReady”- 待目标准备就绪后,再执行操作。可用的选项如下:
    • “无”- 在执行操作之前,系统不会等待显示除目标用户界面元素之外的任何内容。例如,如果希望只从网页检索文本或单击特定按钮,则可以使用此选项,而不必等待用户界面元素全部加载。请注意,如果按钮依赖尚未加载的元素(如脚本),这可能会产生不良后果。
    • “交互”- 等待目标应用程序指示准备就绪(尽管某些资产可能仍在加载)。
  • “完成” - 待目标应用程序中的所有用户界面元素全部加载之后,再实际执行操作。
    备注:

    To assess if an application is in the Interactive or Complete state, the following tags are verified:

    • “桌面应用程序”- 系统会发出一条“wm\_null”消息,以检查是否存在“<wnd>”、“<ctrl>”、“<java>”或“<uia>”标签。如存在,则执行活动。
    • 网页应用程序:
    • 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".
    • Others - The <webctrl> tag is used to check if the Ready state of the HTML document is Complete.
    • SAP applications - First the presence of the <wnd> tag verified, after which an SAP specific API is used to detect if the session is busy or not.
其他
  • “私有”- 选中后将不再以“Verbose”级别记录变量和参数的值。
输出
  • “存在”- 指明元素是否存在。该字段仅支持“布尔值”变量。

“存在元素”活动使用示例

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

  • 属性
  • “存在元素”活动使用示例

此页面有帮助吗?

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