Add Unit References Dialog

Applies to TestComplete 15.63, last modified on April 23, 2024

Use the Add Unit References dialog to link one or more scripting units. This should be done if you want to call routines or variables that are declared in another unit.

Note: The dialog is not available in JavaScript projects. Use the Import Functionsdialog instead.

The dialog is called by clicking Add Unit References in the context menu of the Project Explorer panel. This menu item is available when a scripting unit is chosen in the Project Explorer and the project has more than one scripting unit.

Add Unit References Dialog

The dialog displays a list of available scripting units and allows you to perform two contrary actions: you can either link a number of units to the unit for which the dialog was called, or link the given unit to a number of other units. The first action modifies the code of the given unit, while the second changes the code of the other unit(s).

To link units to the given unit, choose the Add the following unit references to the <Unit_Name> unit action type. To link the given unit to other units, select the Add the <Unit_Name> unit reference to the following units action type.

The available units are listed in the table in the center of the dialog. The Unit Name column displays unit names, the Current Unit References column displays the names of units that are already referred to from the given unit.

To add a reference to a listed unit, mark the check box next to its name. If the current unit already refers to (or is referred from) the listed unit, then the unit name is grayed. To add references to all units, click Select All. To clear the selection, click Unselect All.

Note: In JScript, C#Script and C++Script circular references are not allowed. See Calling Routines and Variables Declared in Another Unit from GUI.

To link the selected units, press OK. Cancel will close the dialog discarding any changes.

See Also

Calling Routines and Variables Declared in Another Unit from GUI
Import Functions Dialog

Highlight search results