GetObjectByParent Method

Description

Retrieves the object according to the specified parent object and object name.

Important Information

This method is similar to the GetObject method, but enables you to supply an object for the parent argument (if available) rather than a string. 

Supplying an object results in better performance.

Syntax

object.GetObjectByParent(Parent, Object)

Syntax Details

ArgumentDescription
objectAn expression evaluating to an object of type ObjectRepositoryUtil.
ParentRequired. 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 the object you want to retrieve is a top-level object, or you want to retrieve a checkpoint or output value object, specify NULL as the Parent argument value.

 

ObjectRequired. A String value. The object (without it's parent path), as it is written in the Editor, for example, WebEdit("password") or CheckPoint("MyCheckpoint") 

Return Type

An Object object.  The specified object's IDispatch pointer.

Tip: You can use the returned object as an argument value for other methods (for example, CopyObject, GetLogicalName, and UpdateObject.)

For test objects, you can also use the GetTOProperty and SetTOProperty methods to modify a returned test object's properties before updating the object in the object repository (using UpdateObject.)