Element Exists
AutomatR.Windows.Activities.ElementExists
The "Element Exists" activity in AutomatR for Windows UI Automation enables you to verify if a UI element exists, even if it is not visible. This activity is useful for checking the presence of UI elements on a Windows application.
Properties
Name | Description |
---|---|
Input | |
Windows Selector | Allows you to define the UI element using a Windows Selector. Use the browse button to indicate the element on the app. String variables containing the Windows Selector. |
Windows Element | Allows you to provide the UI element directly using the Selector variable. InArgument<Selector> variables containing information about the UI element. |
Misc | |
Display Name | Provides a customizable name for the activity displayed in the workflow. String variables containing the desired display name. |
Optional | |
Timeout | Specifies the time (in seconds) for the activity to execute before throwing an exception. Integer variables containing the timeout duration. |
Delay | Specifies the amount of time (in seconds) to wait before starting the activity. Integer variables containing the delay duration. Ex.: If the amount of time is 1000 milliseconds or 1 sec, i.e., 1. |
Output | |
Exists | Outputs True or False based on whether the UI element exists or not. Boolean variables to store the existence status. |
How to use:
- Drag and drop the "Element Exists" activity onto the workflow.
- Configure the properties by either providing the Windows Selector or the Windows Element directly.
- Optionally, configure the timeout and delay settings.
- Execute the workflow to check the existence of the specified UI element.
Example: Consider an example where the "Element Exists" activity is used to check if a button with a specific selector exists on a Windows application:
Element Exists:
Display Name: "Check Button Existence"
Windows Selector: "Button[@Name='SubmitButton']"
Exists: isButtonPresent
Timeout: 10
In this example, the activity checks whether the button with the name 'SubmitButton' exists within a timeout of 10 seconds. The result (True or False) is stored in the Boolean variable "isButtonPresent" for further handling in the workflow.