Question, with the not tested code:

If I was to test against one application or browser i.e. google and
then search in both IE and FF would I need to specify the code twice.

Could I state:

Open IE
Open FF

Check Page Title
Text Box Place "Test"
Click Search

End

All of the above would be one set of code not duplicating the code
twice..

On Jan 5, 9:30 am, tester86 <sagar.am...@gmail.com> wrote:
> Hi
>
> Or would you like to do something like this (not tested)?
>
>
>
> > [Watir::IE.new, FireWatir::Firefox.new].each do |browser|
> >   browser.goto "google.com"
> >   browser.goto "yahoo.com"
> > end
>
> > The above code will go to google and yahoo first in IE, and then in FF
>
> --Yes I would like something like that. Has this been tested or is
> there any good documentation?
>
> Thanks
>
> On Jan 5, 8:29 am, Željko Filipin <zeljko.fili...@wa-research.ch>
> wrote:
>
>
>
> > On Tue, Jan 5, 2010 at 3:21 PM, tester86 <sagar.am...@gmail.com> wrote:
> > > My question is would I have to write two sets of code
> > > one for ie and one for ff in order to run my script against both
> > > browsers.
>
> > I am not sure what you mean by this. Would this work for you?
>
> > ie = Watir::IE.new
> > ie.goto "google.com"
>
> > ff = FireWatir::Firefox.new
> > ff.goto "google.com"
>
> > ie.goto "yahoo.com"
> > ff.goto "yahoo.com
>
> > Or would you like to do something like this (not tested)?
>
> > [Watir::IE.new, FireWatir::Firefox.new].each do |browser|
> >   browser.goto "google.com"
> >   browser.goto "yahoo.com"
> > end
>
> > The above code will go to google and yahoo first in IE, and then in FF.
>
> > Željko
> > --
> > watir.com - community manager
> > watirpodcast.com - host- 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 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

Reply via email to