First your running some ancient Ruby and Watir. Consider moving forward.
see reference: https://raveendran.wordpress.com/tag/execute_script/
Code for Watir WebDriver IE Browser :
require 'rubygems'
require 'watir-webdriver'
br=Watir::Browser.new :ie
ie=br.execute_script("return navigator.userAgent;")
puts ie.split("MSIE ")[1].split(";")[0]
On Wednesday, April 9, 2014 11:39:40 PM UTC-5, Bhavesh wrote:
>
> Hi,
>
>
>
> I have Ruby 1.8.7 with watir 1.6.5.
>
>
>
> I need following info:
>
>
>
> 1. How do I get browser version I mean IE version script is running
> i.e ie7 or ie8 or ie9 etc.
>
>
>
> 2. I have Ruby 1.8.7 with watir 1.6.5, where I have lot of TC
> automated. I need to run these testcases in Ie8 and IE9, I know I have
> tweak my script to run in these browser but does watir 1.6.5 supports ie8
> and ie9? I mean it is not like I get errors when I try to run script?
>
> Can someone please help me out with this.
>
>
>
> Thanks
>
> Bhavesh
>
--
--
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]
---
You received this message because you are subscribed to the Google Groups
"Watir General" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.