You’ve most probably seen the sometimes-useful-but-often-annoying browser alerts when navigating away from a page: How do we deal with these using WebDriver? Dismissing these as expected alerts I set up a sample page that shows such an alert when navigating away, and we can test this behaviour fairly easily: And our page object looks like … Continue reading “Handling JavaScript alerts when leaving a page with WebDriver”