Method: Selenium::WebDriver::Support::Select#deselect_by

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

#deselect_by(how, what) ⇒ Object

Deselect options by visible text, index or value.

Parameters:

  • how (:text, :index, :value)

    How to find the option

  • what (String)

    What value to find the option by.

Raises:

See Also:


124
125
126
127
128
129
130
131
132
133
134
135
# File 'lib/selenium/webdriver/support/select.rb', line 124

def deselect_by(how, what)
  case how
  when :text
    deselect_by_text what
  when :value
    deselect_by_value what
  when :index
    deselect_by_index what
  else
    raise ArgumentError, "can't deselect options by #{how.inspect}"
  end
end