Cypress · Function
cy.task
cy.task() runs a named handler in Node.js from a Cypress test. Use it for work the browser cannot do, such as database access and file-system operations.
Last updated
Syntax
cy.task(event)
cy.task(event, arg)
cy.task(event, arg, options)In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.
SubscribeRelated
setupNodeEventstaskTimeoutcy.readFile()cy.fixture()cy.request()