Sha256: 1e4d61d7f32e6231e0e2004ff9acbcc832a140982811cf305a857101e1e3e716

Contents?: true

Size: 646 Bytes

Versions: 21

Compression:

Stored size: 646 Bytes

Contents

module PageObject
  module Platforms
    module SeleniumWebDriver

      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_webdriver)
        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

21 entries across 21 versions & 1 rubygems

Version Path
page-object-0.3.0 lib/page-object/platforms/selenium_webdriver/table_row.rb