Class Mechanize::Form::SelectList
In: lib/mechanize/form/select_list.rb
Parent: MultiSelectList

This class represents a select list or drop down box in a Form. Set the value for the list by calling SelectList#value=. SelectList contains a list of Option that were found. After finding the correct option, set the select lists value to the option value:

 selectlist.value = selectlist.options.first.value

Options can also be selected by "clicking" or selecting them. See Option

Methods

Public Class methods

Public Instance methods

Find one option on this select list with criteria Example:

  select_list.option_with(:value => '1').value = 'foo'

Find all options on this select list with criteria Example:

  select_list.options_with(:value => /1|2/).each do |field|
    field.value = '20'
  end

[Validate]