0

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?

bevanb
  • 8,201
  • 10
  • 53
  • 90

1 Answers1

0

I had a similar issue, and switching to capybara-webkit fixed it for me. I was using bootstrap as well, so not sure if Selenium doesn't like bootstrap or what, but webkit worked for me

jwilcox09
  • 721
  • 5
  • 18