Cypress · Function
cy.url
cy.url() gets the complete URL of the page under test. It yields the URL through the Cypress chain, so use assertions, .then(), or an alias to work with the string.
Last updated
- Since
- < 0.3.3
Syntax
cy.url()
cy.url(options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
cy.hash()cy.location()cy.origin()