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), OpenText Functional Testing calls FindObjectId2 with the stored description. The method returns the object IDs for all objects that match the description. This enables OpenText Functional Testing to use Smart Identification (if the OpenText Functional Testing user configures it) to single out the appropriate object. For more information, see Smart Identification.

If the requested object is not found, OpenText Functional Testing calls FindObjectId2 repeatedly until a time out is reached, to accommodate cases in which the object takes a few seconds to load.

The description that OpenText Functional Testing passes to FindObjectId2 can include regular expressions defined by the OpenText Functional Testing user. You must implement the FindObjectId2 method to handle regular expression, 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, OpenText Functional Testing calls ITestable.FindObjectId. 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.