Applies to TestComplete 14.71, last modified on November 24, 2020
In automated tests, to simulate user actions on an object in your tested application, you first need to identify the object, that is, to instruct TestComplete on how to locate the object in your tested application. You can identify objects in the following ways:
By Search Criteria
By default, TestComplete stores all the objects with which your tests interact in the Name Mapping repository. For each object, you can specify search criteria (properties provided by TestComplete or XPath expressions or CSS selectors) by which TestComplete will find the object in the application, and a user-friendly name (alias) to address the object from tests.
For ExampleHide Example
All applications, windows, and controls that TestComplete recognizes in your system or on attached mobile devices form a hierarchy. You can view the hierarchy in the Object Browser. Each object in the hierarchy is identified by its type (for example,
, etc.) and by its properties (for example,
For ExampleHide Example
You can use accessibility information provided by your tested application via the Microsoft Active Accessibility (MSAA) engine to recognize objects in it. Each object will be identified by its accessibility role and properties provided by the engine, for example,
You can also use information provided by your tested application via the UI Automation framework to recognize objects in it. In this case, objects will be identified by the properties exposed by UI Automation providers.
By Text Contents
You can command TestComplete to get and recognize the text of a control on screen and then identify the control or control parts by the text contents.
You can identify custom-drawn objects in Windows desktop applications by their text contents.
If your tested application is a “black-box” application, that it, it provides access neither to its internal properties, nor to its accessibility information and text contents, you can identify individual controls in the application by their images.
Related Topics of Interest
You can implement extended support for custom .NET and WPF controls using TestComplete SDK.
If your custom control’s API is compatible with one of the controls TestComplete supports, you can map your control class to the supported class to command TestComplete to recognize it.
Testing With TestComplete