🤖 UiPath Tutorial: Using the Find Children Activity

Author : Franck MONGO. - Intelligent Process Automation Consultant
Using generative AI, I enhance RPA developers’ daily tasks with my tools, available at IpaCopilot

:dart: Introduction

In this tutorial, we will explore the Find Children activity in UiPath. This activity is a powerful tool for automating tasks that involve interacting with multiple UI elements that share common properties. Whether you’re a seasoned UiPath developer or just starting your automation journey, understanding how to use the Find Children activity effectively can significantly enhance your automation workflows.

:face_with_monocle: What is the Find Children Activity

The Find Children Activity in UiPath is used to find all the children of a specified UI element. It returns an enumerable collection of UI elements which can be iterated over, allowing the robot to perform actions on each child element. This is particularly useful when dealing with complex UI structures such as tables or trees, where you need to extract or interact with multiple elements.

:control_knobs: Input and Properties of the Find Children Activity

The “Find Children” activity has several important inputs and properties:

  • Filter: This is an XML string specifying the conditions all UI objects in the collection should meet. If the filter condition leaves out all possible elements, an empty list of elements is returned.
  • Scope: This property enables you to set the scope of the UI elements in the collection. The options include FIND_CHILDREN, FIND_DESCENDANTS, FIND_TOP_LEVEL, FIND_PROCESS, and FIND_THREAD.
  • Children: This is the output property where all UI children found according to the filter and scope set are stored. The field supports only IEnumerable variables.
  • Target.Selector: This is a text property used to find a particular UI element when the activity is executed. It is actually an XML fragment specifying attributes of the GUI element you are looking for and of some of its parents.
  • Target.TimeoutMS: This property specifies the amount of time (in milliseconds) to wait for the activity to run before the SelectorNotFoundException error is thrown. The default value is 30000 milliseconds (30 seconds).
  • Target.WaitForReady: This property allows the activity to wait for the target to become ready before performing the actions. The options include None, Interactive, and Complete.

:memo: Using the Find Children Activity: A Step-by-Step Guide

Here is a step-by-step guide on how to use the Find Children Activity in UiPath:

In the diagram above:

  1. Start by creating a new sequence in UiPath Studio.
  2. Drag and drop the Find Children Activity into the sequence.
  3. In the Properties panel, set the Target.Selector property to identify the UI element that contains the children you want to find.
  4. Set the Filter property to specify the type of children you want to find.
  5. Set the Scope property to determine how deep the activity will search for children.
  6. Use a For Each activity to iterate over the enumerable collection of UI elements returned by the Find Children Activity.
  7. Inside the For Each loop, you can use other activities to interact with each child element.

:dart: Practical Examples of the Find Children Activity

Here are some practical examples of how the “Find Children” activity can be used in UiPath:

  • Data Scraping: The Find Children activity can be used to scrape data from a table or list on a webpage. By setting the scope to “FIND_DESCENDANTS”, the activity can retrieve all elements within the table or list, which can then be iterated over to extract the desired data.
  • Form Filling: If you need to fill out a form with multiple fields, the Find Children activity can be used to retrieve all input fields within the form. You can then iterate over the fields and input the necessary data.
  • Menu Navigation: The Find Children activity can be used to navigate through a dropdown menu or a menu with multiple options. By retrieving all child elements of the menu, you can iterate over the options and select the desired one.

:bar_chart: Diagrammatic Representation of Troubleshooting Tips for the Find Children Activity

:tada: Conclusion

The Find Children activity is a powerful tool in UiPath’s arsenal, allowing you to interact with complex UI structures with ease. With a good understanding of its properties and how to use them, you can automate a wide range of tasks involving structured documents like tables and trees. Happy automating!

Author : Franck MONGO. - Intelligent Process Automation Consultant
Using generative AI, I enhance RPA developers’ daily tasks with my tools, available at IpaCopilot