IsAlertDialogPresent in Unit Tests is not working in special cases
In one special case inside the unit tests, the IsAlertDialogPresent stopped working correctly.
"iwebDriver.switchTo().Alert()" throws an "UnhandledAlertException" instead of returning an alert. It cannot be reproduced in a naked Selenium Test. Also, it only happens in one of three testcases which call this method.
I found out that it got fixed with the Chromedriver version upgrade from v2.38 to v2.41. Could not find related informations in the release notes.
I found the following changes made in Chromedriver v2.44:
But I did not see an apparent relation to our workaround (could not find related issues in UnhandledAlertException issues either).
Will do a quick test with past chromedriver versions.