title: How do I confirm a javascript popup with Capybara?
body: <p>I've tried several examples found online, but with no luck.  I am looking to confirm the confirm message of a delete link.  The last attempt was the code below, but that resulted in an Capybara::NotSupportedByDriverError error.</p>
  
  <pre><code>def confirm_dialog
    page.evaluate_script('window.confirm = function() { return true; }')
  end
  </code></pre>