Cypress · Matcher
Cypress.Commands
Cypress custom commands add reusable actions to tests or change existing commands. Choose parent, child, or dual behavior with the prevSubject option.
Last updated
Syntax
Cypress.Commands.add(name, callbackFn)
Cypress.Commands.add(name, options, callbackFn)
Cypress.Commands.addAll(callbackObj)
Cypress.Commands.addAll(options, callbackObj)
Cypress.Commands.overwrite(name, callbackFn)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
Cypress.Commands.addAll()Cypress.Commands.overwrite()Cypress.Commands.log()custom queriescy.wrap()