def test_alert_presence(self): page = AlertPage() page.open() handler = WindowsHandler() assert not (handler.is_alert_present()) page.alert_link.click() assert handler.is_alert_present() assert handler.get_alert_text() == 'cheese' handler.accept_alert() assert not (handler.is_alert_present())
def test_alert_presence(self): page = AlertPage() page.open() handler = WindowsHandler() assert_false(handler.is_alert_present()) page.alert_link.click() ok_(handler.is_alert_present()) eq_(handler.get_alert_text(), 'cheese') handler.accept_alert() assert_false(handler.is_alert_present())