Sha256: b493ee7c3c536de50482a63720452c10fbb6698864d2d08e3b7d8a48220a35f0

Contents?: true

Size: 660 Bytes

Versions: 4

Compression:

Stored size: 660 Bytes

Contents

module PageObject
  module Platforms
    module SeleniumUnorderedList
      
      #
      # Return the PageObject::Elements::ListItem for the index provided.  Index
      # is zero based.
      #
      # @return [PageObject::Elements::ListItem]
      #
      def [](idx)
        eles = list_items
        PageObject::Elements::ListItem.new(eles[idx], :platform => :selenium)
      end
      
      #
      # Return the number of items contained in the unordered list
      #
      def items
        list_items.size
      end
      
      private
      
      def list_items
        element.find_elements(:xpath, child_xpath)
      end
      
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
page-object-0.2 lib/page-object/platforms/selenium_unordered_list.rb
page-object-0.1.1 lib/page-object/platforms/selenium_unordered_list.rb
page-object-0.1 lib/page-object/platforms/selenium_unordered_list.rb
page-object-0.0.5 lib/page-object/platforms/selenium_unordered_list.rb