Playwright test automation template

Third Driver
2 min readJun 24, 2021
Photo by Daniel Cheung on Unsplash

Wikipedia: A playwright or dramatist is a person who writes plays.

I played with Playwright test automation tool last weekend. I’m really impressed about Playwright and it could be very competitive against Selenium. Cypress is also great but it only support JavaScript. As of now Playwright supports Java and handful of other language bindings which is great for testers with past Selenium-Java experience. It might actually attract developers/ testers who’ve been using Selenium with Java for years.

Playwright is from a team at Microsoft and they used to be a team at Google, called Puppeteer. Puppeteer became Playwright when they arrived at Microsoft therefore whenever you search StackOverflow, if you’re not getting enough answers, try the query with puppeteer keyword instead of playwright.

With Microsoft pushing its own now-Chromium based Microsoft Edge web browser, I believe there’s a promising future for Playwright. Selenium 4.0 is currently on beta too, although the updates were much slower and Selenium now is not reliable always. Cypress is gaining lots of attention at the moment too. We’ll see a very interesting competition among these as Selenium, Cypress and Playwright are currently in podium positions.

Here’s the Github template repository I’ve created for those who’re interested to kick start. This follows page object design pattern and written on Java. Automation framework is based on TestNG and Maven.

🎭 https://github.com/madhawar/playwright-java-template

--

--