The Script elements are used in the description.xml file. They correspond to the source files included in the script extension. Every script file typically contains the implementation of one or more custom actions, objects and keyword test operations.
A Script element must be a child of a ScriptExtension element.
A Script element contains one or more of the following child elements in any combination:
The element has the following attributes:
Required. Specifies the script file name. The script file must reside in the same package, in which the description.xml file is located, so you should only specify the file name and extension (without the path).
Optional. Specifies the name of the routine that performs the initialization actions. The routine is called if the initialization has not been performed yet and any of the following events happen:
A user executes an action defined by a child
The Code Completion window shows methods and properties of the object defined by a child RuntimeObject element.
-- or --
The object’s method or property is called.
The user adds an operation defined by a child KDTOperation element to a keyword test.
The user opens the project containing the keyword test that includes an operation defined by a child KDTOperation element.
Optional. Specifies the name of the routine that performs the finalization actions. The routine is called when one of the following events happen:
The user clicks Reload in the Script Extensions dialog.
Note that the finalization is only performed for those script units that was executed by the initialization. If the unit was not initialized, it is not finalized.
If the finalization is performed after the user clicked the Reload button in the Script Extensions dialog, TestComplete considers the unit as the unit that were not initialized.
The scripting language is determined by the extension of the script file:
.js - JScript file
.vbs - VBScript file