public String getSelectedLabel ( ) { List < WebElement > options = getElement ( ) . findElements ( By . tagName ( "option" ) ) ; for ( WebElement option : options ) { if ( option . isSelected ( ) ) { return option . getText ( ) ; } } return null ; }
Get a single selected label . If multiple options are selected then the first one is returned .