activities
latest
false
UiPath logo, featuring letters U and I in white
UI Automation Activities
Last updated Oct 28, 2024

WaitState

Checks the state of an application or web browser by verifying if an element appears in or disappears from the user interface.

This API must be added after Open or Attach.

Definition

Namespace: UiPath.UIAutomationNext.API.Models

Assembly: UiPath.UIAutomationNext.API.Models (in UiPath.UIAutomationNext.API.Models dll)

Overloads

OverloadDescription
WaitState(String, NClickStateMode, Double)Checks the state of an application or web browser by verifying if an element (identified as a string from the Object Repository) appears in or disappears from the user interface, and choose the number of seconds to wait for the event.
WaitState(String, CheckStateOptions)Checks the state of an application or web browser by verifying if an element (identified as a string from the Object Repository) appears in or disappears from the user interface, and choose the number of seconds to wait for the event, along with other configurations.
WaitState(TargetAnchorableModel, CheckStateOptions)Checks the state of an application or web browser by verifying if an element (identified as a TargetAnchorableModel object) appears in or disappears from the user interface, along with other configurations.
WaitState(TargetAnchorableModel, NCheckStateMode, Double)Checks the state of an application or web browser by verifying if an element (identified as a TargetAnchorableModel object) appears in or disappears from the user interface, along with the number of seconds to wait for the event.

WaitState(String, NClickStateMode, Double)

Checks the state of an application or web browser by verifying if an element (identified as a string from the Object Repository) appears in or disappears from the user interface, and choose the number of seconds to wait for the event.

bool WaitState(
    string target,
    NCheckStateMode checkStateMode,
    double timeout)bool WaitState(
    string target,
    NCheckStateMode checkStateMode,
    double timeout)
target String
The UI element that you want to check the state of, identified as a string from the Object Repository.
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(String, CheckStateOptions)

Checks the state of an application or web browser by verifying if an element (identified as a string from the Object Repository) appears in or disappears from the user interface, and choose the number of seconds to wait for the event, along with other configurations.

bool WaitState( 
    string target,
    CheckStateOptions checkStateOptions)bool WaitState( 
    string target,
    CheckStateOptions checkStateOptions)
target String
The UI element that you want to check the state of, identified as a string from the Object Repository.
checkStateOptions NCheckStateMode
Choose the following options:
  • 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)

Checks the state of an application or web browser by verifying if an element (identified as a TargetAnchorableModel object) appears in or disappears from the user interface, along with other configurations.
bool WaitState(
    TargetAnchorableModel target,
    CheckStateOptions checkStateOptions)bool WaitState(
    TargetAnchorableModel target,
    CheckStateOptions checkStateOptions)
target TargetAnchorableModel
The UI element that you want to check the state of, identified as a TargetAnchorableModel object.
checkStateOptions NCheckStateMode
Choose the following options:
  • 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)

Checks the state of an application or web browser by verifying if an element (identified as a TargetAnchorableModel object) appears in or disappears from the user interface, along with the number of seconds to wait for the event.
bool WaitState(
    TargetAnchorableModel target,
    NCheckStateMode checkStateMode,
    [double timeout])bool WaitState(
    TargetAnchorableModel target,
    NCheckStateMode checkStateMode,
    [double timeout])
target TargetAnchorableModel
The UI element that you want to check the state of, identified as a TargetAnchorableModel object.
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.

Return value

Indicates if the element exists or not.

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.