Method: Celerity::SelectList#selected_options

Defined in:
lib/celerity/elements/select_list.rb

#selected_optionsArray<String>

Returns An array of strings representing the text value of the currently selected options.

Returns:

  • (Array<String>)

    An array of strings representing the text value of the currently selected options.



19
20
21
22
# File 'lib/celerity/elements/select_list.rb', line 19

def selected_options
  assert_exists
  @object.getSelectedOptions.map { |e| e.asText.empty? ? e.getLabelAttribute : e.asText }
end