Which Test Automation Framework? Playwright vs Cypress vs Selenium

Which Test Automation Framework? Playwright vs Cypress vs Selenium
Which Test Automation Framework? Playwright vs Cypress vs Selenium

Which Test Automation Framework? Playwright vs Cypress vs Selenium

May 23, 2024

Sappo

I see a variant of this question asked weekly in the r/QualityAssurance subreddit and figured it would be helpful if I summarised the pros and cons I've read for each of Selenium, Cypress, and Playwright.

For the sake of this comparison, we will make some general assumptions. We'll consider website/web app testing only. We'll also assume the company has no existing test pack, test automation skills, or knowledge of a specific framework. And we'll also assume you're not interested in a Test Automation IDE or Codeless Test Automation.

The goal of this post is not to tell you what test automation framework is best for your specific requirements but to provide a good, generalized starting point for your own specialized evaluation.

Let's begin...

Selenium

u/TheNudelz wrote "Selenium is the one that will always get you a job."

Users (of r/QualityAssurance) will often mention that Selenium is slower to learn and run and somewhat limited compared to newer frameworks.

Selenium is slowly being replaced in the industry, but it still has massive usage, many champions, and is far from dead. When users ask what they should learn (as opposed to what they should use), Selenium is spoken about more positively. Selenium knowledge is considered a great foundation and is still in demand in the current market.

When people say Selenium (without specifying a different language), they are typically referring to the Java variant. This is mainly due to adoption but also because Selenium Java is faster to run and has much better documentation and support. This makes Selenium unique on this list as the other frameworks share their default language of JavaScript.

Cypress

u/squiddygamer wrote "I am using Cypress fine"

Many consider Cypress the easiest to learn and likely the fastest to create tests in. Several fundamental issues force users to learn specific workarounds or discover essential test requirements that are blocked later in building complex test packs.

Many thought Cypress was a great advancement in Test Automation years ago, and because of this, it saw explosive adoption in the industry. In more recent years, however, Cypress has plateaued and even started to decline.

Playwright

u/Littl_Sun wrote "Playwright without any doubt."

Playwright is spoken about very fondly. Although it might not be considered, at large, quite as fast to learn or write tests in as Cypress, it would be a very close second. Playwright also benefits from being less opinionated, resulting in cleaner, more standard code.

Whereas Selenium and Cypress are waning in popularity, Playwright is rapidly growing in adoption. Unlike the others, I struggled to find any clearly negative user feedback for Playwright.

Whenever the question is framed as "What should I use to test?" Playwright is the community's winner by majority vote. But when a user asks what they should learn before looking for their first automation role, confidence drops. Current adoption is a crucial factor; there are just more roles calling for Selenium and Cypress experience.

Another factor is that because Playwright is cleaner, and requires less framework-specific knowledge, it's easier for people with non-test-specific coding experience to pivot into Test Automation. This results in more viable candidates for each scarce role. This potentially results in Playwright Automation Test positions earning less and being harder to acquire. But, as much as this sounded reasonable enough for inclusion here, this is highly likely to vary with time and across regions. I also just didn't want this to become a "just pick Playwright" post.

Conclusion: just pick Playwright!

With specific use cases set aside where one of the others would excel for a distinct reason, Playwright is the best Test Automation code framework currently available.

Any issues you face with Playwright would likely be universal to all coded test automation frameworks, such as remote runner costs/reliability and a lack of persistent services for things like generating MFA tokens, interacting with and asserting on emails, etc. However, as one of our key assumptions above was that "you're not interested in a Test Automation IDE or Codeless Test Automation," we will rapidly move on.

Already in a team and looking to create a coded test pack?

Playwright is the best option.

Looking to get your first Test Automation role?

This is more tricky, I echo the pragmatic sentiments of much of the r/QualityAssurance community: look at the market around you and learn whatever will be the most lucrative... and Playwright.

———

Everyone should stay current with the available automation test tools and frameworks growing in popularity.

