Platform Property

Applies to TestComplete 14.72, last modified on December 24, 2020

Description

Use the Platform property to determine whether the web browser is a 32-bit or a 64-bit application.

Declaration

BrowserInfoObj.Platform

Read-Only Property Integer
BrowserInfoObj An expression, variable or parameter that specifies a reference to a BrowserInfo object

Applies To

The property is applied to the following object:

Property Value

One of the following constants defined in the Browsers object:

Constant Value Description
pX86 0 The browser is a 32-bit application.
pX64 1 The browser is a 64-bit application.
pAny -1 The browser is running on a remote computer, and it is not possible to determine the browser’s version.

Example

The code below verifies whether a 32-bit or a 64-bit instance of Internet Explorer was launched:

JavaScript, JScript

function CheckIEPlatform()
{
  Browsers.Item(btIExplorer).Run();
  if (Browsers.CurrentBrowser.Platform == Browsers.pX86)
    Log.Message("You are using a 32-bit version of Internet Explorer.");
  else
    Log.Message("You are using a 64-bit version of Internet Explorer.");
}

Python

def CheckIEPlatform():
  Browsers.Item[btIExplorer].Run();
  if (Browsers.CurrentBrowser.Platform == Browsers.pX86): 
    Log.Message("You are using a 32-bit version of Internet Explorer.");
  else:
    Log.Message("You are using a 64-bit version of Internet Explorer.");

VBScript

Sub CheckIEPlatform
  Browsers.Item(btIExplorer).Run
  If Browsers.CurrentBrowser.Platform=Browsers.pX86 Then
    Log.Message("You are using a 32-bit version of Internet Explorer.")
  Else
    Log.Message("You are using a 64-bit version of Internet Explorer.")
  End If
End Sub

DelphiScript

procedure CheckIEPlatform;
begin
  Browsers.Item(btIExplorer).Run;
  if Browsers.CurrentBrowser.Platform = Browsers.pX86 then
    Log.Message('You are using a 32-bit version of Internet Explorer.')
  else
    Log.Message('You are using a 64-bit version of Internet Explorer.');
end;

C++Script, C#Script

function CheckIEPlatform()
{
  Browsers["Item"](btIExplorer)["Run"]();
  if (Browsers["CurrentBrowser"].Platform == Browsers["pX86"])
    Log["Message"]("You are using a 32-bit version of Internet Explorer.");
  else
    Log["Message"]("You are using a 64-bit version of Internet Explorer.");
}

See Also

BrowserInfo Object
Family Property
Description Property
RunOptions Property
Version Property

Highlight search results