Simple solution - use an environment variable: browser = Watir::Browser.new((ENV['BROWSER'] || :firefox).to_sym)
On Mon, Nov 15, 2010 at 4:59 PM, Gazi <[email protected]> wrote: > Hi, > > I am having some watir tests like below > > require 'rubygems' > require 'watir-webdriver' > require 'test/unit/assertions' > #require 'win32ole' > include Test::Unit::Assertions > > browser = nil > nodename = '' > pathwayname = '' > > Given /^I am logged inn$/ do > browser =Watir::Browser.new(:firefox) > > > I don't want to specify a particular browser name in my code but > instead I wanted to run my tests in IE and Firefox may be by using a > rake task in which I can specify to run my tests both in IE and > Firefox. > > Can you please help on this? > > cheers, > Gazi > > -- > Before posting, please read http://watir.com/support. In short: search before > you ask, be nice. > > [email protected] > http://groups.google.com/group/watir-general > [email protected] > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
