GetDefaultBrowserType Function

Action

Returns the default browser type, which is used when new Agent connections are made.

Syntax

BrowserType = GetDefaultBrowserType()
Variable Description
BrowserType The current browser type. BROWSERTYPE.

Notes

The default browser type is the one that is used when a new Agent connection is made.

If the default browser has been set in a script with the SetDefaultBrowserType function, GetDefaultBrowserType returns that browser type.

If the default browser has not been set in a script, GetDefaultBrowserType returns the BROWSERTYPE set for Default Browser in Runtime Options; if no browser is specified in Runtime Options, GetDefaultBrowserType returns NULL.

Example

BROWSERTYPE btType
btType = GetDefaultBrowserType()
Print("Default browser is {btType}")

// Result if Windows Internet Explorer 7 is default browser:
// Default browser is Internet Explorer 7