Proposal: Add cy.catch
command to prevent failed Cypress commands from failing the test
#5094
Labels
type: feature
New feature that does not currently exist
Current behavior:
There is no way to catch failed commands in a Cypress test. Any failed command fails the entire test. If you want to catch a failed command for a legitimate reason, ugly workarounds must be used: percy/percy-cypress#140
And options to use duck-typing to return errors must be added on a per-command basis: #3161 (comment)
Desired behavior:
Add
cy.catch
command which can be chained to any Cypress command, and will be short-circuited to if an error is thrown in the chain preceding it.Similar to Promise.catch:
The text was updated successfully, but these errors were encountered: