Address Property

Applies to TestComplete 15.70, last modified on December 17, 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.

Description

The Address property specifies the network name or IP address of the remote computer (see the Address property of the host).

Declaration

HostObj.Address

Read-Write Property String
HostObj An expression, variable or parameter that specifies a reference to a Host object

Applies To

The property is applied to the following object:

Property Value

A string that represents the host’s address.

Example

The code below creates a new host, specifies properties for it (name, address, user name, and so on) and then checks whether the created host can be used by a network suite.

JavaScript, JScript

function HostObj()
{
  // Creates a new host
  var Host = NetworkSuite.Hosts.AddNew();
  // Specifies the host's parameters
  Host.Name = "Host1";
  Host.Address = "TEST-W764";
  Host.Domain = "EDGS";
  Host.UserName = "tester";
  Host.Password = "123";
  
  // Verifies whether the created host can be used by a network suite
  if (Host.Verify)
    Log.Message("The host properties are valid.")
  else
    Log.Warning("The host properties aren't valid.");
}

Python

def HostObj():
  # Creates a new host 
  Host = NetworkSuite.Hosts.AddNew()
  # Specifies the host's parameters 
  Host.Name = "Host1"
  Host.Address = "TEST-W764"
  Host.Domain = "EDGS"
  Host.UserName = "tester"
  Host.Password = "123"
  # Verifies whether the created host can be used by a network suite 
  if Host.Verify:
    Log.Message("The host properties are valid.")
  else: 
     Log.Warning("The host properties aren't valid.")

VBScript

Sub HostObj

  ' Creates a new host
  Set Host = NetworkSuite.Hosts.AddNew
  ' Specifies the host's parameters
  Host.Name = "Host1"
  Host.Address = "TEST-W764"
  Host.Domain = "EDGS"
  Host.UserName = "tester"
  Host.Password = "123"
  
  ' Verifies whether the created host can be used by a network suite
  If Host.Verify Then
    Log.Message("The host properties are valid.")
  Else
    Log.Warning("The host properties aren't valid.")
  End If
  
End Sub

DelphiScript

function HostObj;
var Host;
begin

  // Creates a new host
  Host := NetworkSuite.Hosts.AddNew;
  // Specifies the host's parameters
  Host.Name := 'Host1';
  Host.Address := 'TEST-W764';
  Host.Domain := 'EDGS';
  Host.UserName := 'tester';
  Host.Password := '123';
  
  // Verifies whether the created host can be used by a network suite
  if (Host.Verify) then
    Log.Message('The host properties are valid.')
  else
    Log.Warning('The host properties aren''t valid.');

end;

C++Script, C#Script

function HostObj()
{
  // Creates a new host
  var Host = NetworkSuite["Hosts"]["AddNew"]();
  // Specifies the host's parameters
  Host["Name"] = "Host1";
  Host["Address"] = "TEST-W764";
  Host["Domain"] = "EDGS";
  Host["UserName"] = "tester";
  Host["Password"] = "123";
  
  // Verifies whether the created host can be used by a network suite
  if ( Host["Verify"] )
    Log["Message"]( "The host properties are valid." )
  else
    Log["Warning"]( "The host properties aren't valid." );
}

See Also

Distributed Testing
BasePath Property
State Property

Highlight search results