class PageObject::Elements::UnorderedList
Public Instance Methods
[](idx)
click to toggle source
Return the PageObject::Elements::ListItem
for the index provided. Index is zero based.
@return [PageObject::Elements::ListItem]
# File lib/page-object/elements/unordered_list.rb, line 21 def [](idx) list_items[idx] end
each(&block)
click to toggle source
iterator that yields with a PageObject::Elements::ListItem
@return [PageObject::Elements::ListItem]
# File lib/page-object/elements/unordered_list.rb, line 11 def each(&block) list_items.each(&block) end
items()
click to toggle source
Return the number of items contained in the unordered list
# File lib/page-object/elements/unordered_list.rb, line 28 def items list_items.size end
list_items()
click to toggle source
Return Array of ListItem
objects that are children of the UnorderedList
# File lib/page-object/elements/unordered_list.rb, line 35 def list_items @list_items ||= children(tag_name: 'li') end