public void selectedValue ( String expectedValue ) { String value = checkSelectedValue ( expectedValue , 0 , 0 ) ; String reason = NO_ELEMENT_FOUND ; if ( value == null && getElement ( ) . is ( ) . present ( ) ) { reason = ELEMENT_NOT_SELECT ; } assertNotNull ( reason , value ) ; assertEquals ( "Selected Value Mismatch" , expectedValue , value ) ; }
Asserts that the element s selected value equals the provided expected value . If the element isn t present or a select this will constitute a failure same as a mismatch . This information will be logged and recorded with a screenshot for traceability and added debugging support .