https://cypress.io logo
Sounds like you could do a `cy.get()` for some com...
# e2e-testing
s
Sounds like you could do a
cy.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
Copy code
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);
});