Couple of examples. you can use git to clone the Watir project from http://github.com/bret/watir or just downloa the source in a zip file. Then look at Rakefile and see how the same unittests are being run by Firefox and IE. There is a wealth of information there. Do run the unittests. also notice the use of tagging in test files.
you can also download watirloo gem, it has an example of running the some of the same set of spec files for both FF and IE. You can run watir code by setting options before the code is executed then browser = Watir::Browser.new will return either FF or IE study unittests On Jan 5, 8:21 am, tester86 <sagar.am...@gmail.com> wrote: > Hi > > Yes you are correct but when I executed it that way it did open a > firefox session. 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. > > Thanks. > > On Jan 4, 9:11 pm, Wesley Chen <cjq....@gmail.com> wrote: > > > First, I think there is something wrong in your script. > > 1. You use ie for both ie browser and FF browser; > > 2. Your Firefox invoke way is not right. > > I think it works if you use: > > *require 'watir' > > ie = Watir::IE.new > > ie.goto("www.google.com") > > ff = FireWatir::Firefox.new > > ff.goto("www.google.com")* > > > Thanks. > > Wesley Chen. > > For life, the easier, the better. > > > On Mon, Jan 4, 2010 at 11:03 PM, tester86 <sagar.am...@gmail.com> wrote: > > > Hi > > > > From my research as far as I understand you can not drive watir > > > scripts at the same time in the browser unless you create seperate > > > scripts for them. I have a Test::Unit script that runs in Firefox but > > > when I specify IE it just opens a new browser and nothing happens. I > > > am guess that I would have to write a different set of code for that. > > > > example: > > > > ie=Watir::IE.new > > > ie.goto("www.google.com") > > > > ie=FireWatir.FireFox.new > > > ie.goto("www.google.com") > > > > # then a code to perform search > > > > When I run a script like this it only performs the search in Firefox > > > and not in IE. Is ther any solution to execute against both browsers. > > > > Thanks > > > > -- > > > 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-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