class PageObject::Elements::OrderedList

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/ordered_list.rb, line 22
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/ordered_list.rb, line 12
def each(&block)
  list_items.each(&block)
end
items() click to toggle source

Return the number of items contained in the ordered list

# File lib/page-object/elements/ordered_list.rb, line 29
def items
  list_items.size
end
list_items() click to toggle source

Return Array of ListItem objects that are children of the OrderedList

# File lib/page-object/elements/ordered_list.rb, line 36
def list_items
  @list_items ||= children(tag_name: 'li')
end