在我的场景结束时,Capybara 会自动尝试去file:/ruby193/lib/ruby/gems/1.9.1/gems/capybara-2.2.0/lib/capybara/empty.html
,我该如何阻止它?
我正在使用 BrowserStack 服务,因此该文件在浏览器实际运行的虚拟机上不存在,因此会显示一个 windows 错误弹出窗口,我得到一个Timeout::Error (Timeout::Error)
.
添加结果:
C:/ruby193/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill': Timeout::Error (Timeout::Error)
from C:/ruby193/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
from C:/ruby193/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
from C:/ruby193/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:2563:in `read_status_line'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:2552:in `read_new'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:1320:in `block in transport_request'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:1317:in `catch'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:1317:in `transport_request'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:1294:in `request'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:1287:in `block in request'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:746:in `start'
from C:/ruby193/lib/ruby/1.9.1/net/http.rb:1285:in `request'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.37.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.37.0/lib/selenium/webdriver/remote/http/default.rb:39:in `request'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/remote/http/common.rb:40:in `call'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/remote/bridge.rb:634:in `raw_execute'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/remote/bridge.rb:612:in `execute'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/remote/bridge.rb:200:in `quit'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/selenium-webdriver-2.37.0/lib/selenium/webdriver/common/driver.rb:168:in `quit'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/capybara-2.2.0/lib/capybara/selenium/driver.rb:152:in `quit'
from C:/ruby193/lib/ruby/gems/1.9.1/gems/capybara-2.2.0/lib/capybara/selenium/driver.rb:19:in `block in browser'