Sha256: 652655dfdb8da87af6aab6956e2db3c774540e3cb0427fb5f48a63324560f224
Contents?: true
Size: 872 Bytes
Versions: 4
Compression:
Stored size: 872 Bytes
Contents
# frozen_string_literal: true module Watir module List include Enumerable # # Yields each LI associated with this list. # # @example # list = browser.ol # list.each do |li| # puts li.text # end # # @yieldparam [Watir::LI] element Iterate through the items for this List. # def each(&block) list_items.each(&block) end alias length count alias size count alias items count alias empty? none? # # Returns item from this list at given index. # # @param [Integer] idx # @return Watir::LI # def [](idx) list_items[idx] end def list_items LICollection.new(self, adjacent: :child, tag_name: 'li') end end # List class OList < HTMLElement include List end class UList < HTMLElement include List end end # Watir
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
watir-7.3.0 | lib/watir/elements/list.rb |
watir-7.2.2 | lib/watir/elements/list.rb |
watir-7.2.1 | lib/watir/elements/list.rb |
watir-7.2.0 | lib/watir/elements/list.rb |