Sha256: 4fcf4272fe24e77e3c8ca25397ab25fc179bb4f17dcfce8001e8206e1adc8a7d

Contents?: true

Size: 656 Bytes

Versions: 4

Compression:

Stored size: 656 Bytes

Contents

module PageObject
  module Platforms
    module SeleniumOrderedList
      
      #
      # 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 ordered 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_ordered_list.rb
page-object-0.1.1 lib/page-object/platforms/selenium_ordered_list.rb
page-object-0.1 lib/page-object/platforms/selenium_ordered_list.rb
page-object-0.0.5 lib/page-object/platforms/selenium_ordered_list.rb