Skip to content
masterclass Buddy

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.

Subscribe
  • cy.clearCookie()
  • cy.getAllCookies()
  • cy.getCookies()
  • cy.setCookie()
  • cy.session()
  • cy.origin()

Source: cy.getCookie() | Cypress API Documentation. Checked 2026-11-03.