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

用户界面自动化活动

等待状态

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

必须在“打开”“附加”之后添加此 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` - Wait for the element to appear in the
  user interface.
* `WaitDissapear` - Wait for the element to disappear
  from the user interface.
* `WaitAppear` - Wait for the element to appear in the
  user interface.
* `WaitDissapear` - Wait for the element to disappear
  from the user interface.

timeout双精度: 指定等待事件(元素出现或消失)的秒数。默认值为 5 秒。

WaitState(String, CheckStateOptions)

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

bool WaitState( 
    string target,
    CheckStateOptions checkStateOptions)
bool WaitState( 
    string target,
    CheckStateOptions checkStateOptions)

target “字符串” :要检查其状态的用户界面元素,从对象存储库中标识为字符串。

checkStateOptions NCheckStateMode :选择以下选项:选择以下选项:

* `checkStateMode NCheckStateMode` - Select which event
  to use for determining the state of the application or browser:
  + `WaitAppear` - Wait for the element to appear
    in the user interface.
  + `WaitDissapear` - Wait for the element to
    disappear from the user interface.
* `timeout Double` - Specify the number of seconds for
  which to wait for the event (element to appear or to disappear). The
  default value is 5 seconds.
* `checkStateMode NCheckStateMode` - Select which event
  to use for determining the state of the application or browser:
  + `WaitAppear` - Wait for the element to appear
    in the user interface.
  + `WaitDissapear` - Wait for the element to
    disappear from the user interface.
* `timeout Double` - Specify the number of seconds for
  which to wait for the event (element to appear or to disappear). The
  default value is 5 seconds.

WaitState(TargetAnchorableModel, CheckStateOptions)

通过验证元素(标识为 TargetAnchorableModel 对象)是在用户界面中出现还是消失以及其他配置,来检查应用程序或网页浏览器的状态。

bool WaitState(
    TargetAnchorableModel target,
    CheckStateOptions checkStateOptions)
bool WaitState(
    TargetAnchorableModel target,
    CheckStateOptions checkStateOptions)

target TargetAnchorableModel :要检查其状态的用户界面元素,标识为TargetAnchorableModel对象。

checkStateOptions NCheckStateMode :选择以下选项:选择以下选项:

* `checkStateMode NCheckStateMode` - Select which event
  to use for determining the state of the application or browser:
  + `WaitAppear` - Wait for the element to appear
    in the user interface.
  + `WaitDissapear` - Wait for the element to
    disappear from the user interface.
* `timeout Double` - Specify the number of seconds for
  which to wait for the event (element to appear or to disappear). The
  default value is 5 seconds.
* `checkStateMode NCheckStateMode` - Select which event
  to use for determining the state of the application or browser:
  + `WaitAppear` - Wait for the element to appear
    in the user interface.
  + `WaitDissapear` - Wait for the element to
    disappear from the user interface.
* `timeout Double` - Specify the number of seconds for
  which to wait for the event (element to appear or to disappear). The
  default value is 5 seconds.

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` - Wait for the element to appear in the
  user interface.
* `WaitDissapear` - Wait for the element to disappear
  from the user interface.
* `WaitAppear` - Wait for the element to appear in the
  user interface.
* `WaitDissapear` - Wait for the element to disappear
  from the user interface.

timeout双精度: 指定等待事件(元素出现或消失)的秒数。默认值为 5 秒。

返回值

指示元素是否存在。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新