It should be

Watir::Browser.default = 'firefox'
$web = Watir::Browser.new

Instead of

$web = Watir::Browser.new
Watir::Browser.default = 'firefox'

That should work

Regards
Venu
Sent from my BlackBerry® from Reliance Mobile, India's No.1 Network.

-----Original Message-----
From: Jason Shelton <jas.shel...@hotmail.com>

Date: Wed, 11 Feb 2009 09:26:10 
To: <watir-general@googlegroups.com>
Subject: [wtr-general] Re: Watir and Firefox



I have tried the following code, hoping the browser would open in firefox, but 
it still opens in ie.  Please let me know what is wrong.  Thanks in advance.
 
require 'rubygems'
require 'watir'
 

$site = "http://www.google.com";
$web = Watir::Browser.new
Watir::Browser.default = 'firefox'
$web.goto $site
 
 
-Shelton
> Date: Wed, 11 Feb 2009 01:32:05 -0800> Subject: [wtr-general] Re: Watir and 
> Firefox> From: johnj...@gmail.com> To: watir-general@googlegroups.com> > > 
> Install the latest version, 1.6.2 - a gem install watir will grab that> 
> version anyway...> > Setting up/selecting your browser is already covered in 
> the wiki which> you should refer to for these "getting started" types of 
> questions:> > http://wiki.openqa.org/display/WTR/Browser.new> > Regards,> > 
> John> > On Feb 10, 10:06 pm, Jason Shelton <jas.shel...@hotmail.com> wrote:> 
> > All,> >> > I haven't used Watir for about 7-8 months now, but I am now 
> setting up a new framework using Watir.  I am writing to ask about the latest 
> updates to Watir, and its compatibility with Firefox.  Which build of Watir 
> should I install to get the version that supports both IE and Firefox?  
> How/When do you select which browser to use?  Thanks in advance for all 
> responses.> >> > - Shelton> 
> >_________________________________________________________________> > Windows 
> Live™: Keep your life in 
> sync.http://windowslive.com/explore?ocid=TXT_TAGLM_WL_t1_allup_explore_022009>_________________________________________________________________
Windows Live™: E-mail. Chat. Share. Get more ways to connect. 
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_AE_Faster_022009



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to