質問

At the end of my scenario Capybara is automatically trying to go to file:/ruby193/lib/ruby/gems/1.9.1/gems/capybara-2.2.0/lib/capybara/empty.html, how do I stop this?

I'm using the BrowserStack service and therefore this file doesn't exist on the VM the browser is actually running in so a windows error popup shows and I get a Timeout::Error (Timeout::Error).

Added result:

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'
役に立ちましたか?

解決

I ended up changing the driver.rb file located at lib\ruby\gems\1.9.1\gems\capybara-2.2.0\lib\capybara\selenium\driver.rb changed the line @browser.navigate.to(uri.to_s) to @browser.navigate.to("about:help"). I know they changed this to use the file for some reason.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top