Description
The version
property returns the version number of the application.
Declaration
Applies To
The property is applied to the following object:
Property Value
A string that holds the version number.
Example
The code below obtains the version of the Mozilla Firefox browser currently running on your computer.
JavaScript, JScript
function AppVersion()
{
// Launches the Firefox web browser and obtains the process
Browsers.item(btFirefox).Run("about:blank");
var firefox = Sys.Browser("firefox");
// Obtains information about the application
var AppInfo = firefox.AppInfo;
// Obtains the application's version
// and posts it to the test log
var Vers = AppInfo.version;
Log.Message("Version number: " + Vers);
}
Python
def AppVersion():
# Launches the Firefox web browser and obtains the process
Browsers.item[btFirefox].Run("about:blank")
firefox = Sys.Browser("firefox")
# Obtains information about the application
AppInfo = firefox.AppInfo
# Obtains the application"s version
# and posts it to the test log
Vers = AppInfo.version
Log.Message("Version number: " + Vers)
VBScript
Sub AppVersion
' Launches the Firefox web browser and obtains the process
Browsers.item(btFirefox).Run("about:blank")
Set firefox = Sys.Browser("firefox")
' Obtains information about the application
Set AppInfo = firefox.AppInfo
' Obtains the application's version
' and posts it to the test log
Vers = AppInfo.version
Log.Message("Version number: " & Vers)
End Sub
DelphiScript
function AppVersion;
var firefox, AppInfo, Vers;
begin
// Launches the Firefox web browser and obtains the process
Browsers.item(btFirefox).Run('about:blank');
firefox := Sys.Browser('firefox');
// Obtains information about the application
AppInfo := firefox.AppInfo;
// Obtains the application's version
// and posts it to the test log
Vers := AppInfo.version;
Log.Message('Version number: ' + Vers);
end;
C++Script, C#Script
function AppVersion()
{
// Launches the Firefox web browser and obtains the process
Browsers["item"](btFirefox)["Run"]("about:blank");
var firefox = Sys["Browser"]("firefox");
// Obtains information about the application
var AppInfo = firefox["AppInfo"];
// Obtains the application's version
// and posts it to the test log
var Vers = AppInfo["version"];
Log["Message"]("Version number: " + Vers);
}