活动
最新
False
横幅背景图像
用户界面自动化活动
上次更新日期 2024年4月26日

等待状态

通过验证元素是出现在用户界面还是从用户界面消失,检查应用程序或网页浏览器的状态。

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

定义

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

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

重载

重载描述
WaitState(String, NClickStateMode, Double)检查应用程序或网页浏览器的状态,方法是验证元素(标识为“对象存储库”中的字符串)是在用户界面中出现还是消失,并选择等待事件的秒数。
WaitState(String, CheckStateOptions)检查应用程序或网页浏览器的状态,方法是验证元素(标识为“对象存储库”中的字符串)是在用户界面中出现还是消失,并选择等待事件的秒数以及其他配置。
WaitState(TargetAnchorableModel, CheckStateOptions)通过验证元素(标识为 TargetAnchorableModel 对象)是在用户界面中出现还是消失以及其他配置,来检查应用程序或网页浏览器的状态。
WaitState(TargetAnchorableModel, NCheckStateMode, Double)通过验证元素(标识为 TargetAnchorableModel 对象)是出现在用户界面中还是从用户界面中消失,以及等待事件的秒数,来检查应用程序或网页浏览器的状态。

WaitState(String, NClickStateMode, Double)

检查应用程序或网页浏览器的状态,方法是验证元素(标识为“对象存储库”中的字符串)是在用户界面中出现还是消失,并选择等待事件的秒数。

bool WaitState(
    string target,
    NCheckStateMode checkStateMode,
    double timeout)bool WaitState(
    string target,
    NCheckStateMode checkStateMode,
    double timeout)
target 字符串
要检查状态的用户界面元素,在对象存储库中标识为字符串。
checkStateMode NCheckStateMode
选择用于确定应用程序或浏览器状态的事件:
  • WaitAppear - 等待元素出现在用户界面中。
  • WaitDissapear - 等待元素从用户界面中消失。
timeout Double
指定等待事件 (元素出现或消失) 的秒数。 默认值为 5 秒。

WaitState(String, CheckStateOptions)

检查应用程序或网页浏览器的状态,方法是验证元素(标识为“对象存储库”中的字符串)是在用户界面中出现还是消失,并选择等待事件的秒数以及其他配置。

bool WaitState( 
    string target,
    CheckStateOptions checkStateOptions)bool WaitState( 
    string target,
    CheckStateOptions checkStateOptions)
target 字符串
要检查状态的用户界面元素,在对象存储库中标识为字符串。
checkStateOptions NCheckStateMode
选择以下选项:
  • checkStateMode NCheckStateMode - 选择用于确定应用程序或浏览器状态的事件:
    • WaitAppear - 等待元素出现在用户界面中。
    • WaitDissapear - 等待元素从用户界面中消失。
  • timeout Double - 指定等待事件(元素出现或消失)的秒数。 默认值为 5 秒。

WaitState(TargetAnchorableModel, CheckStateOptions)

通过验证元素(标识为 TargetAnchorableModel 对象)是在用户界面中出现还是消失以及其他配置,来检查应用程序或网页浏览器的状态。
bool WaitState(
    TargetAnchorableModel target,
    CheckStateOptions checkStateOptions)bool WaitState(
    TargetAnchorableModel target,
    CheckStateOptions checkStateOptions)
target TargetAnchorableModel
要检查状态的用户界面元素,标识为 TargetAnchorableModel 对象。
checkStateOptions NCheckStateMode
选择以下选项:
  • checkStateMode NCheckStateMode - 选择用于确定应用程序或浏览器状态的事件:
    • WaitAppear - 等待元素出现在用户界面中。
    • WaitDissapear - 等待元素从用户界面中消失。
  • timeout Double - 指定等待事件(元素出现或消失)的秒数。 默认值为 5 秒。

WaitState(TargetAnchorableModel, NCheckStateMode, Double)

通过验证元素(标识为 TargetAnchorableModel 对象)是出现在用户界面中还是从用户界面中消失,以及等待事件的秒数,来检查应用程序或网页浏览器的状态。
bool WaitState(
    TargetAnchorableModel target,
    NCheckStateMode checkStateMode,
    [double timeout])bool WaitState(
    TargetAnchorableModel target,
    NCheckStateMode checkStateMode,
    [double timeout])
target TargetAnchorableModel
要检查状态的用户界面元素,标识为 TargetAnchorableModel 对象。
checkStateMode NCheckStateMode
选择用于确定应用程序或浏览器状态的事件:
  • WaitAppear - 等待元素出现在用户界面中。
  • WaitDissapear - 等待元素从用户界面中消失。
timeout Double
指定等待事件 (元素出现或消失) 的秒数。 默认值为 5 秒。

返回值

指示元素是否存在。

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.