Method: PageObject::Platforms::WatirWebDriver::SelectList#selected_options

Defined in:
lib/page-object/platforms/watir_webdriver/select_list.rb

#selected_optionsArray<String>

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

Returns:

  • (Array<String>)

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



43
44
45
# File 'lib/page-object/platforms/watir_webdriver/select_list.rb', line 43

def selected_options
  element.selected_options.map { |e| e.text }.compact
end