the argument to least must be a number cypress code example Example: cypress have attribute cy.get('selector') .should('have.attr', 'aria-checked', 'true')