Devops News and Headlines
  • All Technology
  • AI
  • Autonomy
  • B2B Growth
  • Big Data
  • BioTech
  • ClimateTech
  • Consumer Tech
  • Crypto
  • Cybersecurity
  • DevOps
  • Digital Marketing
  • Ecommerce
  • EdTech
  • Enterprise
  • FinTech
  • GovTech
  • Hardware
  • HealthTech
  • HRTech
  • LegalTech
  • Nanotech
  • PropTech
  • Quantum
  • Robotics
  • SaaS
  • SpaceTech
AllNewsDealsSocialBlogsVideosPodcastsDigests
NewsDealsSocialBlogsVideosPodcasts
DevopsNewsHow cy.prompt Generates cy.contains, cy.press, and Handles Sensitive Data
How cy.prompt Generates cy.contains, cy.press, and Handles Sensitive Data
DevOps

How cy.prompt Generates cy.contains, cy.press, and Handles Sensitive Data

•February 26, 2026
0
Cypress – Blog
Cypress – Blog•Feb 26, 2026

Why It Matters

By aligning test generation with stable UI content and safeguarding sensitive data, teams can write more resilient, secure automated tests while reducing maintenance overhead.

Key Takeaways

  • •Quoted text triggers cy.contains with exact match regex.
  • •Unquoted steps fall back to stable CSS selectors.
  • •not.exist assertions now accept text or selector targets.
  • •cy.press adds native keyboard interaction support.
  • •Sensitive field values are stripped before AI processing.

Pulse Analysis

The latest cy.prompt enhancements shift the focus from brittle CSS selectors to stable, user‑visible content. When a step includes quoted text, Cypress generates a cy.contains call wrapped in an exact‑match regular expression, eliminating false positives caused by partial matches. This content‑driven approach reduces test flakiness, especially in applications where DOM structures evolve frequently, and aligns automated checks with what end users actually see on the screen.

Accessibility testing receives a boost with the new cy.press command. Test writers can now script keyboard interactions—such as Tab navigation or Enter submissions—using natural language, mirroring real‑world user behavior. Incorporating keyboard actions directly into test scripts not only improves coverage of assistive‑technology pathways but also encourages developers to consider inclusive design early in the development cycle. The ability to express these interactions in plain English lowers the barrier for QA teams to adopt accessibility best practices.

Security and privacy concerns are addressed by automatically stripping sensitive field values before any DOM snapshot is sent to Cypress’s AI model. Passwords, credit‑card details, and hidden inputs are omitted, while their surrounding context remains available for element identification. For custom data, placeholders can be used to ensure no secrets leak into the model. This redaction strategy helps organizations stay compliant with data‑protection regulations and builds confidence in AI‑assisted test generation, making cy.prompt a safer choice for testing login flows, checkout processes, and other credential‑heavy workflows.

How cy.prompt generates cy.contains, cy.press, and handles sensitive data

Read Original Article
0

Comments

Want to join the conversation?

Loading comments...