I suspect the issue here is related to webdriver or chromedriver.. I don't think the problem is up in the watir api part.. so my may need to ask in the webdriver and/or chromedriver groups. unless we get lucky and someone else here has had the same issue and knows how to solve it. Maybe you can implement some logic to wait 10 seconds and try again, if that step fails??? a bit cludgey and brute force but it might work
On Thursday, April 18, 2013 2:45:04 AM UTC-7, [email protected] wrote: > > Hello, > > I use Watir and the Chrome Webdriver in my unit tests (as end-to-end tests > to my website), via Jenkins. > (i.e. I *require 'watir'* and instantiate use *@browser = > Watir::Browser.new :chrome* in the setup method of the testcase class.) > > It works fine, but once in ~40 tests or so I get the following error: > *Errno::ECONNREFUSED: No connection could be made because the target > machine actively refused it. - connect(2)* > > Now, if it was happening all of the time - that's one thing. But since > this is an alternating error, quite rare yet occurring several times a day > (since I run them every 10 minutes). > > Any ideas? > > Best, > >g. > > Below is the error. I did not include the code for the tests since I get > it on the instantiation of new browser - *@browser = Watir::Browser.new > :chrome* is the problematic line, and besides I don't think the code is > the problem since it's working most of the time. > > 12:07:39 1) Error: > 12:07:39 test_fill_survey(ReadOnlyTests): > 12:07:39 Errno::ECONNREFUSED: No connection could be made because the > target machine actively refused it. - connect(2) > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/remote/http/default.rb:83:in > > `response_for' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/remote/http/default.rb:39:in > > `request' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/remote/http/common.rb:40:in > > `call' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/remote/bridge.rb:615:in > > `raw_execute' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/remote/bridge.rb:92:in > > `create_session' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/remote/bridge.rb:68:in > > `initialize' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/chrome/bridge.rb:29:in > > `initialize' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/common/driver.rb:37:in > > `new' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver/common/driver.rb:37:in > > `for' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.29.0/lib/selenium/webdriver.rb:67:in > > `for' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/watir-webdriver-0.6.2/lib/watir-webdriver/browser.rb:46:in > > `initialize' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/watir-4.0.2-x86-mingw32/lib/watir/loader.rb:16:in > > `new' > 12:07:39 > c:/ruby193/lib/ruby/gems/1.9.1/gems/watir-4.0.2-x86-mingw32/lib/watir/loader.rb:16:in > > `new' > 12:07:39 DNASurveyWebApp/DNASurvey.Test/Watir/EndToEnd.rb:78:in `setup' > -- -- 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.
