protected void updateRadioList ( PageElement pageElement , String valueOrKey ) throws TechnicalException , FailureException { final String value = Context . getValue ( valueOrKey ) != null ? Context . getValue ( valueOrKey ) : valueOrKey ; try { final List < WebElement > radioButtons = Context . waitUntil ( ExpectedConditions . presenceOfAllElementsLocatedBy ( Utilities . getLocator ( pageElement ) ) ) ; for ( final WebElement button : radioButtons ) { if ( button . getAttribute ( VALUE ) . contains ( value ) ) { button . click ( ) ; break ; } } } catch ( final Exception e ) { new Result . Failure <> ( e . getMessage ( ) , Messages . format ( Messages . getMessage ( Messages . FAIL_MESSAGE_UNABLE_TO_SELECT_RADIO_BUTTON ) , pageElement ) , true , pageElement . getPage ( ) . getCallBack ( ) ) ; } }
Update html radio button by text input .