Kind of a strange one, but in my views I have a tick (✔) and a cross (×) used as links (in lieu of images). Is there any way of finding these elements and testing them using RSpec and Capybara-webkit, or should I try and target say the title attribute instead and ignore this route?
My test in question looks like this:
context "casting a vote", js: true do
before do
sign_in user
click_link '✔'
sleep 0.2
end
it { should have_content("Vote cast!") }
end
The failure message I get is (predictably):
Failure/Error: click_link "raw('✔')"
Capybara::ElementNotFound:
Unable to find link "raw('✔')"
Thanks in advance for your help.