I'm trying to use capybara to find a CSS element but RSpec keeps returning unable to find element. I tried with id, class, and name.
HTML (using inspect element)
<input class="new_photo_upload_entry" type="file" name="photo_upload_entry[upload]" id="photo_upload_entry_upload">
steps.rb file
expect(page).to have_css('#photo_upload_entry_upload')
expect(page).to have_css('.new_photo_upload_entry')
expect(page).to have_css('input[name="photo_upload_entry[upload]"]')
Running cucumber feature result:
expected to find css "#photo_upload_entry_upload" but there were no matches. Also found "", which matched the selector but not all filters. (RSpec::Expectations::ExpectationNotMetError)
expected to find css ".new_photo_upload_entry" but there were no matches (RSpec::Expectations::ExpectationNotMetError)
expected to find css "input[name=\"photo_upload_entry[upload]\"]" but there were no matches. Also found "", which matched the selector but not all filters. (RSpec::Expectations::ExpectationNotMetError)