GetChildrenByClass Method

Description

Retrieves all direct children of the specified class under a specified parent.

Important Information

You can use this method to enumerate the objects in an object repository and retrieve a collection of objects, even if you do not have any information about any of the objects in the object repository.

Syntax

object.GetChildrenByClass(Class, [Parent])

Syntax Details

ArgumentDescription
objectAn expression evaluating to an object of type ObjectRepositoryUtil.
ClassRequired. A String value.

The object class name as displayed in the object repository.
For both checkpoint and output objects, use CheckPoint as the Class argument.

ParentOptional. A Variant value.

The parent object.

You can specify the parent as an object (IDispatch pointer) or its full path as it appears in the Editor, for example, Browser("Advantage Shopping").Page("Advantage Shopping").

If you do not specify a parent object, all top-level objects of the specified class in the object repository are retrieved.

To retrieve all checkpoint and output objects, do not specify a value for the Parent argument.

Return Type

A TOCollection object.