Sha256: 73cc8ef49c638dc969397fff1622a7cd9c0d7bb32c3a9e8dd70c53749a2b02b7

Contents?: true

Size: 698 Bytes

Versions: 5

Compression:

Stored size: 698 Bytes

Contents

module PageObject
  module Platforms
    module Selenium
      module OrderedList

        #
        # 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 => :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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
page-object-0.2.5 lib/page-object/platforms/selenium/ordered_list.rb
page-object-0.2.4 lib/page-object/platforms/selenium/ordered_list.rb
page-object-0.2.3 lib/page-object/platforms/selenium/ordered_list.rb
page-object-0.2.2 lib/page-object/platforms/selenium/ordered_list.rb
page-object-0.2.1 lib/page-object/platforms/selenium/ordered_list.rb