I am attempting to click an image with Capybara for a Cucumber test, but cannot find a way to get Capybara to see the image as a link.
My code for the image is:
link_to(image_tag('ico_edit_16.png', alt: 'Edit', class: 'icon16', title: "Edit #{qualification.title}"), edit_qualification_path(qualification))
Which shows up as
<a href="/qualifications/1/edit">
<img class="icon16" title="Title" src="/images/ico_edit_16.png?1279303992" alt="Edit">
</a>
in the html, and I have been unable to find a good way to use capybara to click the image.
Any suggestions?