Sha256: 700dddcc9b0cb51cfec19f7d808ae78e9922ba7ab0dd3e57738c88ac858d9a53

Contents?: true

Size: 567 Bytes

Versions: 5

Compression:

Stored size: 567 Bytes

Contents

module PageObject
  module Platforms
    module Watir

      module Table

        #
        # Return the PageObject::Elements::TableRow for the index provided.  Index
        # is zero based.
        #
        # @return [PageObject::Elements::TableRow]
        #
        def [](idx)
          PageObject::Elements::TableRow.new(@element[idx], :platform => :watir)
        end

        #
        # Returns the number of rows in the table.
        #
        def rows
          element.wd.find_elements(:xpath, child_xpath).size
        end

      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
page-object-0.2.5 lib/page-object/platforms/watir/table.rb
page-object-0.2.4 lib/page-object/platforms/watir/table.rb
page-object-0.2.3 lib/page-object/platforms/watir/table.rb
page-object-0.2.2 lib/page-object/platforms/watir/table.rb
page-object-0.2.1 lib/page-object/platforms/watir/table.rb