You can define a collection of links in your page object using links
:
class MyPage
include PageObject
links(:tag_link, :css =>".tags-link a")
end
This will create a collection_name_elements
method that returns an array of matching page-object elements. You can iterate over it to perform an action on each element. For example, to output the text of each link:
page.tag_link_elements.each do |link|
puts link.text
end
#=> test1
#=> test2
#=> test3
#=> test4
#=> test5
#=> test6