我有一套针对我们的网络应用程序执行的黄瓜脚本。当我针对IE8和Chrome运行脚本时,它们运行正常,但是当关闭浏览器时却无法运行。
这是我得到的堆栈跟踪:
Errno :: ECONNREFUSED:拒绝连接 - 拒绝连接
initialize at org/jruby/ext/socket/RubyTCPSocket.java:122
open at org/jruby/RubyIO.java:1179
connect at C:/jruby-1.7.2/lib/ruby/1.9/net/http.rb:762
timeout at org/jruby/ext/timeout/Timeout.java:105
connect at C:/jruby-1.7.2/lib/ruby/1.9/net/http.rb:762
do_start at C:/jruby-1.7.2/lib/ruby/1.9/net/http.rb:755
start at C:/jruby-1.7.2/lib/ruby/1.9/net/http.rb:744
start at C:/jruby-1.7.2/lib/ruby/1.9/net/http.rb:743
request at C:/jruby-1.7.2/lib/ruby/1.9/net/http.rb:1292
request at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/rest-client-1.6.7/lib/restclient/net_http_ext.rb:51
response_for at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/http/default.rb:83
request at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/http/default.rb:39
call at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/http/common.rb:40
raw_execute at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/bridge.rb:619
execute at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/bridge.rb:597
quit at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/remote/bridge.rb:193
quit at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/chrome/bridge.rb:48
quit at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/selenium-webdriver-2.32.1/lib/selenium/webdriver/common/driver.rb:168
close at C:/jruby-1.7.2/lib/ruby/gems/shared/gems/watir-webdriver-0.6.2/lib/watir-webdriver/browser.rb:135
(root) at C:/Users/explorys/Documents/workspace/qa-cucumber/features/support/hooks.rb:25
以下是关闭浏览器的代码:
at_exit do
if !browser.nil?
browser.close
end
end
以下是宝石列表:
activemodel(3.2.13,3.2.12)
activerecord(3.2.12)
activerecord-jdbc-adapter(1.2.2.1)
activerecord -jdbcmysql-adapter(1.2.2.1)
activesupport(3.2.13,3.2.12)
arel(3.0.2)
builder(3.0.4)
childprocess(0.3.8)
commonwatir(4.0.0)
composite_primary_keys(5.0.12)
黄瓜(1.2.1)diff-lcs(1.2.1,1.1.3)
fastercsv(1.5.5)
ffi(1.3.1 java)
小黄瓜(2.11.6 java)
hbase-jruby(0.2.2 java)
i18n(0.6.1)
jdbc-mysql(5.1.22.1)
jruby-win32ole(0.8.5)
json(1.7.7 java)
linecache(0.46 java)
mime-types(1.22)
multi_json(1.6.0)
rake(10.0.2)
rest-client(1.6.7)
rspec(2.12.0)
rspec-core(2.12.2)
rspec-expectations(2.12.1)
rspec-mocks(2.12.2)
ruby-debug-base(0.10.5.rc3 java)
ruby-debug-ide(0.4.17.beta17,0.4.17.beta16)
rubyzip(0.9.9)
selenium-webdriver(2.32.1,2.29.0)
sys-uname(0.9.1)
tzinfo(0.3.35)
watir(4.0.2)
watir-webdriver(0.6.2)
websocket(1.0.7)
win32-process(0.7.2)
xml-object(0.9.93)
xml-simple(1.1.2)