GetObject Method


Retrieves the object according to the specified path.

Important Information

This method is similar to the GetObjectByParent method, but it enables you to supply the entire object path (including the parent object information) as a string. This is useful when you do not have access to an object containing the parent.

If you do have access to the parent as an object (rather than a string), it is recommended to use the GetObjectByParent method for better performance.



Syntax Details

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

The full path of the test object, as it is written in the Editor. For example:

Browser("Advantage Shopping").Page("Advantage Shopping").WebEdit("subjectTextareaContactUs")


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.)