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?
精彩评论