# Selenium vs Cypress: A Deep Comparison

Explore the strengths and limitations of Selenium and Cypress for test automation. Understand which tool best fits your testing needs.

Published December 12, 2024 by Liviu Lupei on the Endtest blog. Canonical URL: https://endtest.io/blog/selenium-vs-cypress

---
Let's compare **[Selenium](https://www.selenium.dev/)** and **[Cypress](https://www.cypress.io/)**.

&nbsp;

| Requirement                             | Selenium | Cypress |
|-----------------------------------------|:--------:|:-------:|
| Completely open-source and free        | ✅       | 🔲      |
| Works with Chrome                       | ✅       | ✅      |
| Works with Firefox                      | ✅       | ✅      |
| Works with Edge                         | ✅       | 🔲      |
| Works with Safari                       | ✅       | 🔲      |
| Works with Internet Explorer 11         | ✅       | 🔲      |
| Works with multiple browser tabs        | ✅       | 🔲      |
| Works with asynchronous web pages       | ✅       | ✅      |
|                                         |          |         |

## 1. Selenium

**Selenium WebDriver** is easy to use, and there are plenty of resources available online.

It works with all major browsers, and the WebDrivers are even maintained by the browser developers themselves.

And it can easily handle complex scenarios which involve iframes and multiple browser tabs.

There are also a number of libraries that are built as a wrapper on top of Selenium, such as NightwatchJS, WebdriverIO, and CodeceptJS.

Personally, I would avoid using those libraries since it puts me at a higher risk of getting blocked by issues in their code, as they're not as well maintained as pure Selenium WebDriver.

[Endtest](https://endtest.io/) is using Selenium to locate elements in Web Applications.

Selenium is just one of the many open-source components that we're using.

## 2. Cypress

**Cypress** is an npm package that can be used to create simple tests.

The cross-browser support isn't so comprehensive, but at least there is a beta version working on Firefox.

Dealing with iframes in Cypress requires a lot of hacks that don't always work.

Dealing with multiple browser tabs in Cypress is currently not possible.

The tests created with Cypress tend to be flaky and constantly require workarounds and hacks.

It is promoted as an open-source library, but it has a paid product behind it (the Cypress Dashboard service).

Cypress invests a lot in marketing, and that has got them some attention in the last years.

Personally, I would not use it due to the severe limitations.

## Conclusion

**Selenium** is definitely more powerful than Cypress.

The severe limitations of Cypress tend to remind us of the first version of Selenium from 2005, which relied more on JavaScript than WebDrivers.

We did adapt the requirements from the comparison table as much as we could.
