GetUnderlyingObject method is added to any object that is mapped with the Name Mapping feature.
GetUnderlyingObject method to obtain reference to the test object, to which the mapped object corresponds. You need to use this method when the test object contains a method or property, whose name coincides with the name of some child mapped item. See the Remarks section below.
To all mapped processes, windows and controls.
A test object, to which NameMappingObj corresponds.
After you map a test object, its methods, properties and child objects become accessible through the Alias or NameMapping item that corresponds to this test object.
It is possible that the Alias or NameMapping item has a child item, whose name coincides with a method or property name of the underlying test object:
The Name Mapping editor
The Code Editor
When the test engine meets this name in a test, it is unable to determine whether you wanted to call the method or property, or whether you wanted to obtain the child item, but specified parameters by mistake. Here is how you can resolve the issue:
To call the method or property, use the
GetUnderlyingObject()method to obtain the underlying test object reference, and then call the needed method or property in a usual manner:
To obtain a child item, specify its name and do not use parameters.
|Note:||Due to specifics of implementation, the
See the example in the Remarks section above.