Module: Watir::RowContainer

Included in:
Table, TableSection
Defined in:
lib/watir/row_container.rb

Instance Method Summary collapse

Instance Method Details

#row(opts) ⇒ Object

Returns table row.



9
10
11
# File 'lib/watir/row_container.rb', line 9

def row(opts)
  Row.new(self, opts)
end

#rows(opts = {}) ⇒ Object

Returns table rows collection.



17
18
19
# File 'lib/watir/row_container.rb', line 17

def rows(opts = {})
  RowCollection.new(self, opts)
end

#stringsArray<Array<String>> Also known as: to_a

The table as a 2D Array of strings with the text of each cell.

Returns:

  • (Array<Array<String>>)


27
28
29
30
31
32
33
# File 'lib/watir/row_container.rb', line 27

def strings
  wait_for_exists

  rows.inject [] do |res, row|
    res << row.cells.map(&:text)
  end
end