global

def row_match_ordered_cells(row)

def row_match_ordered_cells(row)
  row_conditions = row.map do |cell|
    XPath.self(:td)[XPath.string.n.is(cell)]
  end
  row_conditions.reverse.reduce do |cond, cell|
    cell[XPath.following_sibling[cond]]
  end
end