In my integration specs, I log users in with this:
fill_in "session_email", :with => user.email
fill_in "session_password", :with => password
click_button "submit"
Capybara fails those tests with Unable to find field "session_email"
. The strange thing is, it actually fills in those fields and successfully logs the user in (I can see the output from the sessions controller, and when I use selenium I can see it working). But the tests fail.
The log-in thing opens in a bootstrap modal.
I'm using capybara (2.1.0) and capybara-webkit (1.0.0).
Has anyone else experienced this? What's the solution?