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 Properties
By default, TestComplete stores all the objects with which your tests interact in the Name Mapping repository. For each object, you can specify properties by which TestComplete will find the object in the application, and a user-friendly name (alias) to address the object from tests.
Object Browser Naming Notation
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,
Process
, Window
, Browser
, Page
, WinForms
object, XFObject
, etc.) and by its properties (for example, ClassName
or Caption
).
Using Microsoft Active Accessibility
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,
Caption
.
Using Microsoft UI Automation Technology
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.
Using Text Recognition Technology (For Desktop applications only)
You can identify custom-drawn objects in Windows desktop applications by their text contents.
By Images
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.