Class | Selenium::WebDriver::Support::Select |
In: |
lib/selenium/webdriver/support/select.rb
|
Parent: | Object |
Deselect all selected options. Only valid if the element supports multiple selections.
@raise [Error::UnsupportedOperationError] if the element does not support multiple selections.
Deselect options by visible text, index or value.
@param [:text, :index, :value] how How to find the option @param [String] what What value to find the option by.
@see Select#select_by
Get the first selected option in this select element
@raise [Error::NoSuchElementError] if no options are selected @return [Element]
Select all unselected options. Only valid if the element supports multiple selections.
@raise [Error::UnsupportedOperationError] if the element does not support multiple selections.
Select options by visible text, index or value.
When selecting by :text, selects options that display text matching the argument. That is, when given "Bar" this would select an option like:
<option value="foo">Bar</option>
When slecting by :value, selects all options that have a value matching the argument. That is, when given "foo" this would select an option like:
<option value="foo">Bar</option>
When selecting by :index, selects the option at the given index. This is done by examining the "index" attribute of an element, and not merely by counting.
@param [:text, :index, :value] how How to find the option @param [String] what What value to find the option by.