开发者

Rails 3, Cucumber, Capybara cannot select element / render complete html

A cucumber feature keeps failing because capybara does not render the whole html as intended

here is the feature

When I select my "Test Cluster" from "Cluster Selection"

and the step definition

When /^I select my "(.*)" from "(.*)"$/ do |field, value|
  fill_in(f开发者_运维技巧ield, :with => value)
end

It should pass, but cucumber/capybara keeps complaining that it cannot find the dropdown with the label "Cluster Selection"

So I went into debugger mode and ran cucumber

When /^I select my "(.*)" from "(.*)"$/ do |field, value|
  debugger
  fill_in(field, :with => value)
end

What I found was that when I type

pp page.body

all it returns is the HTML doc declaration. It's missing the <head> and <body>, so no wonder it cant find the dropdown.

Anyone got any suggestions?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