IEZoneSettingsManager Object

Applies to TestComplete 15.68, last modified on October 03, 2024

Description

The IEZoneSettingsManager object is a helper object that is used to obtain access to Internet Explorer options. IEZoneSettingsManager contains two methods that return the IEZoneSettings objects, which provide a scripting interface to Internet Explorer options.

To obtain access to the IEZoneSettingsManager object in scripts, use the IEZoneSettings property of the Options object.

Members

Example

The code below obtains the Run ActiveX controls and plugins option of Internet Explorer by using the IEZoneSettingsManager object.

JavaScript, JScript

function IEZoneDemo()
{
  // Obtains zone settings of Internet Explorer
  var ieOptions = Options.IEZoneSettings;
  // Obtains the settings of the "smartbear.com" zone
  var ZoneURL = "http://smartbear.com";
  var ZoneSet = ieOptions.GetZoneSettingsForUrl(ZoneURL);
  // -- or --
  // Obtains the settings of the "MyComputer" zone
  var MyCompZoneID = 0;
  var ZoneSet = ieOptions.GetZoneSettingsById(MyCompZoneID);
  
  // Changes the value of the option
  ZoneSet.RunActiveXControlsAndPlugIns = 1; // Enables the option
  
  // ...
  // Performs test commands
  // ...
}

Python

def IEZoneDemo():

  # Obtains zone settings of Internet Explorer
  ieOptions = Options.IEZoneSettings
  # Obtains the settings of the "smartbear.com" zone
  ZoneURL = "http:\\smartbear.com"
  ZoneSet = ieOptions.GetZoneSettingsForUrl(ZoneURL)
  # -- or --
  # Obtains the settings of the "MyComputer" zone
  MyCompZoneID = 0
  ZoneSet = ieOptions.GetZoneSettingsById(MyCompZoneID)
  
  # Changes the value of the option
  ZoneSet.RunActiveXControlsAndPlugIns = 1 # Enables the option
  
  # ...
  # Performs test commands
  # ...

VBScript

Sub IEZoneDemo()

  ' Obtains zone settings of Internet Explorer
  Set ieOptions = Options.IEZoneSettings
  ' Obtains the settings of the "smartbear.com" zone
  ZoneURL = "http://smartbear.com"
  Set ZoneSet = ieOptions.GetZoneSettingsForUrl(ZoneURL)
  ' -- or --
  ' Obtains the settings of the "MyComputer" zone
  MyCompZoneID = 0
  Set ZoneSet = ieOptions.GetZoneSettingsById(MyCompZoneID)
  
  ' Changes the value of the option
  ZoneSet.RunActiveXControlsAndPlugIns = 1 ' Enables the option
  
  ' ...
  ' Performs test commands
  ' ...
  
End Sub

DelphiScript

function IEZoneDemo;
var ieOptions, ZoneURL, ZoneSet, MyCompZoneID, ZoneSet;
begin

  // Obtains zone settings of Internet Explorer
  ieOptions := Options.IEZoneSettings;
  // Obtains the settings of the "smartbear.com" zone
  ZoneURL := 'http://smartbear.com';
  ZoneSet := ieOptions.GetZoneSettingsForUrl(ZoneURL);
  // -- or --
  // Obtains the settings of the "MyComputer" zone
  MyCompZoneID := 0;
  ZoneSet := ieOptions.GetZoneSettingsById(MyCompZoneID);
  
  // Changes the value of the option
  ZoneSet.RunActiveXControlsAndPlugIns := 1; // Enables the option
  
  // ...
  // Performs test commands
  // ...

end;

C++Script, C#Script

function IEZoneDemo()
{
  // Obtains zone settings of Internet Explorer
  var ieOptions = Options["IEZoneSettings"];
  // Obtains the settings of the "smartbear.com" zone
  var ZoneURL = "http://smartbear.com";
  var ZoneSet = ieOptions["GetZoneSettingsForUrl"](ZoneURL);
  // -- or --
  // Obtains the settings of the "MyComputer" zone
  var MyCompZoneID = 0;
  var ZoneSet = ieOptions["GetZoneSettingsById"](MyCompZoneID);
  
  // Changes the value of the option
  ZoneSet["RunActiveXControlsAndPlugIns"] = 1; // Enables the option
  
  // ...
  // Performs test commands
  // ...
}

See Also

Options Object
IEZoneSettings Object
IESettings Object

Highlight search results