Module: Watir::RowContainer
- Included in:
- Table, TableSection
- Defined in:
- lib/watir/row_container.rb
Instance Method Summary collapse
-
#row(*args) ⇒ Object
Returns table row.
-
#rows(*args) ⇒ Object
Returns table rows collection.
-
#strings ⇒ Array<Array<String>>
(also: #to_a)
The table as a 2D Array of strings with the text of each cell.
Instance Method Details
#row(*args) ⇒ Object
Returns table row.
7 8 9 |
# File 'lib/watir/row_container.rb', line 7 def row(*args) Row.new(self, extract_selector(args)) end |
#rows(*args) ⇒ Object
Returns table rows collection.
15 16 17 |
# File 'lib/watir/row_container.rb', line 15 def rows(*args) RowCollection.new(self, extract_selector(args)) end |
#strings ⇒ Array<Array<String>> Also known as: to_a
The table as a 2D Array of strings with the text of each cell.
25 26 27 28 29 30 31 |
# File 'lib/watir/row_container.rb', line 25 def strings wait_for_exists rows.inject [] do |res, row| res << row.cells.map(&:text) end end |