I have a text box like this:
<%= form_for(ownership, remote: true) do |f| %> <div> <%= f.text_field :confirm, value: nil, title: t('label.transaction.confirmation.code') %> <%= f.hidden_field :start_date, value: Time.now %> </div> <%= f.submit t('button.ownership.take.confirmation'), class: "btn btn-small"%> <% end %>
And I want to fill in the rspec text box:
fill_in t('label.transaction.confirmation.code'), with: "something"
But this does not work, because rspec does not recognize the header tag to fill the text box:
Failure/Error: fill_in t('label.transaction.confirmation.code'), with: confirmation_code Capybara::ElementNotFound: Unable to find field "Code de confirmation"
Do you know how to fill an rspec text field without adding a label?
source share