Class Celerity::SelectList
In: lib/celerity/watir_compatibility.rb
lib/celerity/elements/select_list.rb
Parent: Object

Methods

clear   include?   multiple?   options   select   select_value   selected?   selected_options   set   type   value  

Constants

TAGS = [ Identifier.new('select') ]
DEFAULT_HOW = :name

External Aliases

selected_options -> getSelectedItems
options -> getAllContents
clear -> clearSelection
include? -> includes?

Public Instance methods

Clear all selected options

Returns true if the select list has one or more options matching the given value.

@param [String, Regexp] value A value. @return [true, false]

Returns true if the select list supports multiple selections

@return [Array<String>] An array of strings representing the text value of the select list‘s options.

Select the option(s) whose text or label matches the given string. If several options match the value given, all will be selected.

@param [String, Regexp] value A value. @raise [Celerity::Exception::NoValueFoundException] if the value does not exist. @return [String] The option selected. If multiple options match, returns the first match

Selects the option(s) whose value attribute matches the given string. @param [String, Regexp] value A value. @raise [Celerity::Exception::NoValueFoundException] if the value does not exist. @return [String] The option selected. If multiple options match, returns the first match

Returns true if any of the selected options match the given value.

@param [String, Regexp] value A value. @raise [Celerity::Exception::UnknownObjectException] if the value does not exist. @return [true, false]

@return [Array<String>] An array of strings representing the text value of the currently selected options.

set(value)

Alias for select

Returns ‘select-multiple’ if the select list has the ‘multiple’ attribute, defined, otherwise ‘select-one’.

@return [String]

Returns the value of the first selected option in the select list. Returns nil if no option is selected.

@return [String, nil]

[Validate]