Set Variable Value Operation

Applies to TestComplete 14.0, last modified on January 23, 2019

Description

Use the Set Variable Value operation to assign values to a keyword test variable or to project, project suite or network suite variables.

Operation Result

The operation does not return any value.

Scripting Analogue

The operation is a keyword test analogue to setting the variable values from a script.

Child Operations

The operation cannot have child operations.

Operation Parameters

When you add the operation to your keyword test, TestComplete displays the wizard that contains the following pages:

Select Variable

On this page you can choose the variable whose value will be set with the operation. If the variable does not exist, you can create it by clicking Add Variable and specifying the variable’s name, type and value in the ensuing Add Variable wizard.

Table Indexes

This page is displayed if the variable that you selected on the previous page is a table variable. On this page you can specify the column and row indexes of the table element to be set. Both column and row indexes are zero-based. You can either type the desired index or click the ellipsis button and specify it in the ensuing Edit Parameter dialog.

Set New Value

On this page, you can specify the parameter that contains the value to be assigned to the variable that you chose on the Select Variable page. The page contains only one parameter:

NewValue

Variant. Specifies the value to be assigned to the variable.

Modifying Parameters

After the operation was added to the operation, you can change the parameters by using dialogs and in-place editors provided by the Keyword Test editor.

To specify another variable:

  • Select the Set Variable Value operation in the Keyword Test editor.

  • Click within the Operation cell and choose the desired variable from the drop-down list.

  • Press Enter to confirm the changes and to close the in-place editor. Press Esc to close the editor discarding any changes.

To change the value to be assigned:

  • Select the Set Variable Value operation in the Keyword Test editor.

  • Click the Value cell twice (not a double-click) or select the Value cell and press F2. This will activate the cell’s in-place editor.

  • Click the ellipsis button of the in-place editor. This will invoke the Edit Value dialog, in which you can specify the needed value. For information on settings values in this dialog, see Specifying Operation Parameters.

  • Press OK in the dialog to apply the changes and to close the dialog.

  • Press Enter to confirm the changes and to close the in-place editor. Press Esc to close the editor discarding any changes.

See Also

Statements Category
Specifying Operation Parameters
Checking Operation Result
Keyword Test Variables
Project And Project Suite Variables
Network Suite Variables
Variables Object

Highlight search results