I need to verify the presence of a submit button with specific text on the page.
For example, the HTML code for the button is:
<input class="button" type="submit" value="Continue" tabindex="3"
name="nav[save]"></input>
My attempt at verification:
it "should display the Continue button" do
expect(page.find('input[type="submit"]').find('input[value="Continue"]')).to be_truthy
end
However, I am encountering the following error:
Error: Unable to find css selector "input[value=\"Continue\"]"
I also tried:
expect(page.find('input[type="submit"]')).
to have_selector('input[value="Continue"]')
But this resulted in:
Error: Expected to find css selector "input[value=\"Continue\"]" but no matches were found.