The set option is a nice way to be able to run the very same script
against both browsers without having to edit the script itself.   e.g.
run in one system set for IE, and it uses IE, run it on another system
set for firefox, and it uses firefox..

but speaking of that, if both are used, which takes precidence?   If
you try to use (or accidentially end up using) both the environment
variable and the inscript .default= at the same time, which one wins?
(or do we file that under 'bad ideas' along with crossing the streams
or sneaking up on a piersons puppeteer from behind and suprising
them)?

On Dec 10, 9:55 pm, Margam <[EMAIL PROTECTED]> wrote:
> Thanks for the reply and explanation.
>
> The
> Watir::Browser.default = 'ie'
> and
> Watir::Browser.default = 'firefox'
> lines in my Ruby script worked fine.
> Will try the set lines also.
>
> On Dec 10, 7:40 pm, marekj <[EMAIL PROTECTED]> wrote:
>
>
>
> > set watir_browser=ie lines are 'environment variables' you would set at the
> > command line and not in your ruby script.
> > On the spage page on the wiki it shows you how to set the browser in Ruby
> > code.
> > Watir::Browser.default = 'ie'
> > or
> > Watir::Browser.default = 'firefox'
> > keep expermimenting.
>
> > marekj | Semantic Page Objects Automation
>
> > Watirloo: Browser Page Helper 
> > Frameworkhttp://www.bitbucket.org/marekj/watirloo/
> > for IE, Firefox and others?
>
> > On Wed, Dec 10, 2008 at 6:45 PM, Margam <[EMAIL PROTECTED]> wrote:
>
> > > HI All,
> > > I am trying to write one script that will work on both IE and FF. As
> > > per the link:
> > >http://wiki.openqa.org/display/WTR/Browser.new
>
> > > I am trying to use the "set watir_browser=ie" command and
> > > Watir::Browser.new
>
> > > The code is :
> > > --------------
> > > require 'rubygems'
> > > require 'watir'
>
> > > set watir_browser=ie
> > > browser = Watir::Browser.new
> > > browser.goto("http://www.hotmail.com";)
> > > ----------
>
> > > But keep getting the following error:
> > > ---------
> > >  undefined method `set' for main:Object (NoMethodError)
> > > -----------------
> > > What am I doing wrong? Should I require any other library?
>
> > > Thank you.
> > > Margam- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to