Sha256: fae845d177c1e5862f73f504fa4412b063ef9f247d3320afbd41b3229fd3a4a0

Contents?: true

Size: 718 Bytes

Versions: 16

Compression:

Stored size: 718 Bytes

Contents

module PageObject
  module Platforms
    module WatirWebDriver
      module UnorderedList

        #
        # Return the PageObject::Elements::ListItem for the index provided.  Index
        # is zero based.
        #
        # @return [PageObject::Elements::ListItem]
        #
        def [](idx)
          eles = list_items
          Object::PageObject::Elements::ListItem.new(eles[idx], :platform => :watir_webdriver)
        end

        #
        # Return the number of items contained in the unordered list
        #
        def items
          list_items.size
        end

        private

        def list_items
          element.wd.find_elements(:xpath, child_xpath)
        end

      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
page-object-0.6.1 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.6 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.5.5 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.5.4 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.5.3 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.5.2 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.5.1 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.5.0 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.4.4 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.4.3 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.4.2 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.4.1 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.4.0 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.3.2 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.3.1 lib/page-object/platforms/watir_webdriver/unordered_list.rb
page-object-0.3.0 lib/page-object/platforms/watir_webdriver/unordered_list.rb