Browser close/open issue watir-webdriver using IE

Hi, at the end of execution I see that there is a browser window which
is not closed, but was expected to be closed. I see following error:

Start of server failedset_ports_option: cannot bind to 5555: No errorNo
connection could be made because the target machine actively refused it.

  • connect(2)
    C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in initialize' C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:inopen’
    C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:in block in connect' C:/Ruby193/lib/ruby/1.9.1/timeout.rb:54:intimeout’
    C:/Ruby193/lib/ruby/1.9.1/timeout.rb:99:in timeout' C:/Ruby193/lib/ruby/1.9.1/net/http.rb:762:inconnect’
    C:/Ruby193/lib/ruby/1.9.1/net/http.rb:755:in do_start' C:/Ruby193/lib/ruby/1.9.1/net/http.rb:744:instart’
    C:/Ruby193/lib/ruby/1.9.1/net/http.rb:1284:in request' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/http/default.rb:83:inresponse_for’
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/http/default.rb:39:in
    request' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/http/common.rb:40:incall’
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/bridge.rb:598:in
    raw_execute' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/bridge.rb:576:inexecute’
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/remote/bridge.rb:155:in
    getCurrentUrl' C:/Ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.26.0/lib/selenium/webdriver/common/driver.rb:118:incurrent_url’
    C:/Ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.1/lib/watir-webdriver/browser.rb:78:in
    `url’

Have you looked at this thread? We might have covered whatever is
causing this issue for you in here:
http://www.ruby-forum.com/topic/4407617

Joel P. wrote in post #1088068:

Have you looked at this thread? We might have covered whatever is
causing this issue for you in here:
http://www.ruby-forum.com/topic/4407617

How to rescue that error?
I am not able to catch it either by
rescue => e
or
rescue Exception=>e

Prog R. wrote in post #1088166:

Joel P. wrote in post #1088068:

Have you looked at this thread? We might have covered whatever is
causing this issue for you in here:
http://www.ruby-forum.com/topic/4407617

How to rescue that error?
I am not able to catch it either by
rescue => e
or
rescue Exception=>e

“rescue Exception” will rescue anything. More likely you’re trying to
rescue this within the wrong block of code.

It’s extremely bad practice to rescue Exception, although I assume
you’re just using that to make a point rather than as a matter of course
in your code.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs