Cypress vs Selenium WebDriver Comparison by Example
Raw Selenium WebDriver with Ruby Binding is much better.
--
This article is one of the “Bad Test Automation Frameworks/Tools” series.
Table of Contents:
· Cypress vs Selenium WebDriver (Ruby)
· Comparative Analysis
· Human Factors
· FAQ
I started this article 10 months ago, it was sitting in my drafts and just noticed it today. After my three articles on Cypress,
- Why Cypress Sucks for Real Test Automation? and Part 2: Limitations
- Why JavaScript Is Not a Suitable Language for Real Web Test Automation?”
I thought there is no need to talk about Cypress, which, IMO, is doomed to fail (for reasons, read the above). So far, every Cypress test automation (that I am aware of) failed badly, often embarrassingly. I noticed a trend though, after failures, fake automated testers blamed Cypress and then switched to another JS framework Playwright, just like earlier some of them switched to Cypress from the hyped (and now deprecated) Protractor. Playwright is not good either, maybe slightly better than Cypress, then failed again. The best is still raw Selenium WebDriver in Ruby.
The article An IT Graduate’s frustration with a Fake ‘Senior Test Automation Engineer’ tells an interesting and real story of an intern (my mentee, freshly out of Uni) who silenced one fake senior test automation engineer with indisputable results, implemented automated UI tests in both Selenium and Playwright at the productivity this large company have never seen. (Reason: this intern developed tests in raw Selenium WebDriver first, then converted to Playwright). Eventually, this fake senior Playwright tester did dirty tricks to sabotage. A good read.
Today, I saw a LinkedIn feed to recommend using Cypress for test automation, and it was posted in a Selenium Group. So I decide to complete and publish this article.
Anyway, the aim of this article is about an objective comparison of Cypress and Selenium syntax, using a very simple example, from a tester’s perspective. To be fair, I used the Cypress test script example posted by Gleb Bahmutov (known as the authority on Cypress). So, the comparison is as objective as it can be.