Class: Capybara::UI::Field

Inherits:
Widget
  • Object
show all
Defined in:
lib/capybara/ui/widgets/field.rb

Overview

A form field.

Direct Known Subclasses

CheckBox, RadioButton, Select, TextField

Constant Summary

Constants included from Capybara::UI

VERSION

Instance Attribute Summary

Attributes inherited from Widget

#root

Class Method Summary collapse

Instance Method Summary collapse

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, selector, #text, #to_cell, #to_s, #value, widget_delegator

Methods included from Widgets::DSL

#form, #list, #widget

Methods included from WidgetParts::Container

#has_widget?, #not_visible?, #visible?, #widget, #widgets

Methods included from Capybara::UI

#deprecate

Methods included from Constructors

#Decimal, #Integer, #Widget

Methods included from WidgetParts::Struct

included

Constructor Details

This class inherits a constructor from Capybara::UI::Widget

Class Method Details

.root(selector) ⇒ Object


5
6
7
# File 'lib/capybara/ui/widgets/field.rb', line 5

def self.root(selector)
  super String === selector ? [:field, selector] : selector
end

Instance Method Details

#getObject

Override this to get the actual value.

Returns:

  • This field's value.

Raises:

  • (NotImplementedError)

12
13
14
# File 'lib/capybara/ui/widgets/field.rb', line 12

def get
  raise NotImplementedError
end

#set(value) ⇒ Object

Sets the field value.

Override this to set the value.

Raises:

  • (NotImplementedError)

19
20
21
# File 'lib/capybara/ui/widgets/field.rb', line 19

def set(value)
  raise NotImplementedError
end