Method: Selenium::WebDriver::Support::Select#select_all

Defined in:
lib/selenium/webdriver/support/select.rb

#select_allObject

Select all unselected options. Only valid if the element supports multiple selections.

Raises:

  • if the element does not support multiple selections.



143
144
145
146
147
# File 'lib/selenium/webdriver/support/select.rb', line 143

def select_all
  raise Error::UnsupportedOperationError, 'you may only select all options of a multi-select' unless multiple?

  options.each { |e| select_option e }
end