public void selectOptions ( String ... expectedOptions ) { String [ ] options = checkSelectOptions ( expectedOptions , 0 , 0 ) ; String reason = NO_ELEMENT_FOUND ; if ( options == null && getElement ( ) . is ( ) . present ( ) ) { reason = ELEMENT_NOT_SELECT ; } assertNotNull ( reason , options ) ; assertEquals ( "Selected Options Mismatch" , Arrays . asList ( expectedOptions ) , Arrays . asList ( options ) ) ; }
Asserts that the element s select options equal the provided expected options . 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 .