@ Et ( "Je vérifie le message '(.*)' sur l'alerte") @ And ( "I check message '(.*)' on alert" ) public void checkAlert ( String messageOrKey ) throws TechnicalException , FailureException { final String message = Context . getValue ( messageOrKey ) != null ? Context . getValue ( messageOrKey ) : messageOrKey ; final String msg = getAlertMessage ( ) ; if ( msg == null || ! msg . equals ( message ) ) { new Result . Failure <> ( msg , Messages . format ( Messages . getMessage ( Messages . FAIL_MESSAGE_NOT_FOUND_ON_ALERT ) , message ) , false , Context . getCallBack ( Callbacks . RESTART_WEB_DRIVER ) ) ; } }
Checks that a given page displays a html alert with a message .