I've a page with a list of links.
I could access these links using class selector '.promotional-item-link'
How can I click to loop throught all the links, click to each item and test if there is a specific [identical for all] string on all of these page?
How can I
- extract items based on a class
- loop through each one to do a ->visit and an ->assert ?
The following code works:
The fist foreach seems unnecessary, but extracting the link text directly in the second foreach failed after the first iteration (i do not know why)