ITestable3 Interface : FindObjectId Method |
The ExternalParent xml of the Windows application object hosting the test object.
For a stand-alone application or a case where the external parent is not relevant to the testing environment, NULL is passed.
Visual Basic |
---|
Public Function FindObjectId( _ ByVal descriptionXml As String, _ ByVal externalParent As String _ ) As Variant |
- descriptionXml
- The Description xml of the object for which the ID is sought.
- externalParent
The ExternalParent xml of the Windows application object hosting the test object.
For a stand-alone application or a case where the external parent is not relevant to the testing environment, NULL is passed.
The object ID and the HRESULT S_OK if found, otherwise the HRESULT E_OBJNOTFOUND.
If more than one object fits the description, returns the HRESULT E_OJBNOTUNIQUE and an empty SAFEARRY.
- It is possible to have a non-unique description if a user builds a description manually and uses it in a test, if the application being tested changes during the run, or if the user manually changes properties of the object in the Object Repository.
- In the following situations, implement FindObjectID2 instead of this method:
- If you want to support Smart Identification, enabling UFT to single out the correct object when more than one object matches the description.
- If you implement the ITestable3 interface to support adding test-object-related information to the run results. In this case, UFT calls FindObjectID2 instead of FindObjectID. Therefore you must implement FindObjectID2, even if you do not need to support Smart Identification.