Cypress · Method
cy.getCookie
Gets one browser cookie by name. It returns a cookie object or null, and chained assertions can wait for the cookie to appear.
Last updated
- Since
- 5.0.0
Syntax
cy.getCookie(name)
cy.getCookie(name, options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
cy.clearCookie()cy.getAllCookies()cy.getCookies()cy.setCookie()cy.session()cy.origin()