Endtest

Endtest

โ€บAll blog posts

All blog posts

  • 5 Myths About Codeless Automation
  • No-code test automation
  • Selenium vs Cypress
  • Endtest vs Ghost Inspector
  • Puppeteer vs Selenium
  • A Practical Guide for Finding Elements with Selenium
  • 8 Extremely Useful HTML Tricks
  • 8 Extremely Powerful JavaScript Hacks
  • Endtest vs Sauce Labs
  • Endtest vs BrowserStack
  • 10 Ways To Improve Your Automated Tests

Selenium vs Cypress

August 3, 2020

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.

Recent posts
  • 1. Selenium
  • 2. Cypress
  • Conclusion
Copyright ยฉ 2020 Endtest