15

When I fill forms using capybara and page opens in browser, the fields are empty. Is it normal?

page.fill_in 'Email', :with => '[email protected]'
save_and_open_page

1 Answer 1

18

It seems that filling stuff into a text field doesn't make it part of the DOM (specifically, the value attribute of the <input> element), so it won't show up in the page you get.

So yes, it looks like this is normal indeed.

1
  • 4
    That seems odd to me, because I have been able to see the values filled in up till when I upgraded to capybara 2.0. When I go back to Capybara 1.1.4, I see them again. Dec 5, 2012 at 16:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.