Masatoshi Nishiguchi

Capybara - clicking icon links

<div class="col-sm-4 align-center">
  <a class="email-link" href="/contact" title="Send email">
    <i class="fa fa-envelope"></i>
  </a>
</div>

We can use title attribute:

click_link 'Send email'

We can use finders:

find(".email-link").click

References