You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At any time during or after a test run, you can view the exact Cypress code that `cy.prompt` generated from your natural language steps. This transparency is built into every `cy.prompt` execution.
387
+
cy.prompt self-heals when the element it needs to interact with has changed since the last time the step ran.
388
+
389
+
When `cy.prompt` self-heals a step, Cypress makes that change visible directly in the Command Log so you can understand exactly what changed and which element the step resolved to.
alt="Console logs for a self-healed cy.prompt step"
407
+
/>
408
+
409
+
### Console logs
410
+
411
+
Clicking a `cy.prompt` command or an individual self-healed step prints detailed Console logs in the Developer Tools, including:
412
+
413
+
-**Resolved element** - The selector and element that this step resolved to after self-healing.
414
+
-**Cached elements** - The previously resolved elements that the step checked before self-healing.
415
+
-**Self-healed** - Whether the element was self-healed.
416
+
417
+
If the element was self-healed via cache, the Console logs will show the resolved element within the cached elements. If the element was self-healed via AI, the Console logs will not have the resolved element within the cached elements.
alt="Console logs for a self-healed cy.prompt step"
422
+
/>
423
+
424
+
This level of detail makes it easy to tell whether a self-heal reflects an intentional product change or an unexpected behavior so you can refine or rewrite the step if necessary.
425
+
426
+
### Self-healed status definitions
427
+
428
+
**Self-Healed via Cache** - A selector changed since the last time `cy.prompt` ran and the element resolved to another element using the existing cache entry. In this case, `cy.prompt` did **not** call AI; the cached mapping was able to resolve the new element.
429
+
430
+
**Self-Healed via AI** - A selector changed since the last time `cy.prompt` ran and the element resolved to another element via an AI call because there was no matching cache entry. The Console logs make it clear that AI was used to find the new element.
431
+
432
+
433
+
## View and export generated code
434
+
435
+
At any time during or after a test run, you can view the exact Cypress code that `cy.prompt` generated from your natural language steps. Combined with the self-healed tags and Console details in the Command Log, this gives you a clear, auditable record of what happened during `cy.prompt` execution. This transparency is built into every `cy.prompt` execution.
0 commit comments