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.


Reply via email to