Skip to main content

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

NameDescription
Input
Windows SelectorAllows 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 ElementAllows you to provide the UI element directly using the Selector variable. InArgument<Selector> variables containing information about the UI element.
NameProvides 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 TypeProvides 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.
ClassProvides 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 NameProvides a customizable name for the activity displayed in the workflow. String variables containing the desired display name.
Optional
TimeoutSpecifies the time (in seconds) for the activity to execute before throwing an exception. Integer variables containing the timeout duration.
DelaySpecifies 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
ChildrenOutputs 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:

  1. Drag and drop the "Find Children" activity onto the workflow.
  2. Configure the properties by either providing the Windows Selector or the Windows Element directly.
  3. Optionally, specify filter criteria such as Name, Control Type, and Class to narrow down the search for child elements.
  4. Optionally, configure the timeout and delay settings.
  5. 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.