You can use script extensions to create new actions (commands) that will be added to TestComplete toolbars during test recording and design-time. These actions can assist you in creating tests. For example, they can create custom checkpoints and generate the corresponding verification code for you, display test creation tutorials, and perform many other useful operations.
Custom actions are added to TestComplete toolbars next to standard commands. Record-time actions are added to the Recording toolbar:
design-time actions -- to the Tools toolbar:
The actions are implemented as script routines, which are executed when the user clicks the action button on the toolbar. To let TestComplete know which actions an extension provides and which script routines they execute, actions are defined in the description file of the extension’s package. The definition includes the action name, type (record-time or design-time) and the name of the underlying script routine (see Structure of the Description File for details).
The topics in this section provide detailed information about creating custom actions:
Creating Actions - Basic Concepts
Related Topics of Interest
Using Forms in Script Extensions
Handling Errors in Script Extensions
Structure of the Description File
Samples and Tutorials
TestComplete includes the clipboard and manual checkpoints that are created with the script extension technology. These checkpoints are 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 Clipboard Checkpoint and Manual Checkpoint commands. The source code of the commands are located in the clcCode.js and mncCode.js files respectively, the commands’ definition - in the description.xml file.
Implementation of clipboard checkpoints is described in the following tutorial:
See Also
Script Extensions
Creating Script Extensions
Creating Runtime Objects
Creating Keyword Test Operations