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

用户界面自动化活动

上次更新日期 2026年4月16日

查看应用程序状态

UiPath.UIAutomationNext.Activities.NCheckState

描述

通过验证元素是否出现在用户界面中,检查应用程序或网页浏览器的状态,如果找到该元素,则可以执行一组活动,如果找不到该元素,则执行另一组活动。

它可以监控整个应用程序的更改,而不仅仅是监控单个用户界面元素。

该活动可在“使用应用程序/浏览器”活动内部和外部使用。

它也可用作“重试作用域”活动的条件。

此活动可与对象存储库兼容。

项目兼容性

Windows - 旧版 | Windows | 跨平台

Windows 和跨平台配置

  • Work in scope - Choose the browser tab rendering the web application to automate, when the activity is placed inside nested Use Application/Browser cards.
  • Indicate target on screen - Indicate the UI element to use as target. After you indicate the target, click the hamburger menu next to the informative screenshot to access the following options:
    • Indicate target - Indicate the target again. If the Descriptor is defined in the Object Repository, you must unlink it from the Object Repository if you want to specify a Descriptor only for the current activity.
    • “编辑目标” - 打开选择模式以配置目标。
    • 删除信息性屏幕截图 - 删除目标应用程序或网页的屏幕截图。
    • 更改信息性屏幕截图 - 更改目标应用程序或网页的屏幕截图。
    • 添加到对象存储库- 将当前用户界面元素添加到“对象存储库”,以便可以在整个自动化流程中重用该元素。仅当对象尚未添加到“对象存储库” 时,才显示此选项。
    • 在对象存储库中显示- 打开“对象存储库” 面板,并选中“描述符”。仅当将对象添加到“对象存储库”时,才会显示此选项。
    • 取消与对象存储库的链接- 取消描述符与对象存储库的链接。仅当将对象添加到“对象存储库”时,才会显示此选项。
  • Wait for (appear/disappear) - Select which event to use for determining the state of the application or browser:
    • Element to appear - Wait for the element to appear in the user interface. If you select this option:
      • Add the activities to execute if the element appears in the Target appears block.
      • Add the activities to execute if the element does not appear in the Target does not appear block.
    • Element to disappear - Wait for the element to disappear from the user interface. If you select this option:
      • Add the activities to execute if the element disappears in the Target disappears block.
      • Add the activities to execute if the element does not disappear in the Target does not disappear block.
    • Element window not active - Wait for the element top-level window become inactive. If you select this option:
      • Add the activities to execute if the element top-level window become inactive in the Window not in freground block.
      • Add the activities to execute if the element top-level window remains active in the Window still active block.
  • 超时(秒) - 在执行两个活动块其中的一个之前等待元素显示或消失的时间。默认值为 5 秒。

属性面板

输入/输出

  • “状态” - 指示检测到的目标状态的 True 或 False 值。
  • “输入元素” - 要在其上执行活动的用户界面元素,存储在UIElement对象中。此字段仅支持UIElement对象。可以从其他用户界面自动化活动的“输出元素”属性字段中获取该对象。
  • “输出元素” - 输出目标用户界面元素,并将其存储在UIElement对象中,该对象可进一步用于与其他活动针对同一元素。

选项

  • Wait active - Indicates whether the activity should wait for the UI element's top-level window to be in te foreground.
  • Healing Agent 模式- 根据流程或作业级别的监管或 Orchestrator 设置,配置此活动的 Healing Agent 行为。
    • 已禁用 - 关闭此活动的 Healing Agent。
    • 继承作业设置- 在流程或作业级别应用在监管或 Orchestrator 中定义的设置。
    • “仅建议” - 允许 Healing Agent 提供有关如何修复正在运行的作业中的用户界面自动化问题的建议,但前提是监管或 Orchestrator 设置允许。
    • 与应用程序/浏览器相同- 从父级“使用应用程序/浏览器”活动继承配置。

目标

  • Expand target properties - Displays the target container and its anchor(s) properties.

  • Collapse target properties - Hides the target container and its anchor(s) properties.

  • Targeting methods - The selector types that you want to use for identifying the element. This property can be set to any combination, and at least one targeting method must be selected:

    • 精确选取器- 为目标用户界面元素生成的精确选取器。
    • 模糊选取器- 模糊选取器参数。
    • Computer Vision - 要将 Computer Vision 用作定位方法,您需要转到“项目设置” > “Computer Vision” ,并确保设置正确的服务器端点。您可以原样保留此字段,并使用 UiPath Cloud(默认情况下已填写),也可以通过选择特定于服务器区域的任何其他公共端点或您自己的本地部署服务器来输入其他值。将 Computer Vision 用作定位方法的另一种方法是将“使用本地服务器”设置为True 。这意味着UiPath.ComputerVision.LocalServer包已安装在项目中。启用“本地服务器”后,服务器值将被覆盖。但是,“本地服务器”在跨平台项目中不可用。
      • CV 控件类型- 表示使用 Computer Vision 识别的控件的类型。
      • CV 文本- 表示使用 Computer Vision 识别的文本。
      • 计算机视觉文本出现次数- 当找到多个匹配项时,指示要使用的特定出现次数。
      • 计算机视觉文本准确性- 指示 OCR 文本匹配的准确性级别。
    • 语义选取器- 利用大型语言模型 (LLM) 为用户界面元素生成功能性、拟人化的描述。这些描述可靠性极高,既能适应用户界面的变更,又能在传统选取器失效时显着增强自动化弹性。
    • 图像(仅适用于 Windows 项目)
      • 图像准确性- 指示图像匹配的准确性级别。
      • 图像出现次数- 当找到多个匹配项时,指示要使用的特定出现次数。
    • Native text (only available for Windows projects)
      • 原生文本- 要查找来识别用户界面元素的文本。
      • 原生文本出现次数- 当找到多个匹配项时,指示要使用的特定出现次数。
  • 窗口选取器(应用程序实例) - 应用程序窗口的选取器。仅在窗口附加模式设置为应用程序实例时可用。

  • 等待页面加载- 在执行操作之前,等待应用程序做好接受输入的准备。选项包括:

    • “无”- 不等待目标变为就绪状态。
    • “交互式”– 等待直到加载了应用程序的一部分。
    • “完整”– 等待整个应用程序被加载。
  • 可见性检查- 启用后,该活动还会检查用户界面元素是否可见。您可以从下拉菜单中选择以下三个选项之一:

    • - 不检查可见性。
    • 交互式(用于模糊选取器)- 默认选项。检查元素是否可能可见,忽略页面滚动和其他应用程序的阻碍或者应用程序已最小化的情况。当尝试确保您没有以 DOM 中存在但隐藏的不可见元素为目标时,此检查非常有用。
    • 完全可见- 检查用户界面元素是否可见。
  • 响应式网站- 启用响应式网站布局。

计时

  • Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.

Windows - 旧版配置

  • 选择“在应用程序/浏览器中指明” ,以指定用作目标的用户界面元素。

指定目标后,选择“菜单”docs image按钮访问以下选项:

  • Indicate target on screen - Indicate the target again.
  • “编辑目标” - 打开选择模式以配置目标。
  • 在任何应用程序中指定- 在“使用应用程序/浏览器”活动中使用时,您可以选择此选项来检查与当前应用程序实例无关的窗口或元素的应用程序状态,而无需添加新的应用程序卡。
  • 删除信息性屏幕截图 - 删除目标应用程序或网页的屏幕截图。
  • 添加到对象存储库- 将当前用户界面元素添加到库项目中,这样就可以在整个自动化流程中重用该元素。
  • Wait for - Select which event to use for determining the state of the application or browser:
    • Element to appear - Wait for the element to appear in the user interface. If you select this option:
      • Add the activities to execute if the element appears in the Target appears block.
      • Add the activities to execute if the element does not appear in the Target does not appear block.
    • Element to disappear - Wait for the element to disappear from the user interface. If you select this option:
      • Add the activities to execute if the element disappears in the Target disappears block.
      • Add the activities to execute if the element does not disappear in the Target does not disappear block.
  • “秒” - 在执行两个活动块之一之前等待元素显示或消失的时间(秒)。您可以从下拉菜单中选择一个预定值。默认值为 5 秒。
  • 单击活动主体中的“切换分支” ,以配置“显示目标”“目标不出现”容器的可见性,您可以在其中添加要执行的活动,具体取决于状态。您可以使用两个容器,也可以使用其中一个,也可以不使用。默认情况下,两个块都可见。
