title: Selenium - close a window with a confirmation alert . C#
body: <p>I'm automating tests on a web page which pops an Alert window upon clouser using <code>driver.close()</code>.
  The alert is for confirmation asking if i'm sure and exposes "stay" or "leave" buttons.</p>
  
  <p>Now, when <code>driver.close()</code> is executed, the popup shows and <code>driver.close()</code> is "stuck", waiting for response, BUT I cannot executed <code>driver.switchto().alert()</code> to response (<code>accept()</code> or <code>dismiss()</code> ) since the driver is waiting...
  Working with additional thread didn't help.
  Eventually, after a long timeout, close throws an exception....</p>
  
  <p>Any ideas? 
  It is so trivial scenario, yet very hard to deal with from code with selenium api.</p>