Playwright, A Great Test Framework

Flo
Geek Culture
Published in
4 min readNov 27, 2022

--

For end-to-end testing

image by Wikimedia Commons

Introduction

Presentation

Microsoft’s Playwright is a web testing framework. Developed by the same team that created Puppeteer. Playwright is open-source and based on NodeJS.

Puppeteer only supports Chrome and Chromium browsers, while Playwright supports Chrome, Firefox, and WebKit. It provides a broader range of cross-browser testing. Compatible with Windows, Linux, and macOS, Playwright integrates with test frameworks like Jasmine, Jest, and Mocha, as well as leading CI/CD servers like Jenkins, Azure Pipeline, and TravisCI. Besides JavaScript.

Playwright supports multiple programming languages, such as Java, JavaScript, Python, and C#.

Advantages

Playwright brings a lot of features:

  • Auto-waiting feature: Playwright performs all validations associated with the element. Then actions execute only if the validation succeeds. It ensures more accurate tests. More information is on this link.
  • Parallel testing: Via browser context. Technically, you use a browser instance to create multiple isolated browser contexts. Each of these browser contexts can host several web pages, ensuring optimal use of resources.

--

--

Flo
Geek Culture

Talk about Data Science, Machine Learning and Engineering @MIT @OpenClassrooms