This was a lot of fun to produce; I want to give a huge shout-out to the r/QualityAssurance subreddit and the helpful commenters over there (but just the helpful ones =P).

I see a variant of this question asked weekly in the r/QualityAssurance subreddit and figured it would be helpful if I summarised the pros and cons I've read for each of Selenium, Cypress, and Playwright.

For the sake of this comparison, we will make some general assumptions. We'll consider website/web app testing only. We'll also assume the company has no existing test pack, test automation skills, or knowledge of a specific framework. And we'll also assume you're not interested in a Test Automation IDE or Codeless Test Automation.

The goal of this post is not to tell you what test automation framework is best for your specific requirements but to provide a good, generalized starting point for your own specialized evaluation.

Let's begin...

Selenium

u/TheNudelz wrote "Selenium is the one that will always get you a job."

Users (of r/QualityAssurance) will often mention that Selenium is slower to learn and run and somewhat limited compared to newer frameworks.

Selenium is slowly being replaced in the industry, but it still has massive usage, many champions, and is far from dead. When users ask what they should learn (as opposed to what they should use), Selenium is spoken about more positively. Selenium knowledge is considered a great foundation and is still in demand in the current market.

When people say Selenium (without specifying a different language), they are typically referring to the Java variant. This is mainly due to adoption but also because Selenium Java is faster to run and has much better documentation and support. This makes Selenium unique on this list as the other frameworks share their default language of JavaScript.

Cypress

u/squiddygamer wrote "I am using Cypress fine"

Many consider Cypress the easiest to learn and likely the fastest to create tests in. Several fundamental issues force users to learn specific workarounds or discover essential test requirements that are blocked later in building complex test packs.

Many thought Cypress was a great advancement in Test Automation years ago, and because of this, it saw explosive adoption in the industry. In more recent years, however, Cypress has plateaued and even started to decline.

Playwright

u/Littl_Sun wrote "Playwright without any doubt."

Playwright is spoken about very fondly. Although it might not be considered, at large, quite as fast to learn or write tests in as Cypress, it would be a very close second. Playwright also benefits from being less opinionated, resulting in cleaner, more standard code.

Whereas Selenium and Cypress are waning in popularity, Playwright is rapidly growing in adoption. Unlike the others, I struggled to find any clearly negative user feedback for Playwright.

Whenever the question is framed as "What should I use to test?" Playwright is the community's winner by majority vote. But when a user asks what they should learn before looking for their first automation role, confidence drops. Current adoption is a crucial factor; there are just more roles calling for Selenium and Cypress experience.

Another factor is that because Playwright is cleaner, and requires less framework-specific knowledge, it's easier for people with non-test-specific coding experience to pivot into Test Automation. This results in more viable candidates for each scarce role. This potentially results in Playwright Automation Test positions earning less and being harder to acquire. But, as much as this sounded reasonable enough for inclusion here, this is highly likely to vary with time and across regions. I also just didn't want this to become a "just pick Playwright" post.

Conclusion: just pick Playwright!

With specific use cases set aside where one of the others would excel for a distinct reason, Playwright is the best Test Automation code framework currently available.

Any issues you face with Playwright would likely be universal to all coded test automation frameworks, such as remote runner costs/reliability and a lack of persistent services for things like generating MFA tokens, interacting with and asserting on emails, etc. However, as one of our key assumptions above was that "you're not interested in a Test Automation IDE or Codeless Test Automation," we will rapidly move on.

Already in a team and looking to create a coded test pack?

Playwright is the best option.

Looking to get your first Test Automation role?

This is more tricky, I echo the pragmatic sentiments of much of the r/QualityAssurance community: look at the market around you and learn whatever will be the most lucrative... and Playwright.

———

Everyone should stay current with the available automation test tools and frameworks growing in popularity.

This was a lot of fun to produce; I want to give a huge shout-out to the r/QualityAssurance subreddit and the helpful commenters over there (but just the helpful ones =P).

