我在测试中使用黄瓜+水豚
env.rb
Capybara.run_server = false
Capybara.default_driver = :selenium
World(Capybara::DSL)
在我的测试中,我点击了一个链接
Then /^I see deals on map$/ do
find("#dealmap").click
end
上面的动作是打开一个层(div),但过程停留在 find("#dealmap").click 方法上。5秒后我收到以下错误
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'
注意:我已经尝试增加时间,但它没有解决问题
我无法解决问题。有什么建议么 ?