Class: Webrat::Form
Overview
:nodoc:
Instance Attribute Summary collapse
-
#element ⇒ Object
readonly
Returns the value of attribute element.
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Element
#initialize, #inspect, load, load_all, #path
Constructor Details
This class inherits a constructor from Webrat::Element
Instance Attribute Details
#element ⇒ Object (readonly)
Returns the value of attribute element.
9 10 11 |
# File 'lib/webrat/core/elements/form.rb', line 9 def element @element end |
Class Method Details
.xpath_search ⇒ Object
11 12 13 |
# File 'lib/webrat/core/elements/form.rb', line 11 def self.xpath_search [".//form"] end |
Instance Method Details
#field_named(name, *field_types) ⇒ Object
23 24 25 |
# File 'lib/webrat/core/elements/form.rb', line 23 def field_named(name, *field_types) Webrat::Locators::FieldNamedLocator.new(@session, dom, name, *field_types).locate end |
#fields ⇒ Object
15 16 17 |
# File 'lib/webrat/core/elements/form.rb', line 15 def fields @fields ||= Field.load_all(@session, @element) end |
#submit ⇒ Object
19 20 21 |
# File 'lib/webrat/core/elements/form.rb', line 19 def submit @session.request_page(form_action, form_method, params) end |