How to Create or Delete a Script Routine

Applies to TestComplete 12.60, last modified on September 17, 2018

Using TestComplete you can create scripts in two ways: You can either record a script or write its code manually. There no difference between these scripts.

To create a new script routine, type its name in the Code Editor. For instance, type the following text to create a new MyProc script:

JavaScript, JScript

function MyProc()

Python

def MyProc()

VBScript

Sub MyProc

DelphiScript

procedure MyProc;

C++Script, C#Script

function MyProc()

The name of a new script is added automatically to the Code Explorer panel.

To learn how to record a new script, see About Recording Automated Tests.

You can delete scripts by simply deleting their text in the Code Editor. The Code Explorer panel can be used to manage your scripts. You can delete the currently selected script in the Code Explorer by pressing Del or choosing Delete from the context menu. This will remove the script text from the unit source.

See Also

Recording Tests
About Recording Automated Tests

Highlight search results