Javascript – How to stop a 'for' loop in Cypress?
This is the code I'm using: it('Test to stop a FOR loop', function () { cy.visit('https://docs.cypress.io/guides/overview/why-cypress'); for (let i = 0; i < 5; i++) { cy.wait(1000); cy.url().then((url) => { cy.log(`**${url}**`); if (url.includes('api')) { break; // This fails } if…