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.6.6 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.6.5 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.6.4 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.6.3 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.6.2 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.6.1 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.6 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.5.5 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.5.4 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.5.3 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.5.2 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.5.1 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.5.0 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.4.4 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.4.3 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.4.2 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.4.1 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.4.0 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.3.2 lib/page-object/platforms/selenium_webdriver/table_row.rb
page-object-0.3.1 lib/page-object/platforms/selenium_webdriver/table_row.rb