Cypress's cy.prompt command has received several updates. Quoted text in prompt steps now generates cy.contains() with exact regex matching instead of cy.get(), useful when element content is stable but selectors aren't. not.exist assertions now work with text-based targeting. A new cy.press command supports keyboard interaction testing (Tab, Enter, etc.) for accessibility workflows. Additionally, cy.prompt automatically strips sensitive DOM values—passwords, credit card fields, and hidden inputs—before sending context to the AI model, with placeholder support for keeping sensitive step values out of the model too.

4m read timeFrom cypress.io
Post cover image
Table of contents
cy.contains support via text-based targetingWriting cy.prompt not.exist assertions with cy.containsKeyboard testing in cy.prompt with cy.pressHow cy.prompt handles sensitive data in the DOMTry it out

Sort: