Open prasunna09 opened 6 months ago
Getting same issue as well as a lack of selector capability inside origin callback function. Also getting this error immediately after login.
const loginToAuth0 = (username: string, password: string) => {
cy.visit('/');
cy.wait(3000);
cy.get('#username').type(username);
cy.get('#password').type(password, { log: false });
cy.contains('button[value=default]', 'Continue').click();
cy.url().should('equal', 'http://localhost:3000/'); // This line gives same error
};
Getting same issue. Cypress version : 13.10.0
~Same problem, unable to assert on a cy.url()
, although only just after a mid-test navigation for me. I was running on 13.6.2
, just upgraded to 13.12.0
and no difference in behaviour~
UPDATE: using the cy.origin
as recommended did fix this for us
Same issue
Current behavior
I'm invoking a URL which redirects to a page, I'm using a cy.origin() + cy.visit() to open the primary link which is being redirected to another page.
Now I wanna verify the updated url of my page
I'm invoking
cy.url()
insidecy.origin()
callback which returns an empty string instead of the current page/frame URL.Desired behavior
cy.url()
should return the current url of the page instead of returning empty pageTest code to reproduce
Cypress Version
9.8.1
Node version
v21.6.1
Operating System
Mac OS 13.5.2
Debug Logs
Other