如何使用Firefox在没有超时的情况下在页面上查找元素?

时间:2013-03-18 18:12:08

标签: html ruby firefox cucumber capybara

当我试图找到一个元素时,一个在chrome中容易(相对)fornd的元素在Firefox中超时。

这是一个例子

within('tr#blah') do
  fill_in('frm_blah', :with=>'foo')
end

这会得到像......一样的回复。

    When I do the thing
# features/step_definitions/blah_steps.rb:13
  Timeout::Error (Timeout::Error)
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:146:in `rescue
  in rbuf_fill'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:140:in `rbuf_fi
  ll'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:122:in `readunt
  il'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/protocol.rb:132:in `readlin
  e'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:2562:in `read_statu
  s_line'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:2551:in `read_new'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1319:in `block in t
  ransport_request'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1316:in `catch'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1316:in `transport_
  request'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1293:in `request'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1286:in `block in r
  equest'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:745:in `start'
  C:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/net/http.rb:1284:in `request'
  ./features/step_definitions/blah_steps.rb:21:in `block (2 levels) in <to
  p (required)>'
  ./features/step_definitions/blah_steps.rb:20:in `/^I select "(.*?)"$/'
  features\blah.feature:17:in `When I fill in blah'

任何让Firefox不那么生气的想法?

0 个答案:

没有答案