I see a variant of this question asked weekly in the r/QualityAssurance subreddit and figured it would be helpful if I summarised the pros and cons I've read for each of Selenium, Cypress, and Playwright.

For the sake of this comparison, we will make some general assumptions. We'll consider website/web app testing only. We'll also assume the company has no existing test pack, test automation skills, or knowledge of a specific framework. And we'll also assume you're not interested in a Test Automation IDE or Codeless Test Automation.

The goal of this post is not to tell you what test automation framework is best for your specific requirements but to provide a good, generalized starting point for your own specialized evaluation.

Let's begin...

Selenium

u/TheNudelz wrote "Selenium is the one that will always get you a job."

Users (of r/QualityAssurance) will often mention that Selenium is slower to learn and run and somewhat limited compared to newer frameworks.

Selenium is slowly being replaced in the industry, but it still has massive usage, many champions, and is far from dead. When users ask what they should learn (as opposed to what they should use), Selenium is spoken about more positively. Selenium knowledge is considered a great foundation and is still in demand in the current market.

When people say Selenium (without specifying a different language), they are typically referring to the Java variant. This is mainly due to adoption but also because Selenium Java is faster to run and has much better documentation and support. This makes Selenium unique on this list as the other frameworks share their default language of JavaScript.

Cypress

u/squiddygamer wrote "I am using Cypress fine"

Many consider Cypress the easiest to learn and likely the fastest to create tests in. Several fundamental issues force users to learn specific workarounds or discover essential test requirements that are blocked later in building complex test packs.

Many thought Cypress was a great advancement in Test Automation years ago, and because of this, it saw explosive adoption in the industry. In more recent years, however, Cypress has plateaued and even started to decline.

Playwright

u/Littl_Sun wrote "Playwright without any doubt."

Playwright is spoken about very fondly. Although it might not be considered, at large, quite as fast to learn or write tests in as Cypress, it would be a very close second. Playwright also benefits from being less opinionated, resulting in cleaner, more standard code.

Whereas Selenium and Cypress are waning in popularity, Playwright is rapidly growing in adoption. Unlike the others, I struggled to find any clearly negative user feedback for Playwright.

Whenever the question is framed as "What should I use to test?" Playwright is the community's winner by majority vote. But when a user asks what they should learn before looking for their first automation role, confidence drops. Current adoption is a crucial factor; there are just more roles calling for Selenium and Cypress experience.

Another factor is that because Playwright is cleaner, and requires less framework-specific knowledge, it's easier for people with non-test-specific coding experience to pivot into Test Automation. This results in more viable candidates for each scarce role. This potentially results in Playwright Automation Test positions earning less and being harder to acquire. But, as much as this sounded reasonable enough for inclusion here, this is highly likely to vary with time and across regions. I also just didn't want this to become a "just pick Playwright" post.

Conclusion: just pick Playwright!

With specific use cases set aside where one of the others would excel for a distinct reason, Playwright is the best Test Automation code framework currently available.

Any issues you face with Playwright would likely be universal to all coded test automation frameworks, such as remote runner costs/reliability and a lack of persistent services for things like generating MFA tokens, interacting with and asserting on emails, etc. However, as one of our key assumptions above was that "you're not interested in a Test Automation IDE or Codeless Test Automation," we will rapidly move on.

Already in a team and looking to create a coded test pack?

Playwright is the best option.

Looking to get your first Test Automation role?

This is more tricky, I echo the pragmatic sentiments of much of the r/QualityAssurance community: look at the market around you and learn whatever will be the most lucrative... and Playwright.

———

Everyone should stay current with the available automation test tools and frameworks growing in popularity.

This was a lot of fun to produce; I want to give a huge shout-out to the r/QualityAssurance subreddit and the helpful commenters over there (but just the helpful ones =P).

Now give these buttons a good test 😜

Want Better Automation Tests?

Want Better Automation Tests?

High-quality test coverage with reliable test automation.