1
我有一個文本提交按鈕,我想檢查兩者。水豚 - 如何檢查提交按鈕上的文本?
即實際的頁面有:
<input class="button" type="submit" value="Continue" tabindex="3"
name="nav[save]"></input>`
所以我已經試過
it "I can see the Continue button" do
expect(page.find('input[type="submit"]').find('input[value="Continue"]')).to be
end
,但我得到
Unable to find css "input[value=\"Continue\"]"
和
expect(page.find('input[type="submit"]')).
to have_selector('input[value="Continue"]')
但我得到
expected to find css "input[value=\"Continue\"]" but there were no matches