cy.get('button').each(($btn, index) => { if (index > 0) { // Skips the first button (index 0) cy.wrap($btn).click(); } });