Implementing FindObjectId or FindObjectID2: Map a description to an object ID

When OpenText Functional Testing needs to locate an object in the application based on the description stored in the test (for example, when running a test), it calls FindObjectId2 with the stored description. The method returns the object IDs for all objects that match the description. This enables the use of Smart Identification (if the user configures it) to single out the appropriate object. For more information, see Smart Identification.

If the requested object is not found, FindObjectId2 is called repeatedly until a timeout is reached, to accommodate cases in which the object takes a few seconds to load.

The description passed to FindObjectId2 can include regular expressions defined by the OpenText Functional Testing user. You must implement the FindObjectId2 method to handle regular expressions, if necessary, to locate the object that matches the description. For more information on using regular expressions in OpenText Functional Testing, see the OpenText Functional Testing Help Center .

FindObjectId2 is defined in interface ITestable2. This method replaces ITestable.FindObjectId and adds the functionality of finding multiple matches and handling regular expressions.

If you do not implement ITestable2, ITestable.FindObjectId is called. In this case, the added functionalities are not available. If you do implement ITestable2, OpenText Functional Testing always calls ITestable2::FindObjectId2, without checking whether ITestable.FindObjectId exists.