Alert handling fix for SeleniumWrapper

SeleniumWrapper checks whether there any hanging alert boxing before
disposing the browser.