|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.|
WaitForState method delays script execution until the network suite in the current project reaches the specified state, unless a specified time limit is reached first.
|WaitTime||[in]||Optional||Integer||Default value: 0|
The method is applied to the following object:
The method has the following parameters:
Specifies the network suite’s state to be waited for. Read the Network Suite States topic to learn about available network suite states.
Sets the time limit in milliseconds. 0 means indefinite time limit.
True if the expected state is reached, and False otherwise.
NetworkSuite.State property in order to simply check the state of the Network Suite in the current project.
The following script halts the network suite’s execution if it does not stop on its own for a specified period.
if (! NetworkSuite.WaitForState(ns_Idle, 600000))
if not NetworkSuite.WaitForState(ns_Idle, 600000): NetworkSuite.Stop()
If Not NetworkSuite.WaitForState(ns_Idle, 600000) Then
if not NetworkSuite.WaitForState(ns_Idle, 600000) then
if (! NetworkSuite["WaitForState"](ns_Idle, 600000))