Sha256: 2cba6fa72a28a9b5c908f845405e3e76947e1f3069191e90c3dee74fdda67a0f

Contents?: true

Size: 627 Bytes

Versions: 5

Compression:

Stored size: 627 Bytes

Contents

module PageObject
  module Platforms
    module Selenium

      module TableRow

        #
        # Return the PageObject::Elements::TableCell for the index provided.  Index
        # is zero based.
        #
        def [](idx)
          els = table_cells
          Object::PageObject::Elements::TableCell.new(els[idx], :platform => :selenium)
        end

        #
        # Returns the number of columns in the table.
        #
        def columns
          table_cells.size
        end

        private

        def table_cells
          element.find_elements(:xpath, child_xpath)
        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/selenium/table_row.rb
page-object-0.2.4 lib/page-object/platforms/selenium/table_row.rb
page-object-0.2.3 lib/page-object/platforms/selenium/table_row.rb
page-object-0.2.2 lib/page-object/platforms/selenium/table_row.rb
page-object-0.2.1 lib/page-object/platforms/selenium/table_row.rb