Skip to content
masterclass Buddy

Cypress · Matcher

have.value

have.value checks that a form element has the expected value. Use it with .should() after selecting the element.

Last updated

Syntax

cy.get(selector).should('have.value', expectedValue)

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

Subscribe
  • should()
  • cy.get()
  • type()
  • include.text
  • have.text

Source: Assertions in Cypress | Cypress Documentation. Checked 2026-11-03.