I have been running automation testing on selenium (C#) for quite some time now, and I recently upgraded to version 2.37 with Chrome Driver 2.4. After this upgrade, for some reason every time an open dialog causes a test to fail, the exception is unhandled, which causes Visual Studio to completely freeze up and the rest of the test suite does not get executed.
Is there a good way to prevent this from occurring other than trying to avoid an alert from causing a test to fail? It is nice to test for that, so I do not want to simply dodge the issue. After a failing test, I attempt to switch to DefaultContent, and that is specifically where the "UnhandledAlertException was unhandled" gets thrown:
Driver.SwitchTo().DefaultContent();
It is in a try-catch block, but this exception does not get caught for some strange reason.