简体   繁体   English

硒/水豚/黄瓜超时::错误

[英]Timeout::Error with Selenium/Capybara/Cucumber

I have a Scenario step 我有一个场景步骤

When I fill in the following:
  | Credit Card Number | 4111111111111111 |
  | CCV Value          | 123              |
  | First name         | First            |
  | Last name          | Last             |
  | Address            | 123 My St.       |
  | City               | My City          |

This step is inconsistently failing with a Timeout::Error 此步骤始终失败,并显示Timeout :: Error

(::) failed steps (::)

execution expired (Timeout::Error)
/usr/local/lib/ruby/1.8/timeout.rb:60:in `rbuf_fill'
/usr/local/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
/usr/local/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
/usr/local/lib/ruby/1.8/net/protocol.rb:126:in `readline'
/usr/local/lib/ruby/1.8/net/http.rb:2020:in `read_status_line'
/usr/local/lib/ruby/1.8/net/http.rb:2009:in `read_new'
/usr/local/lib/ruby/1.8/net/http.rb:1050:in `request_without_fakeweb'
/usr/local/lib/ruby/1.8/net/http.rb:1037:in `request_without_fakeweb'
/usr/local/lib/ruby/1.8/net/http.rb:543:in `start'
/usr/local/lib/ruby/1.8/net/http.rb:1035:in `request_without_fakeweb'
./features/step_definitions/web_steps.rb:41
./features/step_definitions/web_steps.rb:14:in `with_scope'
./features/step_definitions/web_steps.rb:40:in `/^(?:|I )fill in "([^"]*)" with "([^"]*)"(?: within "([^"]*)")?$/'

And its even weirder that the step fails when filling different fields. 甚至奇怪的是,在填充不同字段时该步骤失败了。 Any pointer would be greatly appreciated.. 任何指针将不胜感激。

看来问题出在Fakeweb宝石上。我删除了该宝石,现在看来可以正常使用了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM