Class: Capybara::UI::Table

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

Defined Under Namespace

Classes: Columns, Row

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, root, 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

.data_row(selector, &block) ⇒ Object


20
21
22
# File 'lib/capybara/ui/widgets/table.rb', line 20

def self.data_row(selector, &block)
  widget :data_row, selector, Row, &block
end

.header_row(selector, &block) ⇒ Object


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

def self.header_row(selector, &block)
  widget :header_row, selector, Row, &block
end

Instance Method Details

#columnsObject


69
70
71
# File 'lib/capybara/ui/widgets/table.rb', line 69

def columns
  Columns.new(self)
end

#rowsObject


73
74
75
# File 'lib/capybara/ui/widgets/table.rb', line 73

def rows
  widgets(:data_row).map(&:value)
end