watirmelon.blog
Handling JavaScript alerts when leaving a page with WebDriver
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?