Thanks for the information, I would use Rspec instead of test/unti I also wanted some particular format in which I could keep all my test in different .rb files and could call them in one main file where in I would use before(:all)/after(:all)
I tried this :::::::::: require 'rubygems' require 'spec' require 'watir-webdriver' require 'watir-webdriver/wait' describe "TEST SUite" do before (:all) do @b=Watir::Browser.new :ff @b.goto("https://localhost:44300") end describe "Test1" do require "new_test2.rb" end describe "Test1" do require "new_test2.rb" end after (:all) do @b.close unless @browser.nil? end end where in On Mar 19, 4:13 pm, Željko Filipin <zeljko.fili...@gmail.com> wrote: > On Sun, Mar 18, 2012 at 11:40 PM, Ankita Gupta <ankita.gu...@adslot.com> > wrote: > > > I have 5 test scripts and I wanted to run those in single browser > > session but do not know how to do that. > > As far as I remember, test/unit's setup/teardown methods run before/after > _each_ test. If you can use RSspec, it has before(:all)/after(:all) blocks, > that run before/after _all_ tests. > > Željko > -- > watir.com/book - author -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com