Module: Watir::TableCellsContainer

Includes:
TableElementsContainer
Included in:
Table, TableRow, TableSection
Defined in:
lib/watir-classic/table.rb

Instance Method Summary collapse

Instance Method Details

#cell(how = {}, what = nil) ⇒ TableCell

Returns cell inside of the Watir::Table.

Returns:



51
52
53
54
55
# File 'lib/watir-classic/table.rb', line 51

def cell(how={}, what=nil)
  specifiers = format_specifiers([:th, :td], how, what)
  index = specifiers.delete(:index) || 0
  cells(specifiers)[index]
end

#cells(how = {}, what = nil) ⇒ TableCellCollection

Returns cells inside of the Watir::Table.

Returns:



44
45
46
47
# File 'lib/watir-classic/table.rb', line 44

def cells(how={}, what=nil)
  assert_exists
  table_elements(TableCellCollection, [:th, :td], how, what, @o.cells)
end