Find Children

Estimated reading: 4 minutes 93 views

This activity allows users to retrieve a collection of child elements from a specified parent element. It is especially helpful when you need to work with several items within a section of an application, such as reading table data, going through a list, or interacting with multiple buttons. This makes it easier to automate tasks that involve multiple elements at once.

Properties

INPUT

DelayAfter: It assists the user to add a delay before initiating subsequent activities. The delay duration here is in milliseconds. By default, it is set to “300” milliseconds. When the option is left blank, the delay will not be considered.

DelayBefore: It assists the user in adding a delay before starting the execution of the activities. The delay duration here is in milliseconds. By default, it is set to “200” milliseconds. When the option is left blank, the delay will not be considered.

ExecuteBy: *Gets auto filled once the “Active Application” is selected. This contains the set of attributes for the specific spied element in “String” datatype. 

Scope: Specifies the scope for retrieving either child or descendants from the specified element.
Children: Retrieves the collection of immediate child elements from the parent element.
Descendants: Retrieves the descendants of the parent UI element, including all nested child elements.

Refer to the below documentation for further details.

WaitTime: It helps the user to add a delay to start the execution of the activity. The format of the delay here is milliseconds. By default, it will be set to 10000. When the option is left blank, no delay is considered.

MISC

DisplayName: Displays the name of the activity. The activity name can be customized which will help in troubleshooting.

SkipOnError: Specify the “Boolean” value as “True” or “False.”
True: Continue executing the workflow regardless of any errors thrown.
False: Halt the workflow if it encounters any errors.
None: If the option is left blank, the activity will, by default, behave as if “False” were chosen.

Version: It specifies the version of the feature in use.

OUTPUT

Children: This parameter provides the output of the activity as a collection of child elements retrieved from the specified parent element.
The output values are of the List<UIChildren> datatype. Refer to the guide below for instructions on declaring the variable.

Result: It provides the ability to view the execution status of the activity. It returns values in “Boolean.”
True: Indicates that the activity has been executed successfully without any errors.
False: Indicates that the activity has been unsuccessful due to an unexpected error being thrown.

*Represents mandatory fields to execute the workflow

Child & Descendant Elements

1. Child Elements: These are the direct elements within a parent element. For example, in a file explorer window (the parent), each file or folder displayed is a child element of that window.

2. Descendants: These are elements nested further inside child elements. For instance, if a child element is a folder, the files or subfolders inside that folder are its descendants.

In short, child elements are directly within the parent, while descendants are one level deeper, contained within the child elements.

How to view the output from the activity?

The “FindChildren” activity provides the output in the “List<UIChildren>” format. This list includes the following four types as output:

1. AutomationName – Provides the “name” of the detected element during the execution of the bot.
2. AutomationID – It indicates the unique identification for the detected element to identify it and making easier to interact with it. It returns the “AutomationID” as output. When there is no AutomationID, it will be returned as null value. 
3. ClassName – It indicates the “Class” of the detected element and returns the output. When there is no  ClassName available, it will be returned as null value. 
4. UIChildren – It provides the count of the UI child and descendant elements associated with the parent element.

If you want to view any of the above types as output, you need to specify this along with the ‘ForEach’ variable. For example, “Item.AutomationName”.

Share this Doc

Find Children

Or copy link

CONTENTS