Class Webrat::Element
In: lib/cucumber/webrat/element_locator.rb
Parent: Object

Methods

to_a   to_table  

Public Instance methods

to_a()

Alias for to_table

Returns an Array of Array of String where each String is a "cell" in the table-like structure represented by this Element.

Supported elements are table, dl, ol and ul. Different conversion strategies are used depending on the kind of element:

  • table : Each tr becomes a row. The innerHTML of each td or th inside becomes a cell. The number
               of columns is determined by the number of cells in the first row.
    
  • dl : Each dt becomes a row with 2 cells. The innerHTML of the dt itself and the next dd become cells.
  • ul or ol : Each li becomes a row with one cell, the innerHTML of the li.

[Validate]