title: Rails + Capybara: 'Unexpected Alert Open' for Selenium Driver
body: <p>I am using Capybara and Chrome as my default selenium browser.</p>
  
  <p>Test:</p>
  
  <pre><code>it "is successful with deleting a user", js: true do
    visit '/users'
    expect(User.count).to eq(1)
    expect(user.email).to eq("ryan@drake.com")
    expect(page).to have_content("Manage Users")
    click_link 'Delete User'
    page.driver.browser.confirm.accept
    user.reload
    visit '/users'
    expect(User.count).to eq(0)
  end
  </code></pre>
  
  <p>I'm getting this error for my test:</p>
  
  <pre><code>Failure/Error: visit '/users'
   Selenium::WebDriver::Error::UnhandledAlertError:
     unexpected alert open
  </code></pre>
  
  <p>I have tried the following in my test:</p>
  
  <pre><code>page.driver.browser.switch_to.confirm
  page.driver.browser.switch_to.accept
  page.driver.browser.confirm.accept
  </code></pre>
  
  <p>Any other variations I should try with my test?</p>