Class: Cucumber::Salad::Widgets::FieldGroup::Field

Inherits:
Widget
  • Object
show all
Defined in:
lib/cucumber/salad/widgets/field_group.rb

Overview

A form field.

Direct Known Subclasses

CheckBox, Select, TextField

Instance Attribute Summary

Attributes inherited from Widget

#root

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Widget

#has_action?, #initialize, #inspect, #reload, root, selector, #to_s

Methods included from Cucumber::Salad::WidgetMacros

#action, #widget, #widget_delegator

Methods included from Cucumber::Salad::WidgetContainer

#has_widget?, #widget

Constructor Details

This class inherits a constructor from Cucumber::Salad::Widgets::Widget

Class Method Details

.find_in(parent, options) ⇒ Object



246
247
248
# File 'lib/cucumber/salad/widgets/field_group.rb', line 246

def self.find_in(parent, options)
  new({root: parent.find_field(selector)}.merge(options))
end

.present_in?(parent) ⇒ Boolean

Returns:

  • (Boolean)


250
251
252
# File 'lib/cucumber/salad/widgets/field_group.rb', line 250

def self.present_in?(parent)
  parent.has_field?(selector)
end

Instance Method Details

#getObject

Override this to get the actual value.

Returns:

  • This field’s value.

Raises:

  • (NotImplementedError)


257
258
259
# File 'lib/cucumber/salad/widgets/field_group.rb', line 257

def get
  raise NotImplementedError
end

#set(value) ⇒ Object

Sets the field value.

Override this to set the value.

Raises:

  • (NotImplementedError)


264
265
266
# File 'lib/cucumber/salad/widgets/field_group.rb', line 264

def set(value)
  raise NotImplementedError
end