cy.url() and/or cy.location(‘href’) does not return a string
tl;dr Cypress commands are asynchronous, you have to use then to work with their yields. cy.url().then(url => { cy.get(‘.editor-toolbar-actions-save’).click(); cy.url().should(‘not.eq’, url); }); Explanation A similar question was asked on GitHub, and the official document on aliases explains this phenomenon in great detail: You cannot assign or work with the return values of any Cypress command. … Read more