Skip to content
masterclass Buddy

Cypress · Method

cy.clear

cy.clear() removes the current value from a text-like input, textarea, or contenteditable element. It can clear every valid element in its subject.

Last updated

Syntax

cy.clear()
cy.clear(options)

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

Subscribe
  • .blur()
  • .focus()
  • .type()

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