You can use Ruby to read values from Window's Registry showing which
version of a browser is installed.
IE's version is stored as a String value at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Version
Firefox's version is stored as a String value at:
Win 64bit = HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Mozilla
Firefox\Current Version
Win 32bit = HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox
\Current Version
Chrome's version is stored as a String value at:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion
\Uninstall\Google Chrome\Version
Here is info on how to read the registrry with ruby:
http://ruby-doc.org/stdlib-1.9.1/libdoc/dl/rdoc/dl/win32/lib/win32/registry_rb.html?TB_iframe=true&height=550&width=785
That's a reliable way that I've used on WIN XP, Vista, and WIn7.
On Mar 1, 9:33 am, Dan <[email protected]> wrote:
> Is there a built in way in watir-webdriver or ruby to get the version
> number of the browser that's running on the host machine? I can probably
> scrape that off of chrome://version/ and about:support in Firefox, but I'm
> wondering if someone knows of a better way.
--
Before posting, please read http://watir.com/support. In short: search before
you ask, be nice.
[email protected]
http://groups.google.com/group/watir-general
[email protected]