NetworkSuite.State Property

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

Description

The State property returns the state of the network suite in the current project.

Declaration

NetworkSuite.State

Read-Only Property Integer

Applies To

The property is applied to the following object:

Property Value

An integer value that stands for the network suite’s state of the current project. Read the Network Suite States topic to learn about available network suite states.

Remarks

Use the NetworkSuite.WaitForState method to delay script execution until the network suite reaches a particular state.

Example

The following code is an event handler for the OnNetSuiteStateChange event. Every time the event occurs, the network suite’s state is posted to the test log.

JavaScript, JScript

// Handler for the event occurring each time the network suite state changes
function GeneralEvents_OnNetSuiteStateChange(Sender)
{
  Log.Message("New Network Suite State = " + aqConvert.IntToStr(NetworkSuite.State));
}

Python

# Handler for the event occurring each time the network suite state changes
def GeneralEvents_OnNetSuiteStateChange():
  Log.Message("New Network Suite State = " + aqConvert.IntToStr(NetworkSuite.State))

VBScript

' Handler for the event occurring each time the network suite state changes
Sub GeneralEvents_OnNetSuiteStateChange(Sender)
  Log.Message("New Network Suite State = " + aqConvert.IntToStr(NetworkSuite.State))
End Sub

DelphiScript

// Handler for the event occurring each time the network suite state changes
procedure GeneralEvents_OnNetSuiteStateChange(Sender: OleVariant);
begin
Log.Message('New Network Suite State = ' + aqConvert.IntToStr(NetworkSuite.State));
end;

C++Script, C#Script

// Handler for the event occurring each time the network suite state changes
function GeneralEvents_OnNetSuiteStateChange(Sender)
{
Log["Message"]("New Network Suite State = " + aqConvert["IntToStr"](NetworkSuite["State"]));
}

See Also

Distributed Testing
NetworkSuite.ProjectType Property
NetworkSuite.Tag Property
NetworkSuite.Run Method
NetworkSuite.Stop Method
NetworkSuite.WaitForState Method
OnNetSuiteStateChange Event

Highlight search results