Determining the version of an installed Web Browser

Determining the version of an installed Web Browser

The BrowserApplication winclass provides no property or method to retrieve the current version of an installed browser and a custom function must be created to determine the required information. The attached "GetBrowserVersion.inc" include file provides the following functions for determining the version of a particular browser:

  • STRING GetIEVersion( )
  • STRING GetFirefoxVersion()
  • STRING GetChromeVersion()
  • STRING GetBrowserVersion(ANYTYPE pBrowserType)


To retrieve the currently installed version of a particular any of the following calls can be made:

[ ] //GetBrowserVersion examples
[ ] print(GetBrowserVersion(FindBrowserApplication("/BrowserApplication")))
[ ] print(GetBrowserVersion("Firefox"))
[ ] print(GetBrowserVersion("Google Chrome"))
[ ] print(GetBrowserVersion("Internet Explorer"))
[ ]
[ ] //Others
[ ] print(GetIEVersion())
[ ] print(GetFirefoxVersion())
[ ] print(GetChromeVersion())

The output of the above functions is as follows:

[ ] IE 9.0
[ ] Firefox 21.0
[ ] Google Chrome 30.0
[ ] IE 9.0
[ ] 9.0
[ ] 21.0
[ ] 30.0

GetBrowserVersion.zip

DISCLAIMER:

Some content on Community Tips & Information pages is not officially supported by Micro Focus. Please refer to our Terms of Use for more detail.
Top Contributors
Version history
Revision #:
1 of 1
Last update:
‎2013-10-30 19:29
Updated by:
 
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.