属性面板

常见

  • Delay before - Delay (in seconds) between the time the previous activity is completed and the time this activity begins performing any operations. The default value is 0.2 seconds. Adding a delay between activities ensures that one activity has enough time to complete before the next activity begins.

  • 显示名称 -“设计器”面板中活动的显示名称。 指定目标时,系统会自动生成显示名称。

    • CV 控件类型- 表示使用 Computer Vision 识别的控件的类型。
    • CV 文本- 表示使用 Computer Vision 识别的文本。
    • Fuzzy selector - The parameters for the fuzzy selector.
    • 原生文本- 用于标识用户界面元素的文本。
    • 响应式网站- 启用响应式网站布局。
    • 精确选取器- 为用户界面元素生成的精确选取器。
    • 定位方式- 要用于识别元素的选取器类型。从下拉菜单中选择此属性后,可将其设置为任意组合:
      • 精确选取器
      • 模糊选取器
      • 图像
      • 原生文本
      • Computer Vision - 要将 Computer Vision 用作定位方法,您需要转到“项目设置” > “Computer Vision” ,并确保设置正确的服务器端点。您可以原样保留此字段,并使用 UiPath Cloud(默认情况下已填写),也可以通过选择特定于服务器区域的任何其他公共端点或您自己的本地部署服务器来输入其他值。将 Computer Vision 用作定位方法的另一种方法是将“使用本地服务器”设置为True 。这意味着 UiPath.ComputerVision.LocalServer 包已安装在项目中。启用“本地服务器”后,服务器值将被覆盖。但是,“本地服务器”在跨平台项目中不可用。
      • 语义选取器- 利用大型语言模型 (LLM) 生成功能性、拟人化的用户界面元素描述。这些描述可靠性极高,既能适应用户界面的变更,又能在传统选取器失效时显着增强自动化弹性。
    • 可见性检查- 检查用户界面元素是否可见。您可以从下拉菜单中选择以下三个选项之一:
      • - 不检查可见性。
      • 交互式(用于模糊选取器)- 默认选项。检查元素是否可能可见,忽略页面滚动和其他应用程序的阻碍或者应用程序已最小化的情况。当尝试确保您没有以 DOM 中存在但隐藏的不可见元素为目标时,此检查非常有用。
      • 完全可见
        • 检查用户界面元素是否可见。
    • 等待页面加载- 在执行操作之前,等待应用程序做好接受输入的准备。您可以从下拉菜单中选择以下三个选项之一:
      • “无”- 不等待目标变为就绪状态。
      • “交互式”– 等待直到加载了应用程序的一部分。
      • “完整”– 等待整个应用程序被加载。
    • 窗口选取器(应用程序实例) - 用于应用程序窗口的选取器。仅在窗口附加模式设置为“应用程序实例”时可用。
  • “输入元素” - 要在其上执行活动的用户界面元素,存储在UIElement对象中。此字段仅支持UIElement对象。可以从其他用户界面自动化活动的“输出元素”属性字段中获取该对象。

  • “输出元素” - 输出目标用户界面元素,并将其存储在UIElement对象中,该对象可进一步用于与其他活动针对同一元素。

  • “私有” - 选中后将不再以“Verbose”级别记录变量和参数的值。此字段仅支持BooleanTrueFalse )值。默认值为False

  • “超时(秒)” - 在“设计器”面板中查看秒数

  • 等待(显示/消失) - 请在“设计器”面板中查看等待

  • 结果- 指明元素是否存在。该字段仅支持Boolean变量。您可以选择( True / False )保存此值以供以后使用,或将其保存在父级 Excel 文件或“项目笔记本”的单元格中。

  • 描述
  • 项目兼容性
  • Windows 和跨平台配置
  • Windows - 旧版配置

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新