The Agile Way

The Agile Way

Share this post

The Agile Way
The Agile Way
Correcting Wrong ‘Playwright’s Advantage over Selenium” Part 7: “Playwright supports a range of Testing Types, e.g. API Testing”

Correcting Wrong ‘Playwright’s Advantage over Selenium” Part 7: “Playwright supports a range of Testing Types, e.g. API Testing”

Don’t Compare Apples to Oranges. Focus on real E2E UI Testing, which Playwright is still far behind raw Selenium.

Zhimin Zhan's avatar
Zhimin Zhan
Oct 25, 2024
∙ Paid
2

Share this post

The Agile Way
The Agile Way
Correcting Wrong ‘Playwright’s Advantage over Selenium” Part 7: “Playwright supports a range of Testing Types, e.g. API Testing”
Share

Continue to correct the 7th wrong claim in this YouTube video, “Playwright vs Selenium: What Advantages Make Playwright the Winner in Automation Testing Battle 🏆”.

This article series:

  • “Playwright is Modern and Faster than Selenium” 😒

  • “Playwright has Parallel Execution Support” 👎🏽

  • “Playwright has Native Auto-Waiting Mechanism” 👎🏽

  • “Playwright has a native test runner” 👎🏽

  • “Playwright has native HTML Reporters” 👎🏽

  • “Playwright Features Can be Configured in one Configuration” 👎🏽

  • “Playwright supports a range of Testing Types, e.g. API Testing, Component Testing, …” 👎🏽

  • “Playwright UI Mode, CodeGen, Debugging support.” 👎🏽

  • “Playwright ARIA locator support” 👎🏽

  • “Playwright has frequent releases” 👎🏽

  • Wrap Up

Table of Contents:
· Claim 7: “Playwright Supports API Testing Besides UI E2E Testing”
· Selenium WebDriver does Web Test Automation Best!
· Fake/Incompetent “Test Automation Engineers” Attack Selenium WebDriver
· Consider the following four facts for those who disagree
∘ 1. Web Test Automation is the same for ALL websites and has remained barely unchanged for two decades.
∘ 2. Selenium WebDriver is a web test automation framework (some call it a library); don’t compare it against a tool.
∘ 3. Testing infers ‘checking’ and ‘objective’; Automation infers ‘fast’ and ‘repeatable’.
∘ 4. Testing is for verifying the work done by developers. E2E Testing is black-box testing.
· Wrap Up

Claim 7: “Playwright Supports API Testing Besides UI E2E Testing”

This claim (as in a comparison document) means “Selenium does not provide API testing, but Playwright does, i.e. Playwright wins”. This is ridiculous logic. We can’t blame a Tesla for not flying, right? Selenium is never designed for API Testing. Selenium WebDriver is a web automation framework, why talk outside the bounds?

I am also an expert in API Testing (see my book, and articles, My Universal, High-Efficient and Free Approach to API Testing and A Story of 100X API Testing I Implemented in a Matter of Days). I have never had a problem integrating API Testing, using HTTPClient libraries with Selenium scripts. So, this argument makes no sense at all. By the way, Cypress's marketing team has tried that trick, too. (and now, Cypress.io, the company behind Cypress, is dying; Recently, The “#1 Cypress Ambassador” Is Now Open to Finding Playwright Jobs)

https://www.azquotes.com/quotes/topics/one-size-fits-all.html

Similarly, anyone with a basic understanding of engineering concepts should NOT evaluate Selenium WebDriver based on its capabilities for so-called ‘component testing’, ‘visual testing’, or ‘accessibility testing’. The key point is first to assess E2E testing when considering an E2E automation framework. Using failing Cypress as an example, despite its promotion of various non-E2E testing capabilities, every attempt at Cypress test automation I’ve observed has failed badly.

The so-called Cypress Component Testing is nonsense as it crosses the border to white-box testing!

An important note, you may use Selenium together with other API testing libraries (e.g. RestClient) in one test project, even within one test script file. Therefore, there is no limitation here.

Selenium WebDriver does Web Test Automation Best!

Selenium WebDriver does what it is designed to do best: automated end-to-end functional (via UI) testing for web apps. For me, that’s what I care about. So did Facebook.

Testing Pyramid at Facebook, from a Great CI/DevOps Presentation: “Continuous Integration at Facebook”

“Facebook is released twice a day, and keeping up this pace is at the heart of our culture. With this release pace, automated testing with Selenium is crucial to making sure everything works before being released.” — DAMIEN SERENI, Engineering Director at Facebook, at Selenium 2013 conference.

Want to see a successful solid web test automation case using raw Selenium WebDriver? Check out this showcase.

Showcase a 500+ End-to-End (via UI) Test Suite: E2E Test Automation is Surely Feasible

Keep reading with a 7-day free trial

Subscribe to The Agile Way to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Zhimin Zhan
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share