Creating Runtime Objects

Applies to TestComplete 14.90, last modified on June 15, 2021

Script extensions allow you to create custom runtime objects that will be incorporated into the TestComplete object model. Custom objects can be used in test scripts in the same way as other objects. They are displayed in the Code Completion window, they can be watched and evaluated during the script run, and so on. They can even be used in the code of other script extensions!

Custom runtime object in the Code Completion window

The methods and properties of custom runtime objects are implemented as script routines, so writing the object code is similar to writing usual scripts. The formal declaration of the object, in its turn, is specified in the description file of the script extension package. The declaration includes the object name, namespace, member names and the names of the corresponding script routines as well as the description of the object and its members (see Structure of the Description File for details). This information is used by various TestComplete subsystems (such as the Code Completion or script debugger) to provide the user information about the object and its members.

In this section:

Creating Runtime Objects - Basic Concepts

Describes what to think about when planning the object and its functionality.

Creating Object Properties

Explains how to write the property code.

Creating Object Methods

Explains how to write method code.
Related Topics of Interest

Using Forms in Script Extensions

Explains how the runtime objects can use forms to interact with the user.

Handling Errors in Script Extensions

Discusses various aspects of exception handling in script extensions.

Structure of the Description File

Describes XML elements of the description file that is used to provide information about script extensions.
Samples and Tutorials

TestComplete includes the WMI object that was created with the script extension technology. This object is provided by the AQAScriptExtensions.tcx package that is located in the <TestComplete>\Bin\Extensions\ScriptExtensions folder. This extension package is a ZIP archive, so you can unpack it and thus view the source code of the WMI object. The object code is located in the wmiCode.vbs file, the object definition - in the description.xml file.

Creation of the WMI object is described in the following tutorial:

Creating Runtime Objects Tutorial

See Also

Script Extensions
Creating Script Extensions
Creating Custom Actions
Creating Keyword Test Operations

Highlight search results