Class: CapybaraPageObject::Input
- Includes:
- TextBasedInput
- Defined in:
- lib/capybara-page-object/elements/input.rb
Constant Summary collapse
- BUTTON_TYPES =
['submit', 'reset', 'button']
- CHECKABLE_TYPES =
['radio', 'checkbox']
Instance Attribute Summary
Attributes inherited from Node
Instance Method Summary collapse
- #button? ⇒ Boolean
- #checkable? ⇒ Boolean
-
#checked? ⇒ Boolean
TODO this doesn’t belong here.
- #untyped? ⇒ Boolean
Methods included from TextBasedInput
Methods inherited from FormField
Methods included from HTML5Data
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
Instance Method Details
#button? ⇒ Boolean
17 18 19 |
# File 'lib/capybara-page-object/elements/input.rb', line 17 def BUTTON_TYPES.include?(source[:type]) end |
#checkable? ⇒ Boolean
21 22 23 24 |
# File 'lib/capybara-page-object/elements/input.rb', line 21 def checkable? type = source[:type] type && CHECKABLE_TYPES.include?(type) end |
#checked? ⇒ Boolean
TODO this doesn’t belong here
9 10 11 |
# File 'lib/capybara-page-object/elements/input.rb', line 9 def checked? source.checked? end |
#untyped? ⇒ Boolean
13 14 15 |
# File 'lib/capybara-page-object/elements/input.rb', line 13 def untyped? source[:type].nil? end |