Class: CapybaraPageObject::Page
- Extended by:
- ClassMethods
- Includes:
- Collections, InstanceMethods
- Defined in:
- lib/capybara-page-object/page.rb
Instance Attribute Summary
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
- #forms ⇒ Object
-
#tables ⇒ Object
TODO why doesn’t this work when in the module?.
Methods included from ClassMethods
Methods included from InstanceMethods
Methods included from Collections
Methods inherited from Node
#classes, element, field, from_string, #initialize
Methods included from Delegators
Constructor Details
This class inherits a constructor from CapybaraPageObject::Node
Class Method Details
.component(name, &block) ⇒ Object
66 67 68 |
# File 'lib/capybara-page-object/page.rb', line 66 def self.component(name, &block) define_method(name, &block) end |
.path(p) ⇒ Object
62 63 64 |
# File 'lib/capybara-page-object/page.rb', line 62 def self.path(p) define_method(:path) { p } end |
Instance Method Details
#forms ⇒ Object
55 56 57 58 59 60 |
# File 'lib/capybara-page-object/page.rb', line 55 def forms all('form').each_with_object({}) do |e, hash| f = CapybaraPageObject::Form.new(e) hash[f.key] = f end end |
#tables ⇒ Object
TODO why doesn’t this work when in the module?
48 49 50 51 52 53 |
# File 'lib/capybara-page-object/page.rb', line 48 def tables all('table').each_with_object({}) do |e, hash| t = CapybaraPageObject::Table.new(e) hash[t.key] = t end end |