Method: XPath::HTML#table_row

Defined in:
lib/xpath/html.rb

#table_row(cells) ⇒ Object



92
93
94
95
96
97
98
# File 'lib/xpath/html.rb', line 92

def table_row(cells)
  cell_conditions = child(:td, :th)[text.equals(cells.first)]
  cells.drop(1).each do |cell|
    cell_conditions = cell_conditions.next_sibling(:td, :th)[text.equals(cell)]
  end
  cell_conditions
end