@ Conditioned @ Quand ( "Je mets à jour la date '(.*)-(.*)' avec une '(.*)' date '(.*)'[\\.|\\?]") @ When ( "I update date '(.*)-(.*)' with a '(.*)' date '(.*)'[\\.|\\?]" ) public void updateDate ( String page , String elementName , String dateType , String dateOrKey , List < GherkinStepCondition > conditions ) throws TechnicalException , FailureException { final String date = Context . getValue ( dateOrKey ) != null ? Context . getValue ( dateOrKey ) : dateOrKey ; if ( ! "" . equals ( date ) ) { final PageElement pageElement = Page . getInstance ( page ) . getPageElementByKey ( ' ' + elementName ) ; if ( date . matches ( Constants . DATE_FORMAT_REG_EXP ) ) { updateDateValidated ( pageElement , dateType , date ) ; } else { new Result . Failure <> ( date , Messages . format ( Messages . getMessage ( Messages . FAIL_MESSAGE_WRONG_DATE_FORMAT ) , date , elementName ) , false , pageElement . getPage ( ) . getCallBack ( ) ) ; } } }
Update a html input text with a date .