NetworkSuite.WaitForNetVarChange Method

Applies to TestComplete 15.64, last modified on June 12, 2024
The Network Suite functionality is deprecated. We don’t recommend using it for distributed testing. Consider using a CI/CD system for managing distributed tests. See Migrating Distributed Tests to CI/CD Systems for details. In case you need to run web tests on multiple environments in parallel, you can also try using your project’s Execution Plan.


The WaitForNetVarChange method delays script execution in the current project until the value of the specified network suite variable changes definitely or the specified time limit is reached.


NetworkSuite.WaitForNetVarChange(VarName, VarValue, WaitTime)

VarName [in]    Required    String    
VarValue [in]    Required    Variant    
WaitTime [in]    Optional    Integer Default value: 0   
Result Boolean

Applies To

The method is applied to the following object:


The method has the following parameters:


The name of the needed network suite variable. Though you have to put the NetworkSuite.Variables. prefix before the variable name when using network suite variables in scripts, it should not be used with WaitForNetVarChange.


The value of the network suite variable to be waited for.


Sets the time limit in milliseconds. 0 (the default value) means the waiting time is infinite.

Result Value

True if the expected value is set to this variable, and False otherwise.


The following script halts the network suite's execution if the network suite variable VisualTestPassed doesn't get the True value within the specified period.

JavaScript, JScript

if (!NetworkSuite.WaitForNetVarChange("VisualTestPassed", true, 600000))


if not NetworkSuite.WaitForNetVarChange("VisualTestPassed", True, 600000):


If NetworkSuite.WaitForNetVarChange("VisualTestPassed", True, 600000) = False Then
End If


if not NetworkSuite.WaitForNetVarChange('VisualTestPassed', true, 600000) then

C++Script, C#Script

if (!NetworkSuite["WaitForNetVarChange"]("VisualTestPassed", true, 600000))

See Also

Distributed Testing
OnNetVarChange Event
Network Suite Variables

Highlight search results