title: click element if it exists in capybara
body: <p>I wish to click a popup message that appears on my test app if it is present. I am new to capybara and cant seem to find a way to do this. I have previous experience with watir and if I were doing it with watir it would be something like:</p>
  
  <pre><code>if browser.link(:text, "name").exists? do
     browser.link(:text, "name").click
  end
  </code></pre>
  
  <p>How can I do the same in capybara? Note this link will not always appear hence why I wish to have the if statement.</p>