title: UnhandledAlertException: unexpected alert open: {Alert text : Save successfully.}
body: <p>I'm facing below error while handling an alert pop up with Chrome driver in Selenium.</p>
  
  <pre><code>Exception in thread "main" org.openqa.selenium.UnhandledAlertException: unexpected alert open: {Alert text : Save successfully.}
  </code></pre>
  
  <p>Scenario:</p>
  
  <p>This is happening when two alerts appears immediately.</p>
  
  <p>First alert pop up appears and I'm handling it with :</p>
  
  <pre><code>Alert alertf = driver.switchTo().alert();
  alertf.accept();
  </code></pre>
  
  <p>Immediately the next alert appears and I have used wait and then implemented another alert</p>
  
  <pre><code>Alert alert2 = driver.switchTo().alert();
  alert2.accept();
  </code></pre>
  
  <p>But this fails.</p>
  
  <p>Execution is stopping at 1st alert.</p>
  
  <p>Complete Error:</p>
  
  <pre><code>Exception in thread "main" org.openqa.selenium.UnhandledAlertException: unexpected alert open: {Alert text : Save successfully.}
  (Session info: chrome=71.0.3578.98)
  (Driver info: chromedriver=2.44.609538 (b655c5a60b0b544917107a59d4153d4bf78e1b90),platform=Windows NT 10.0.10586 x86_64) (WARNING: The server did not provide any stacktrace information)
  Command duration or timeout: 0 milliseconds: null
  Build info: version: '3.12.0', revision: '7c6e0b3', time: '2018-05-08T15:15:03.216Z'
  System info: host: 'KADALI7', ip: '15.75.149.101', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '10.0.1'
  Driver info: org.openqa.selenium.chrome.ChromeDriver
  Capabilities {acceptInsecureCerts: false, acceptSslCerts: false, applicationCacheEnabled: false, browserConnectionEnabled: false, browserName: chrome, chrome: {chromedriverVersion: 2.44.609538 (b655c5a60b0b54..., userDataDir: C:\Users\kadali\AppData\Loc...}, cssSelectorsEnabled: true, databaseEnabled: false, goog:chromeOptions: {debuggerAddress: localhost:2130}, handlesAlerts: true, hasTouchScreen: false, javascriptEnabled: true, locationContextEnabled: true, mobileEmulationEnabled: false, nativeEvents: true, networkConnectionEnabled: false, pageLoadStrategy: normal, platform: XP, platformName: XP, rotatable: false, setWindowRect: true, takesHeapSnapshot: true, takesScreenshot: true, unexpectedAlertBehaviour: ignore, unhandledPromptBehavior: ignore, version: 71.0.3578.98, webStorageEnabled: true}
  Session ID: 2175d3b0d47212f94e61f6e71c8ca535
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
  at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
  at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
  at java.base/java.lang.reflect.Constructor.newInstance(Unknown Source)
  at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214)
  at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:172)
  at org.openqa.selenium.remote.http.JsonHttpResponseCodec.reconstructValue(JsonHttpResponseCodec.java:4
  </code></pre>