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

21

u/NightSkyNavigator Mar 27 '24

I teach courses in both frameworks. You should go with Playwright. It's an easier learning curve, and will provide value faster for both you and your company. Documentation is fine.

If you were experienced in Selenium, but not Playwright, the answer would be Selenium.

If you were experienced with both tools, a lot of other factors would come into play, and it's more difficult to give a clear answer.

This is assuming that you have experience with JS/TS. If not, Python might be a better option, though if you don't have any programming experience at all, it's going to be an uphill struggle no matter the choice, especially with regards to maintainability, extendability and scalability (if needed).

Why do your company want to do automation? What is the goal?

1

u/[deleted] Mar 27 '24

Do you have any repo where i can take a look on the playwright framework ?

3

u/NightSkyNavigator Mar 27 '24

Just have a look at the official documentation for Playwright, it's easy to follow.

1

u/[deleted] Mar 27 '24

Yup but just wanted to know the design patterns

2

u/Ikeeki Mar 27 '24

The design patterns are in the docs my dude

2

u/[deleted] Mar 27 '24

Okay πŸ‘πŸ»

3

u/Ikeeki Mar 27 '24

Trust me, playwright has really good docs, you really don’t need anything else

1

u/NightSkyNavigator Mar 27 '24

Sorry, I don't work on any open source projects or others I can share.

1

u/[deleted] Mar 27 '24

Thanks πŸ™

1

u/Wide_Researcher_3565 Mar 27 '24

Hi! I dont have experience with JS/TS but know Python a little bit. Do you think it would be ideal then for me to use Selenium with Python? or Playwright with Python? Honestly, my company hired me as the Senior QA and this role only demanded manual testing. However, right now I'm blocked for testing since the website is still being developed so I only test when a new feature is out. I think to use up my time well, they've asked me to start looking into automation.

I have plans of leaving this company in a few months and head towards more data related roles. Do you think I should look out for myself and learn Selenium with Python that would help me at the job+personal growth or think of the company and pick up JS/TS for playwright?

7

u/NightSkyNavigator Mar 27 '24

I'd lean towards TS and Playwright then. It's the strongest combo for Playwright, and Playwright is easier to be productive with, whereas Selenium requires experience to be really productive with it. The company would also appreciate it, seeing as they likely have people who know TS.

It means you have to learn a bit of TS, but there are plenty of tutorials to get you started, including Playwright's documentation. And if you are only planning to stay a few months, no one should be expecting a completed project anyway, or that it will be particularly good quality.

As for experience, Playwright is taking market shares from Selenium right now, so while there are more Selenium projects, more new projects will be Playwright. At least, that's the situation I see in and around my network. This will perhaps change when both use Webdriver BiDi and the speed difference is negligible.

Frankly, it was probably a mistake for them to ask you to do this, because while you are hired as a senior tester, it sounds like you are a junior test automation engineer, and the expectation should be accordingly. Not saying it can't be done, but it's high risk.

2

u/French_Fried_Taterz Mar 28 '24

if it is just you do Playwright with python. there is no reason to learn a different language when python/pytest/playwright can do all the same stuff. you can learn typescript later if you want to apply for other jobs, but python/playwright is a close second to ts/playwright. It is the #2 playwright language and what I use in a similar situation.

1

u/Tiburanetz Mar 29 '24

In case you are going to look for data related job, I'd recommend you to choose playwright with python because python will be more suitable for data related stuff automation.

0

u/PlatformDue2937 Jan 31 '26 edited Jan 31 '26

I should say in this AI era there is going to be a winner and is not selenium or playwright. I have checked a couple of cheap services targeted to e2e where you just add a prompt and the service started entering and trying the buttons and menus in your app, like a 5 yo boy first time trying to buy a figurine from ebay with her dad cc. We are living in the future guys, nobody should use this cave men tools anymore