Module: Watir::RowContainer
- Included in:
- Table, TableSection
- Defined in:
- lib/watir-webdriver/row_container.rb
Instance Method Summary (collapse)
- - (Object) row(*args)
- - (Object) rows(*args)
-
- (Array<Array<String>>) strings
(also: #to_a)
The table as a 2D Array of strings with the text of each cell.
Instance Method Details
- (Object) row(*args)
4 5 6 7 8 9 |
# File 'lib/watir-webdriver/row_container.rb', line 4 def row(*args) row = tr(*args) row.locator_class = ChildRowLocator row end |
- (Object) rows(*args)
11 12 13 14 15 16 |
# File 'lib/watir-webdriver/row_container.rb', line 11 def rows(*args) rows = trs(*args) rows.locator_class = ChildRowLocator rows end |
- (Array<Array<String>>) strings Also known as: to_a
The table as a 2D Array of strings with the text of each cell.
24 25 26 27 28 29 30 |
# File 'lib/watir-webdriver/row_container.rb', line 24 def strings assert_exists rows.inject [] do |res, row| res << row.cells.map { |cell| cell.text } end end |