I am using cucumber+capybara in my tests
env.rb
Capybara.run_server = false
Capybara.default_driver = :selenium
World(Capybara::DSL)
In my test I am clicking on a link
Then /^I see deals on map$/ do
find("#dealmap").click
end
Above action is opening a layer (div) but the process stuck on find(“#dealmap”).click method. After 5 seconds I am getting following error
Timeout::Error (Timeout::Error)
/usr/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue in rbuf_fill'
/usr/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fill'
/usr/lib/ruby/1.9.1/net/protocol.rb:122:in `readuntil'
/usr/lib/ruby/1.9.1/net/protocol.rb:132:in `readline'
/usr/lib/ruby/1.9.1/net/http.rb:2562:in `read_status_line'
/usr/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
/usr/lib/ruby/1.9.1/net/http.rb:1319:in `block in transport_request'
/usr/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
/usr/lib/ruby/1.9.1/net/http.rb:1316:in `transport_request'
/usr/lib/ruby/1.9.1/net/http.rb:1293:in `request'
/usr/lib/ruby/1.9.1/net/http.rb:1286:in `block in request'
/usr/lib/ruby/1.9.1/net/http.rb:745:in `start'
/usr/lib/ruby/1.9.1/net/http.rb:1284:in `request'
./features/frontend/step_definitions/search_results_page.rb:2:in `/^I see deals on map$/'
features/frontend/search_results_page.feature:6:in `Then I see deals on map'
NOTE:
I have tried with increasing time but it is not solving the problem
I am unable to resolve the issue. Any suggestions ?
I think the problems comes from this line
You will need this if you’re running rack based tests. Remove it and re-run your tests.
If you’re running web based tests you would want to keep this in there- and just because you’re using Selenium doesn’t mean you’re running web bases tests. You’re still running rack based tests but in a browser.