Struggling with origin URLs post Cypress 14.0.0 release #30926
Replies: 2 comments
-
@adamstringy This portion of the origin docs should help you with this: https://docs.cypress.io/api/commands/origin#Dependencies--Sharing-Code |
Beta Was this translation helpful? Give feedback.
-
Thank you for your response. I have modified and used the commands as listed in the documentation provided however I am coming up against this error:
When I visit https://initialUrl it automatically redirects to https://redirectUrl setting this as the origin, the test then requires me to use the cy.origin() commands to proceed. When using the commands inside the suggested documentation it is stating that the original cy.visit() URL needs to be different to the cy.origin()... Cypress.require URL I have attached the code block below but removed the login, file structure and URLs to protect the application: `describe('Testing for cy.origin() fix', () => {
}) I have no other way to navigate to this application other that use the initialURL. Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Good Afternoon,
Following the Cypress 14.0.0 release I am struggling to establish an origin URL that I can then use the test script against without using the cy.origin() function due to an automatic redirect.
My scenario:
When I visit my initial URL it automatically redirects the redirect URL which is then set as the origin, the below works however as all the test is ran inside the cy.origin promise I cannot use the functions in my commands.js file.
How can I set the origin URL to remain as the initial URL?
Beta Was this translation helpful? Give feedback.
All reactions