I have a test using Cucumber, capybara and selenium driver. This test should go to a form and submit it. The normal text would be
Scenario: Fill form
Give
The display:none solution does not work with capybara using selenium driver because selenium complains about interacting with invisible elements. If you try the above solution you may end up seeing the following error message:
Element is not currently visible and so may not be interacted with (Selenium::WebDriver::Error::ElementNotVisibleError)