Loop through links on a page in Codeception Tests
问题 I'm writing some functionality tests using Codeception and the PHPBrowser webdriver. Codeception uses specific references in CSS or XPath to check elements on a page. But I want to be able to loop through all the links in my menu, click on it and run a test to see if the link is working. ie. if my menu looks like this: <ul id='nav'> <li><a>Link1</a></li> <li><a>Link2</a></li> <li><a>Link3</a></li> <li><a>Link4</a></li> <li><a>Link5</a></li> </ul> I want to be able to loop through the links