Cypress · Method
cy.as
Cypress .as() saves a command result under an alias. Use the alias later with cy.get('@name'), cy.wait('@name'), or this.name in a standard function test.
Last updated
Syntax
.as(aliasName)
.as(aliasName, options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
cy.get()cy.wait()cy.intercept()cy.fixture()cy.stub()cy.spy()