public String [ ] getContentLabel ( ) { List < WebElement > options = getElement ( ) . findElements ( By . tagName ( "option" ) ) ; List < String > contents = new ArrayList < String > ( ) ; for ( WebElement option : options ) { contents . add ( option . getText ( ) ) ; } return ( String [ ] ) contents . toArray ( new String [ contents . size ( ) ] ) ; }
Get all labels whether they are selected or not .