Articles

[Collapse]TestComplete/viewarticle/65670/
 [Expand]General Information/viewarticle/63445/
 [Expand]Using Help System/viewarticle/55799/
 [Collapse]Getting Started Tutorial/viewarticle/56246/
  [Collapse]Introducing Automated Testing and TestComplete/viewarticle/56247/
    Automated Testing/viewarticle/63440/
    Test Types/viewarticle/58033/
    TestComplete Projects and Project Items/viewarticle/57425/
    TestComplete User Interface/viewarticle/56404/
    TestComplete Test Object Model/viewarticle/63439/
    Checkpoints and Stores/viewarticle/63441/
  [Expand]Creating Your First Test/viewarticle/63419/
   Where to Go Next/viewarticle/63420/
 [Expand]Using TestComplete/viewarticle/57875/
 [Expand]Testing Types/viewarticle/62721/
 [Expand]Applications Testing/viewarticle/62606/
 [Expand]Working With Application Objects and Controls/viewarticle/55815/
 [Expand]Samples and Tutorials/viewarticle/56239/
 [Expand]References/viewarticle/57878/
 [Expand]Other Tools That Help You Test Better/viewarticle/63442/
 [Expand]TestComplete 10 Licensing Guide/viewarticle/63451/
Updated: 11/26/2014 Applies To: TestComplete 10 Rating: GoodGoodGoodGoodGood 9 vote(s) Click to rate: PoorNot badAverageGoodExcellent
Introducing Automated Testing and TestComplete

TestComplete Test Object Model

The object structure is shown in the Object Browser panel:

The Object Browser Panel
Note: The images in this topic demonstrate the object model of desktop applications. The object model of web and mobile applications is similar.

TestComplete uses a tree-like model for test objects. For desktop and web applications, the root node of the tree is Sys, while for mobile applications, the root node is Mobile.

Processes objects correspond to applications running in the operating system. We use the term process rather than application because it corresponds to the concept of processes in Windows documentation.

A process object’s name includes the name of the process executable and its index (the index is used only if several application instances are running):

Process name

The processes have child objects - windows - that correspond to top-level windows. These objects in their turn have other child window objects that correspond to controls. The window and control names depend on whether or not the test engine has access to internal methods and properties of the application under test. TestComplete works with applications of both types, but names their windows and controls in different ways.

  • Black-box applications

    Applications that do not provide access to their internal methods and properties are called black-box applications. The name of each window of such applications includes the window’s class name, the window’s text or title (caption) and its index. Controls are named in the same manner as windows, because in terms of the operating system, a control is just another type of a window:

    Window name (black-box application)
  • White-Box Applications

    Applications that expose their internal objects, methods and properties to TestComplete are called white-box applications or Open Applications. They are marked with the icon in the Object Browser (see the image below).

    To address windows and controls of Open Applications, TestComplete uses the names that reflect the window or control type and the name defined in the application’s sources. For instance, if you have a form named MainForm in a C# application created with the Microsoft WinForms library, then TestComplete will address this form as WinFormsObject("MainForm"):

    Object name (Open Application)

For detailed information on naming processes, windows and controls, see Naming Objects.

Note: It is recommended that, whenever possible, your tests work with Open Applications rather than black-box applications. This enables the test engine to access the application’s internal methods and properties, allowing you to create more powerful and flexible tests.

Some applications like .NET, WPF, Visual Basic, Java or Web are always “open” to TestComplete. Others may need to be compiled in a special way. For more information on this, see Open Applications.

Prev     Next

See also
Introducing Automated Testing and TestComplete | Default Object Naming


© 2014 SmartBear Software. All rights reserved.
Email Send feedback on this document