You can also use Watir::IE.version or Watir::Browser.version depending of 
the version of watir/watir-classic used.

Jarmo Pertman
-----
IT does really matter - http://itreallymatters.net


On Thursday, April 10, 2014 4:51:00 PM UTC+3, Oscar.Rieken wrote:
>
> and on a second note I would probably update to more recent versions of 
> ruby/watir imo
>
>
> On Thu, Apr 10, 2014 at 9:50 AM, Oscar Rieken <[email protected]<javascript:>
> > wrote:
>
>> I personally would just drop down to webdriver and ask it what its caps 
>> are
>>
>> [1] pry(main)> require 'watir-webdriver'
>> => true
>> [2] pry(main)> b = Watir::Browser.new :chrome
>> => #<Watir::Browser:0x..f9c0b79e466ac11da url="data:," title="data:,">
>> [3] pry(main)> b.driver.capabilities
>> => #<Selenium::WebDriver::Remote::Capabilities:0x007fa1959cc780
>>  @capabilities=
>>   {:browser_name=>"chrome",
>>    :version=>"33.0.1750.152",
>>    :platform=>:"mac os x",
>>    :javascript_enabled=>true,
>>    :css_selectors_enabled=>true,
>>    :takes_screenshot=>true,
>>    :native_events=>true,
>>    :rotatable=>false,
>>    :firefox_profile=>nil,
>>    :proxy=>nil,
>>    "acceptSslCerts"=>true,
>>    "applicationCacheEnabled"=>false,
>>    "browserConnectionEnabled"=>false,
>>    "chrome"=>
>>     {"userDataDir"=>
>>       
>> "/var/folders/_q/cgwwbx596v995n55n32kd1cm0000gn/T/.org.chromium.Chromium.rKUMb4"},
>>    "databaseEnabled"=>false,
>>    "handlesAlerts"=>true,
>>    "locationContextEnabled"=>true,
>>    "takesHeapSnapshot"=>true,
>>    "webStorageEnabled"=>true}>
>>
>>
>> On Thu, Apr 10, 2014 at 9:35 AM, Super Kevy <
>> [email protected] <javascript:>> wrote:
>>
>>> 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] <javascript:>
>>> http://groups.google.com/group/watir-general
>>> [email protected] <javascript:>
>>>
>>> --- 
>>> 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] <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>

-- 
-- 
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.

Reply via email to