title: selenium 2.4.0, how to check for presence of an alert
body: <p>Before using selenium 2.4.0 I had the following code working:</p>
  
  <pre><code>alert = page.driver.browser.switch_to.alert
  if alert.text
    ....
  end
  </code></pre>
  
  <p>Selenium 2.4.0 contains the change "* Raise in switch_to.alert when no alert is present.", so I get a <code>No alert is present (Selenium::WebDriver::Error::NoAlertOpenError)</code> exception.</p>
  
  <p>How can I check for the presence of an alert with selenium-web-driver 2.4.0?</p>