r/softwaretesting • • Mar 27 '24

Selenium VS Playwright

Hi, I'm a manual tester looking to start the automation testing effort for my company's website from scratch. From doing my research on this sub, I noticed that Playwright with JS/TS is the most recommended combo to learn and get started with. However, one of the devs in my team recommended that I start with Selenium because it's more common and has more documentation and community support. I'm confused now. I'm not particularly keen on learning Java for Selenium and Python with Selenium also doesnt sound appealing because the frontend is coded in JS/TS so I figured Playwright would be perfect.

Can someone tell me about their experience working with Playwright-JS/TS. How is the documentation and community support if i were to run into issues? Also, I might be leaving the company in a couple of months so I want to hand over the automation in a way that it can be picked up easily by the new guy.

56 Upvotes

78 comments sorted by

View all comments

6

u/2ERIX Mar 27 '24

People that aren’t on top of industry trends are the ones still recommending Selenium at all. If they actually knew anything they would be saying “for your needs, Cypress” or “Playwright” or “WDIO”.

Because dependant upon your need the tool you use needs to suit the purpose of test AND be supportable by your team if you leave. So language and tool need to suit.

For you, with the minimal amount we know, Playwright would be the best choice.

5

u/TheSeekerOfSanity Mar 27 '24

Most times when hiring they are looking for someone to contribute to an existing automation effort. Most of what I see is Selenium as required skills. This will give you more opportunities because it is so well entrenched in the industry and has been for a while. You will currently find many more Selenium positions available than Playwright.

So, if you are starting a brand new automation effort Playwright may be the way to go. But if you are looking to join an established team and contribute to their current framework then Selenium would be your best choice. There are more opportunities currently available for Selenium.

Some may hate this idea - but if your an absolute beginner it may make sense to download a trial license for a COTS tool just to get familiar with automation in general (how it works, locating and manipulating objects, etc.) You can look at the code that’s generated for these actions and learn a lot of the basics first, and then move on to a more flexible (also more complex/powerful) open-source framework.

So understand basic concepts and then decide if you want to learn what is currently most popular (Selenium) or what’s becoming more popular (Playwright).

2

u/ZealousidealSlice222 Aug 02 '24

Respectfully disagree. I run a Quality Engineering organization for a large media company and I can tell you Selenium WD is still used widely for E2E browser automation in conjunction with a well written test framework. Cypress, which was supposed to be a "Selenium killer" ended up being nothing more than a decent unit/integration testing solution that only compliments Selenium, does not replace it. Playwright, the new "flavor of the day" will likely follow the same hyped path and then get replaced by something else again. Selenium still has broad browser support and a huge community base

1

u/2ERIX Aug 02 '24

With the large shift left of testing across the industry ensuring the quality with Playwright will be better choice than selenium as we move forward.

I may be wrong and Microsoft suddenly decide that Playwright is not to grow any further but I think it very unlikely.

At the moment in the organisation I deliver automation for we use WDIO for the complete SDLC, so Selenium/WebDriver has not been replaced yet, but it’s on its way.

And not preparing for the future is a mistake at an organisational level especially when Selenium has not improved in areas that Playwright is excelling which are outside the ui and into the areas that developers and testers need to be in tune with.

Selenium isn’t going anywhere, but it’s not moving forward either. Playwright is.

2

u/ManikMiner Mar 27 '24

"If they knew anything" 🤣 get off that horse pal