Technology

Selenium vs Cypress

Understand the differences to amke an informed decision

Let's compare Selenium and Cypress.

RequirementSeleniumCypress
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, since they're not as well maintained as pure Selenium WebDriver.

Endtest 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 a 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.

Try Endtest Free for 14 days

No contracts, no credit card.
Start Free Trial
The first 14 days are on us
Free hands-on onboarding & support
30 days money back guarantee