Sha256: ef96c0d92f07863662983e09b4f7ced0ba7586f0014d3d83a1df401d490dca88

Contents?: true

Size: 419 Bytes

Versions: 4

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

module Watir
  #
  # Custom class representing table row (tr).
  #

  class Row < TableRow
  end # Row

  class RowCollection < TableRowCollection
    def to_a
      # we do this craziness since the xpath used will find direct child rows
      # before any rows inside thead/tbody/tfoot...
      @to_a ||= super.sort_by { |e| e.attribute_value(:rowIndex).to_i }
    end
  end
end # Watir

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
watir-7.3.0 lib/watir/elements/row.rb
watir-7.2.2 lib/watir/elements/row.rb
watir-7.2.1 lib/watir/elements/row.rb
watir-7.2.0 lib/watir/elements/row.rb