About Object Browser Naming Notation

Applies to TestComplete 14.30, last modified on November 21, 2019

Applications, windows, and controls that TestComplete recognizes in your system and on mobile devices connected to your computer form a hierarchical structure. You can view it in the Object Browser in TestComplete:

Object hiearchy in Object Browser

Click the image to enlarge it.

Each object in the structure is identified by its type (for example, Process, Browser, Window, WinForms, XFObject, and so on) and its properties (for example, ClassName or Caption). To identify an object, TestComplete uses properties that distinguish the object from other similar objects uniquely and remain unchanged during the application run. TestComplete also can use a combination of properties. For example, to identify a process, it can use the name of the process executable and the process index, and to identify a window, it can use the window class name, caption, and index.

An object name depends on whether the application, to which the object belongs, is an Open Application. To identify Open Application objects, TestComplete can use the name defined for them in the application source code. Usually, this name does not change during the run and between test sessions. However, these names can be difficult to understand.

For complete information on the naming rules used for processes, windows, and controls in the Object Browser, see the following topics:

When addressing objects from tests, the object’s position in the hierarchy must be followed. For example, to get a window, you first get a process, to which the window belongs. To get a control, you first get a process and then a window, to which the control belongs, and so on.

The FullName property specifies the object’s full name, which includes the names of parent objects. In fact, FullName identifies the object in the system uniquely. The Name property identifies the object among its siblings.

You can see both Name and FullName in the Object Browser.

Properties TestComplete uses to identify objects in the Object Browser (for instance, Caption or Index) can change during the application run. You may have to use various names to identify the same process or window in tests. Another problem with default names is that they are difficult to understand — it may be difficult to find the actual UI element that corresponds to the name. To learn how to avoid these issues, see Mapping Names below.

Mapping Names

In TestComplete, you can assign custom names to any object existing in the system. You do this by mapping object names in the Name Mapping repository. This makes tests easier to read and understand.

When mapping object names, you also define a combination of properties to use to search for an object. This makes the tests more stable and prone to changes in the tested application.

Which name — mapped or full —TestComplete uses during the recording depends on whether the object is mapped. For mapped objects, TestComplete uses their mapped name (or alias). If the object is not mapped, TestComplete will use the full name. If Options > Engines > Name Mapping > Map object names automatically is enabled, TestComplete will map all objects with which you interact during the test recording automatically and use their alias to address them in tests.

To learn more about name mapping, see About Name Mapping.

See Also

Object Browser Naming Notation
Name Mapping

Highlight search results