Skip to content
masterclass Buddy

Cypress · Method

cy.hash

cy.hash() gets the hash of the active page URL. It includes #, returns an empty string for no hash value, and retries chained assertions while the application updates the route.

Last updated

Since
< 0.3.3

Syntax

cy.hash()
cy.hash(options)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • cy.location()
  • cy.url()

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