I have a Cucumber Test Suite that I'm running and whenever i call the browser.close method it throws the following error
C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in
initialize': No connection could be made because the target machine actively refused it. - connect(2) (Errno::ECONNREFUSED) from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in
open' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:inblock in connect' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:in
timeout' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:intimeout' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in
connect' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:indo_start' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:in
start' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1284:inrequest' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/http/default.rb:83:in
response_for' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/http/default.rb:39:inrequest' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/http/common.rb:40:in
call' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/bridge.rb:634:inraw_execute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/bridge.rb:612:in
execute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/bridge.rb:200:inquit' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/ie/bridge.rb:59:in
quit' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/common/driver.rb:168:inquit' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.8/lib/watir-webdriver/browser.rb:136:in
close' from D:/Workspaces/Ruby/RegressionTesting/features/support/env.rb:60:in `block in > '
This only happens when the browser is IE. Specifically I am testing with IE 11. This can be recreated by running the following code in IRB
require 'watir-webdriver'
@browser = Watir::Browser.new :ie
@browser.close
All of my test scenarios complete just fine, this only happens when I call the browser.close method in at_exit. This is just simply a nuisance... Any ideas?