Returns the current browser type.
This functionality is supported only if you are using the Classic Agent. For additional information, refer to the Silk Test Classic Classic Agent Help.
browserApplication.getProperty("browsertype")
BrowserType = GetBrowserType ([hMachine])
Variable | Description |
---|---|
BrowserType | The current browser type. BROWSERTYPE. |
hMachine | Optional: The handle for a specific machine. Default is the current machine. HMACHINE. |
If the current browser has been set in a script with the SetBrowserType function, GetBrowserType returns that browser type for the current machine or for the specified machine if the optional argument is used.
If the current browser has not been set in a script, GetBrowserType returns the BROWSERTYPE set for Default Browser in Runtime Options; if no browser is specified in Runtime Options, GetBrowserType returns NULL.
browserApplication.getProperty("browsertype")
BROWSERTYPE btType btType = GetBrowserType () Print ("Browser is {btType}") // Result if Explorer 7.0 is current browser: // Browser is Internet Explorer 7.0