What’s new in cy.prompt for AI testing in Cypress
Blog post from Cypress
Cypress has introduced updates and new features for cy.prompt, an AI-driven test authoring tool, based on insights gained from its initial release. The updates include support for non-existence assertions using explicit CSS selectors, allowing for more reliable testing by requiring clear targets rather than relying on natural language. Additionally, improvements in test authoring speed have been made by enabling command options such as timeout and force to be incorporated directly into prompt steps, reducing the need for additional code. Teams can also now control the priority of element selectors using Cypress.ElementSelector API, ensuring alignment with team conventions and improving predictability. Recent enhancements include self-healing indicators for transparency, support for testing scenarios involving scrolling elements into view, and an upcoming shift towards generating cy.contains() queries to improve test stability. These developments aim to integrate AI more effectively into testing workflows, providing teams with tools to create more maintainable test suites.