Module: Watir::List
Instance Method Summary collapse
-
#[](idx) ⇒ Object
Returns item from this list at given index.
-
#each {|element| ... } ⇒ Object
Yields each LI associated with this list.
- #list_items ⇒ Object
Instance Method Details
#[](idx) ⇒ Object
Returns item from this list at given index.
35 36 37 |
# File 'lib/watir/elements/list.rb', line 35 def [](idx) list_items[idx] end |
#each {|element| ... } ⇒ Object
Yields each LI associated with this list.
19 20 21 |
# File 'lib/watir/elements/list.rb', line 19 def each(&block) list_items.each(&block) end |
#list_items ⇒ Object
39 40 41 |
# File 'lib/watir/elements/list.rb', line 39 def list_items LICollection.new(self, adjacent: :child, tag_name: 'li') end |