Cypress vs Selenium

More developers and QA testers have migrated from Selenium to Cypress than to any other automated testing framework. Find out how Cypress and Selenium compare.

describe('Auth', () => {
  it('user should be able to log in', () => {
    cy.visit('/')

    // open the login modal
    cy.get('button').contains('Login').click()

    // fill in the form
    cy.get('input[type="email"]').type('[email protected]')
    cy.get('input[type="password"]').type('test123')

    // submit the form

Introducing Cypress

The leading open-source framework for automated browser testing

Since its introduction, Cypress has quickly become the most developer-loved automated browser testing framework for modern web applications.

Get started in minutes

Unlike Selenium, which requires downloading browser-specific drivers and external libraries for assertions, Cypress is completely out-of-the-box. It includes everything needed to write, run, and debug automated tests. Spend less time managing drivers and dependencies, and more time delivering quality code.

Achieve unmatched reliability

Selenium's reliance on an interface for browser interactions can introduce delays and lead to false-positive results, impacting test reliability and developer confidence. In contrast, Cypress was built from the ground up for superior stability, operating directly within the browser to ensure consistent and dependable test outcomes.  With Cypress, you gain control over the entire automation process, eliminating unnecessary communication layers and delivering accurate representations of user experiences.

Empower every team member

Selenium's steep learning curve and complex documentation can hinder adoption, limiting familiarity to a select few on your team. Its reliance on various tools and extensions may overwhelm users seeking a more streamlined approach. In contrast, Cypress offers a powerful, well-documented API that's easy to learn and use. With Cypress, writing tests become accessible to everyone, not just QA Engineers. Empower every team member to contribute to the testing process effortlessly.

Revolutionize debugging with time-travel capabilities

Unlike Selenium, Cypress offers built-in time-travel debugging. Say goodbye to logging and clunky breakpoints—Cypress allows you to witness your application's behavior step-by-step during test execution. Using its built-in browser tools with readable errors and stack traces, debugging becomes effortless. And with Cypress Cloud, you can replay CI tests and inspect the DOM, network requests, console logs, and more.

Extend the value of your tests

Extend your test value effortlessly within the Cypress ecosystem. Seamlessly integrate into your workflow for enhanced debugging and a developer experience you know and love. Get automatic access to detailed reports and actionable insights in Cypress Cloud, including:

Cypress offers these capabilities built-in, unlike Selenium, eliminating the need for extra tools and complexities in your stack.

Get premium support and guidance

While Selenium lacks paid support, it boasts a large online community. Similarly, if you encounter any challenges, our Discord community—with over 13,000 testing peers and experts—is ready to provide assistance. Cypress also offers white-glove support and strategic guidance through Cypress Cloud. Choose Cypress for comprehensive support tailored to your needs.

Feature Comparison

Why choose Cypress over Selenium?

Cypress

Selenium

Direct browser interaction

Minimal setup

Built-in waiting and retry mechanisms

Parallelization with automatic load balancing

Time-travel debugging

Automatic video recording

Component Testing

Out-of-the-box support for UI coverage

Out-of-the-box support for Accessibility testing

Don't take our word for it

Discover why organizations are choosing Cypress over Selenium for their automated testing needs.

5M+
Weekly downloads
45K+
GitHub stars
1M+
Dependent repositories
Perlego Logo

Before we switched to Cypress in 2020, we would develop for two weeks, then we would release to a staging environment where we ran Selenium tests. With Cypress, we feel safe to release to production without any manual testing.

Yorgos Eliopoulos

Senior QA Engineer

Vidyard Logo

My advice for someone who is considering switching from Selenium to Cypress would be to forget your hesitations and just do it. Cypress takes the headache out of writing tests, and though it might seem daunting to start again with a new tool, it really is simple to get started and you can be up and running quickly.

Todd Kemp

Quality Lead

Pendo Logo

Cypress was so intuitive, we didn’t have to do any training. Even associate engineers, some of whom are college grads without Javascript experience, can pick up Cypress quickly.

Blake Lee

Sr. Software Engineering Manager

Capgemini logo

Pablo Ugaz

Senior Director, Engineering Productivity

Beamery logo

Our stabilization phase for a major release used to take 3-4 weeks to complete. Cypress played a key part in being able to increase the automation coverage across our applications. We’ve shrunk the stabilization phase to a predictable 7-8 days from 3-4 weeks.

Kim Hellbom

Engineering Manager

Global Shares logo

Laerte Neto

Software Engineer in Test

Frequently Asked Questions

Is Cypress free?

Cypress is a free, downloadable and open source (MIT license) application. This is always free to use.

Cypress Cloud is a web application which records your test runs in CI to help you scale every facet of testing. We offer a variety of billing plans (including a free plan for non-commercial open-source, public projects). Please see our Pricing Page for more details.

What is Cypress Cloud? How does it extend the value of Cypress App?

On most teams, merging your code up beyond your local environment means executing automated tests in a CI pipeline.

Cypress Cloud is a service that unlocks the full potential of Cypress test automation tools in your CI pipeline. Cloud takes the rich result data coming from tests run the Cypress app and provides developers with a variety of tools for scaling every facet of Cypress testing:

  • Smart orchestration tools to increase speed and conserve resources in your CI runs

  • Integrations with popular version control tools like GitHub, GitLab, and BitBucket

  • Increased visibility into test flake and failure

  • Analytics for measuring and optimizing your entire test suite

  • Specialized products like Cypress Accessibility and UI Coverage, which extend the value of your tests. These help ensure comprehensive coverage of accessibility standards and user interface elements.

I need help migrating from Selenium to Cypress. Do you have any options to support me?

Yes! We’ve partnered with AssertQA, which provides migration services to facilitate your smooth transition from Selenium to Cypress with a guaranteed two-week turnaround time. Learn more here.

Furthermore, Cypress has compiled a migration guide, which is packed with step-by-step instructions, best practices, and insider tips. This guide is designed to accelerate your migration process and minimize downtime.

Do I have to replace all of my tests with Cypress immediately?

Absolutely not. While it might sound ideal to replace Selenium immediately, you can gradually migrate Selenium tests over to Cypress. We recommend prioritizing your tests based on their criticality and value. This approach allows you to gradually reduce your reliance on Selenium while minimizing the impact on your team's bandwidth.

Can Selenium and Cypress coexist in the same application?

Yes, Cypress and Selenium tests can coexist in the same application. However, it’s important to consider that maintaining two sets of tests can increase the maintenance overhead. There may also be duplication of effort in writing and maintaining similar tests in both Cypress and Selenium. This redundancy can be inefficient and may lead to inconsistencies or confusion in the testing process.

Does Cypress use Selenium / Webdriver?

No. In fact Cypress' architecture is very different from Selenium in a few critical ways:

Cypress runs in the context of the browser. With Cypress it's easier to inspect what is running in the browser, but harder to talk to the outside world. In Selenium it's the exact opposite. Selenium runs outside of the browser where your application is running (though Cypress is adding more commands every day that give you access to the outside world - like cy.request(), cy.exec(), and cy.task()).

With Selenium you get either 100% simulated events (with Selenium RC) or 100% native events (with Selenium WebDriver). With Cypress, you get both. For the most part we use simulated events. However we do use automation APIs for things like Cookies where we extend outside of the JavaScript sandbox and interact with the underlying browser APIs. This gives us flexibility to determine which type of event to use in specific situations. Native event support is on our roadmap.

In what instances should I use Selenium over Cypress?

Choosing between Cypress and Selenium hinges on understanding the nuances of each framework and aligning them with the specific needs of your project. Cypress excels in delivering a faster, more reliable, and developer-friendly testing experience. Its focus on ease of use, comprehensive documentation, and a unified testing framework accessible to the entire team positions it as a strong contender.

On the other hand, Selenium's versatility in language support and a robust user base might be advantageous in specific scenarios, especially for teams using a broader array of programming languages.