mirror of
https://github.com/cypress-io/cypress.git
synced 2026-05-19 06:38:45 -05:00
1.1 KiB
1.1 KiB
title, comments, description
| title | comments | description |
|---|---|---|
| end | true |
Ends the Cypress command chain and returns null. This is equivalent to the jQuery end() method.
| Returns | null |
| Timeout | cannot timeout |
cy.end()
End the command chain.
Usage
// cy.end is useful when you want to end a chain of commands
// and force Cypress to re-query from the root element
cy
.contains("User: Cheryl").click().end() // ends the current chain and returns null
// queries the entire document again
.contains("User: Charles").click()
Command Log
end does not log in the command log
cy
.contains(".modal-title", "Select Folder Type").end()
.contains("li", "Maintenance").should("have.class", "active")
The commands above will display in the command log as:
