GetObject Method
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.
object.GetObject(ObjectPath)
Argument | Description |
object | An expression evaluating to an object of type ObjectRepositoryUtil. |
ObjectPath | Required. 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") or CheckPoint ("MyCheckpoint")
|
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.)