Class Celerity::Table
In: lib/celerity/elements/table.rb
Parent: Element

Methods

[]   cells   child_cell   child_row   column_count   column_values   each   locate   row_count   row_values   rows   tds   to_a  

Included Modules

ClickableElement Enumerable Container

Constants

TAGS = [ Identifier.new('table') ]
ATTRIBUTES = BASE_ATTRIBUTES | [ :align, :bgcolor, :border, :cellpadding, :cellspacing, :frame, :rules, :summary, :width, ]
DEFAULT_HOW = :id

Public Instance methods

[](index)

Alias for child_row

Returns the TableCell at the given index (1-indexed).

In a 10-column row, table.child_cell[11] will return the first cell on the second row.

@param [Fixnum] index The index of the wanted cell, 1-indexed. @raise [Celerity::Exception::UnknownCellException] @return [Celerity::TableCell]

Returns the TableRow at the given index (1-indexed).

  browser.table(:foo, 'bar')[1] # => #<TableRow...>
  browser.table(:foo, 'bar').child_row[1] # => #<TableRow...>

@param [Fixnum] index The index of the wanted row, 1-indexed. @raise [Celerity::Exception::UnknownRowException] @return [Celerity::TableRow]

Returns the number of columns on the row at the given index. (1-indexed) Default is the number of columns on the first row @param [Fixnum] index An index, 1-indexed (optional). @return [Fixnum]

Iterates through each row in the table. @yieldparam [Celerity::TableRow] row A row.

The number of rows in the table @return [Fixnum]

tds()

Alias for cells

Returns the text of each cell in the the table as a two-dimensional array. @return [Array<Array<String>>]

[Validate]