square-honey-48197
11/18/2022, 6:25 PMcy.get() for some common attribute they all share, .each() and then inside specify the behavior. Like this example: https://www.webtips.dev/webtips/cypress/iterate-over-elements
Javascript
cy.get('menu li').each((element, index, list) => {
// Returns the current li element
expect(Cypress.$(element)).to.be.visible;
// Returns the index of the loop
expect(index).to.be.greaterThan(-1);
// Returns the elements from the cy.get command
expect(list).to.have.length(3);
});