Updated BeforeMethod of BB Code Tests to handle UnsupportedOperationException
when working with alerts since some browsers (like mobile, htmlunit) don't
support alerts.