Hi Chuck, I follow everything you have said and it makes perfect sense. For that I am very greatfull for your detailed reply. I do however have one question. you wrote that I should set this at Run time using: Set BROWSER to either 'firefox' or 'phantomjs' etc... But I am unsure how I do this.
With the way I have I was setting it by: cucumber FIREFOX=true BETA=true which was invoking the firefox browser on the beta environment. I have tried something similar but it does not run. Can you please show me how I would run my tests with different combinations? Kind regards, Knoll On Monday, 8 April 2013 14:39:12 UTC+1, [email protected] wrote: > > Hey Guys, > > I have an issue where 2 browsers are being started but only one is being > interacted with. When the tests finish, only one of the 2 browsers is > closed. > > I have this in my env.rb: > > def start_browser > if ENV['HEADLESS'] == 'true' > @browser = Watir::Browser.new(:phantomjs) > elsif ENV['FIREFOX'] == 'true' > @browser = Watir::Browser.new(:firefox) > elsif ENV['CHROME'] == 'true' > @browser = Watir::Browser.new(:chrome) > end > > if ENV['TEST'] == 'true' > $env_dtm = "http://xxx.yyy.zzz.qqq/" > $env_webstore = "http://xxx1.yyy1.zzz1.qqq1/" > elsif ENV['DEV'] == 'true' > $env_dtm = "http://xxx2.yyy2.zzz2.qqq2/" > $env_webstore = "http://xxx3.yyy3.zzz3.qqq3/" > elsif ENV['BETA'] == 'true' > $env_dtm = "http://xxx4.yyy4.zzz4.qqq4/" or > $env_webstore = "http://xxx5.yyy5.zzz5.qqq5/" > end > > end > > I have this because I pass in two variables on the command line to dictate > on what environment I want to run my tests in and also on what driver. > > Ever since I put in the variables for the environments I have been getting > two browsers appear. > > Is there anything I can do that will close everything. > > Kind regards, > Knoll > -- -- 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] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
