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!
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:
Related Topics of Interest
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: