cy.origin is not a function error displayed

2.2k Views Asked by At

I am trying to use the new origin function and I got this error:

No commands were issued in this test.

TypeError
The following error originated from your test code, not from Cypress.
cy.origin is not a function

The code is really basic:

cy.origin('https://www.acme.com', () => {
    cy.visit('/history/founder')
    cy.get('h1').contains('About our Founder, Marvin Acme')
})

Thanks a lot!

1

There are 1 best solutions below

0
SuchAnIgnorantThingToDo-UKR On

Two things to check

  • have you added experimentalSessionAndOrigin: true to cypress.json?

  • are you using Cypres v9.6.0+