Class: Capybara::UI::TextField
- Defined in:
- lib/capybara/ui/widgets/text_field.rb
Overview
A text field.
Constant Summary
Constants included from Capybara::UI
Instance Attribute Summary
Attributes inherited from Widget
Instance Method Summary collapse
- #content? ⇒ Boolean
-
#get ⇒ Object
The text field value.
-
#set(value) ⇒ Object
Sets the text field value.
- #to_cell ⇒ Object
-
#to_s ⇒ Object
The text field value, or the empty string if the field is empty.
Methods inherited from Field
Methods inherited from Widget
action, #class?, #classes, #click, #double_click, filter, filter?, find_all_in, find_in, #has_action?, #hover, #html, #id, #initialize, not_present_in?, present_in?, #right_click, root, selector, #text, #value, widget_delegator
Methods included from Widgets::DSL
Methods included from WidgetParts::Container
#has_widget?, #not_visible?, #visible?, #widget, #widgets
Methods included from Capybara::UI
Methods included from Constructors
Methods included from WidgetParts::Struct
Constructor Details
This class inherits a constructor from Capybara::UI::Widget
Instance Method Details
#content? ⇒ Boolean
24 25 26 |
# File 'lib/capybara/ui/widgets/text_field.rb', line 24 def content? get.respond_to?(:empty?) ? ! get.empty? : !! get end |
#get ⇒ Object
Returns The text field value.
7 |
# File 'lib/capybara/ui/widgets/text_field.rb', line 7 def_delegator :root, :value, :get |
#set(value) ⇒ Object
Sets the text field value.
13 |
# File 'lib/capybara/ui/widgets/text_field.rb', line 13 def_delegator :root, :set |
#to_cell ⇒ Object
20 21 22 |
# File 'lib/capybara/ui/widgets/text_field.rb', line 20 def to_cell get end |
#to_s ⇒ Object
Returns the text field value, or the empty string if the field is empty.
18 |
# File 'lib/capybara/ui/widgets/text_field.rb', line 18 def_delegator :get, :to_s |