Class: Webrat::SelectField

Inherits:
Field show all
Defined in:
lib/webrat/core/elements/field.rb

Overview

:nodoc:

Instance Attribute Summary

Attributes inherited from Field

#value

Attributes inherited from Element

#element

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Field

#disabled?, field_class, field_classes, #id, inherited, #initialize, #label_text, load, #raise_error_if_disabled, #set, #to_param, xpath_search_excluding_hidden

Methods inherited from Element

#initialize, #inspect, load, load_all, #path

Constructor Details

This class inherits a constructor from Webrat::Field

Class Method Details

.xpath_searchObject



409
410
411
# File 'lib/webrat/core/elements/field.rb', line 409

def self.xpath_search
  [".//select[not(@multiple)]"]
end

Instance Method Details

#optionsObject



413
414
415
# File 'lib/webrat/core/elements/field.rb', line 413

def options
  @options ||= SelectOption.load_all(@session, @element)
end

#unset(value) ⇒ Object



417
418
419
# File 'lib/webrat/core/elements/field.rb', line 417

def unset(value)
  @value = nil
end