|
|
|
|
|
by EddyTests
1053 days ago
|
|
3+ testing tools for websites - Selenium, Cypress, and Playwright. Selenium is a little old and verbose - the biggest issue, imo, is having to handle waiting for elements. Also managing webdrivers suck. Cypress is great for E2E tests but falls apart on edge cases, for example it can't handle multiple domains. Just requiring npm and not needing webdrivers is really nice for CI. Playwright is sort of a combination of both - fixes a lot of issues in Selenium but has the ease of use of Cypress. It is much less documented than Selenium though. If I was starting a new project I'd use Playwright. |
|
Most of the limitations are around 2 things - Cypress has its own JS runtime separate from the node process which causes weird (non-intuitive) behavior. The other thing is the hand-wavy way Cypress tries to pretend the code is not async. You can’t just write JavaScript and have it work the way you expect, you have to write Cypress-flavored JavaScript, which sets up lots of footguns for junior engineers and causes you to have to be extra vigilant on code reviews.
I have worked heavily with Cypress for years, and if I were starting a new project I would 100% choose Playwright.