Neo Neoza
Neo Neoza

Reputation: 1

Cypress - Assertions - cy.url.should is not a function

What I did :

I tried to do an assertion for a URL and I am getting the following error

Error: cy.url.should is not a function

My code :cy.url.should('contain','#/home')

Upvotes: 0

Views: 385

Answers (1)

Alapan Das
Alapan Das

Reputation: 18650

You are close, you just missed the closing brackets.

cy.url().should('contain','#/home')

Upvotes: 1

Related Questions