Cypress vs Selenium
Cypress is a JavaScript testing framework that runs inside the browser, with automatic waiting, a time-travel command log and a one-superdomain-per-test limit. Selenium is a browser automation library built on the WebDriver standard, with six languages, every major browser and Selenium Grid. Choose Cypress for a JavaScript team testing its own app; choose Selenium for language choice and existing suites.
- Cypress
- A JavaScript end-to-end and component testing framework that runs inside the browser, in the same run loop as the application under test.
- Selenium
- The long-standing browser automation project built on the W3C WebDriver standard, with bindings for Java, Python, C#, Ruby, JavaScript and Kotlin.
How do Cypress and Selenium compare?
| Dimension | Cypress | Selenium |
|---|---|---|
| Architecture | CypressExecuted in the same run loop as the application, with a Node process alongside | SeleniumSends commands over the W3C WebDriver protocol to a browser-specific driver |
| Languages | CypressJavaScript and TypeScript only | SeleniumJava, Python, C#, Ruby, JavaScript, Kotlin |
| Browsers | CypressChrome-family and Firefox; WebKit is experimental; Electron is deprecated | SeleniumAny browser with a WebDriver implementation: Chrome, Edge, Firefox, Safari, Internet Explorer |
| Waiting | CypressCommands and assertions wait and retry automatically | SeleniumExplicit, implicit and fluent waits written by the test author |
| Scope limits | CypressOne browser at a time, one superdomain per test (cy.origin for cross-origin), no native events | SeleniumMultiple windows, tabs and origins are ordinary WebDriver operations |
| Test runner | CypressBuilt in, with Mocha-style describe and it blocks | SeleniumBring your own: JUnit, TestNG, pytest, NUnit, Mocha and so on |
| Debugging | CypressTime-travel command log with DOM snapshots, screenshots and video | SeleniumSelenium IDE for recording; debugging through the language's own tools |
| Network control | CypressStub and control network traffic without involving the server | SeleniumNot part of WebDriver; needs a proxy or the BiDi and DevTools work |
| Distributed execution | CypressParallel runs across machines require Cypress Cloud and the --record flag | SeleniumSelenium Grid runs tests across machines, browsers and platforms, free |
| Licence | CypressMIT; Cypress Cloud is a paid service | SeleniumOpen source, Apache 2.0 licence |
When should you choose Cypress, and when Selenium?
Choose Cypress when
- The team writes JavaScript and the developers will own the end-to-end tests.
- Timing flakiness has been the main cost and automatic retry of commands and assertions removes most of it.
- The application lives on one origin and the flows do not need several tabs or browsers at once.
- Component tests and end-to-end tests should share one tool and one command log.
Choose Selenium when
- The team works in Java, Python, C#, Ruby or Kotlin rather than JavaScript.
- You must cover Safari through its own driver, Internet Explorer, or browsers Cypress does not support.
- Flows open multiple windows, cross several origins, or drive more than one browser session in a test.
- There is a Selenium Grid or cloud grid in place and a large existing suite to protect.
How does Cypress vs Selenium come up in QA interviews?
This is one of the most common comparison questions in QA interviews because Selenium is what most estates run and Cypress is what many JavaScript teams adopted next. Interviewers listen for whether you know where each tool runs and what that costs, not for a verdict.
- 01Cypress runs inside the browser and Selenium drives it from outside. What can each do that the other cannot?
- 02Why does a Cypress test rarely need an explicit wait, and what does a Selenium test author have to write instead?
- 03A login flow bounces through an identity provider on another domain. How do you handle that in Cypress, and in Selenium?
- 04You have a 2,000-test Selenium suite in Java. Someone proposes rewriting it in Cypress. What questions do you ask first?
No account needed · Scored in under a minute against a senior rubric
Common questions about Cypress vs Selenium
Is Cypress replacing Selenium?
No. Cypress became the preferred tool for many JavaScript teams testing their own web applications, and Playwright has since taken much of that new-suite demand. Selenium remains the most widely deployed browser automation tool, is built on a W3C standard every major browser implements, and still appears in a large share of QA postings.
Can Cypress use Java or Python?
No. Cypress tests are written in JavaScript or TypeScript and run inside the browser. Selenium has official bindings for Java, Python, C#, Ruby, JavaScript and Kotlin. A team that does not write JavaScript should look at Selenium or Playwright.
Does Cypress support Safari?
Cypress can run against WebKit, the engine Safari uses, as an experimental, opt-in browser; it does not drive the branded Safari application. Selenium drives Safari itself through Apple's safaridriver on macOS.
Which should I learn first?
If you are choosing for yourself, learn Selenium if you want the widest range of roles and languages, or Cypress if you are a JavaScript developer who will test your own app. If you can add a third, Playwright now covers most new-suite demand and its concepts overlap with both.
Ready to be asked about Cypress or Selenium?
Practice explaining the trade-off to an interviewer who knows both.
Join 500+ QA engineers already practicing with AssertHired.
A test passes locally but fails in CI about one run in five. Walk me through what you check first, and why.
Scored on the same four dimensions as the real thing: Technical accuracy · Coverage · Clarity · Best practices.
Rather skip ahead? Create a free account