I am having some very strange behaviour with Capybara. It stubbornly refuses to fill in the fields of my login form.
if it is an autocomplete field, you can use this:
def fill_in_autocomplete(id, value) page.execute_script("document.getElementById('#{id}').setAttribute('value', '#{value}');") end