I want to put an if condition if an attribute exist on a button or else do some other things. How can I do it in Cypress? I have done this till now but not working... '''
if(cy.get('button[type="button"]').should('have.attr','disabled')==true){
doTaskA()
}else{
doTaskB()
}
''' This fails the whole test and not just the condition.
Aucun commentaire:
Enregistrer un commentaire