0
votes

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:inopen' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in block in connect' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:intimeout' from C:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:in timeout' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:inconnect' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:in do_start' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:instart' from C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1284:in request' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/http/default.rb:83:inresponse_for' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/http/default.rb:39:in request' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/http/common.rb:40:incall' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/bridge.rb:634:in raw_execute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/bridge.rb:612:inexecute' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/remote/bridge.rb:200:in quit' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/ie/bridge.rb:59:inquit' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.40.0/lib/selenium/webdriver/common/driver.rb:168:in quit' from C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.8/lib/watir-webdriver/browser.rb:136:inclose' 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?

1

1 Answers

0
votes

I do not think Internet Explorer 11 is supported. From selenium-developers Google group:

IE 11 support continues to be blocked by changes in browser behavior. Workarounds from Microsoft are unlikely to be forthcoming, due to the recent announcement of the in-process development of a Microsoft-authored driver for Internet Explorer 11 and beyond. Note that the Microsoft driver will not be available in any form until the W3C Specification for WebDriver progresses further in the spec process. Furthermore, no timeline for release has been announced by Microsoft, nor should one be expected.