tags:

views:

34

answers:

1

I am using capybara with cucumber on a rails 2.3.9 project.

This is my markup

<a href='/pemail/new/21' title='send email'>
  <img alt='email' src='/images/email.png?1286474'>
</a>

How do I simulate clicking on the above link.

A: 

capybara only looks at the "alt" tag for an image. Use that and you are good to go.

Ref: http://groups.google.com/group/ruby-capybara/browse_thread/thread/9c997395306d40e2#

Neeraj Singh