Find Children
AutomatR.Windows.Activities.FindChildren
The "Find Children" activity in AutomatR for Windows UI Automation retrieves a collection of child UI elements based on specified scope and filter criteria. This activity is useful for automating scenarios where interactions with multiple child elements are required.
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. |
Name | Provides an input string for the name attribute as a filter criteria to find child elements for a selected element or control. String variables containing the filter criteria. |
Control Type | Provides an input string for the control type attribute as a filter criteria to find child elements for a selected element or control. String variables containing the filter criteria. |
Class | Provides an input string for the class attribute as a filter criteria to find child elements for a selected element or control. String variables containing the filter criteria. |
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 | |
Children | Outputs a list of selectors for all matching child elements based on the specified criteria. List<Selector> variables to store the retrieved child elements. |
How to use:
- Drag and drop the "Find Children" activity onto the workflow.
- Configure the properties by either providing the Windows Selector or the Windows Element directly.
- Optionally, specify filter criteria such as Name, Control Type, and Class to narrow down the search for child elements.
- Optionally, configure the timeout and delay settings.
- Execute the workflow to retrieve a list of child elements based on the specified criteria.
Example: Consider an example where the "Find Children" activity is used to retrieve all button elements within a specific window:
Find Children:
Display Name: "Find All Buttons"
Windows Selector: "WindowSelector"
Control Type: "Button"
Children: listOfButtons
Timeout: 10
In this example, the activity retrieves a list of buttons within the specified window based on the control type filter criteria. The list of buttons is stored in the List<Selector>
variable "listOfButtons" for further handling in the workflow.