Each object has its unique ID. To get a child object of the current one by the ID of this child object, use the
|TestObj||A variable, parameter or expression that specifies a reference to one of the objects listed in the Applies To section|
|RefreshTree||[in]||Optional||Boolean||Default value: True|
All processes, windows, controls and onscreen objects.
To view this method in the Object Browser panel and in other panels and dialogs, activate the Advanced view mode.
The method has the following parameters:
Specifies the object ID. The method returns the object that has the same ID.
TestComplete performs the search in the cached copy of the object hierarchy, which may not correspond to the actual hierarchy of objects in the tested application. This may happen, for instance, if the actions that precedes the search caused changes in the application state. The RefreshTree parameter lets you specify what TestComplete should do if no object matching the search criteria was found in the cached object tree. If it is True (default), TestComplete will refresh the cached object tree and perform the search once again. If it is False, TestComplete will not refresh the object tree and will return a stub object indicating that the search failed.
The object that has the specified ID. If no object with that ID was found, the
FindID method returns a stub object that only contains the
Exists property equal to False. So, you can check the
Exists property value of the returned object to determine whether the search was successful.