Class: Webrat::ButtonField
- Defined in:
- lib/webrat/core/elements/field.rb
Overview
:nodoc:
Instance Attribute Summary
Attributes inherited from Field
Attributes inherited from 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, #unset, 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_search ⇒ Object
209 210 211 |
# File 'lib/webrat/core/elements/field.rb', line 209 def self.xpath_search [".//button", ".//input[@type = 'submit']", ".//input[@type = 'button']", ".//input[@type = 'image']"] end |
Instance Method Details
#click ⇒ Object
222 223 224 225 226 |
# File 'lib/webrat/core/elements/field.rb', line 222 def click raise_error_if_disabled set(@element["value"]) unless @element["name"].blank? form.submit end |
#default_value ⇒ Object
218 219 220 |
# File 'lib/webrat/core/elements/field.rb', line 218 def default_value nil end |
#to_param ⇒ Object
213 214 215 216 |
# File 'lib/webrat/core/elements/field.rb', line 213 def to_param return nil if @value.nil? super end |