← Back to libraryQuestion 185 of 468
🌲CypressAdvanced

Cypress Limitations

📌 Definition:

Cypress is powerful but has deliberate constraints: JavaScript-only, single-browser/single-tab, limited native multi-domain (mitigated by cy.origin), no true multi-tab control, and it cannot easily test native OS dialogs or true mobile-native apps.

📖 Detailed Explanation:

Key limitations to know: (1) Language — tests are JS/TS only. (2) No multiple browser tabs/windows — one tab per test; test the destination via cy.request or by removing target=_blank. (3) Cross-origin needs cy.origin. (4) It runs in the browser, so it cannot automate desktop apps, native mobile apps, or true OS-level file dialogs (file upload uses cy.selectFile, not the OS picker). (5) Historically limited browser support (now Chrome-family, Firefox, Edge, WebKit-experimental). Knowing these guides when to choose Selenium/Appium/Playwright instead, and how to design around the constraints.

🔑 Key Points:
  • JS/TS only; single tab per test (no multi-tab control)
  • Cross-origin requires cy.origin; some third-party flows are awkward
  • Cannot drive native mobile or desktop apps / OS dialogs
  • Design around limits: cy.request, remove target=_blank, cy.selectFile
🌍 Real-World Example:

A requirement to test a flow spanning two browser tabs is redesigned: instead of asserting the second tab, the team verifies the link's href and tests the destination page independently via cy.visit — working within Cypress's single-tab model.

🎯 Scenario-Based Interview Question:

Name three things Cypress cannot do well and how you'd handle each.