If you’re a web developer who finds it difficult testing your code across multiple web browsers, then worry no more because Microsoft has released a new tool called Playwright to solve that very problem. Tests will be done in Python, and right now, the tool only supports Chrome, Microsoft Edge, Apple Safari, and Mozilla Firefox.
Playwright for Python announced
The main idea behind this tool is to allow developers to control web browsers with just a short line of Python code. Doing this will automate cross-browser testing for web apps and Progressive web apps that work on a single page.
At the moment, Playwright is available in Preview, but that doesn’t mean it is not feature-rich. From the get-go, web developers can test their apps on multiple operating systems such as Windows, Linux, and macOS. Furthermore, if developers want to emulate smartphones with different screen sizes, then this can be done, no problem.
“With the Playwright API, you can author end-to-end tests that run on all modern web browsers. Playwright delivers automation that is faster, more reliable, and more capable than existing testing tools,” according to Arjun Attam, a program manager for Playwright.
“Automated end-to-end tests have become more important than ever before. Teams are shipping faster and building apps that run on a growing set of devices. This increase in velocity and web targets puts immense pressure on the testing process, and automation is critical.”
It should be noted that at the moment, Playwright only supports emulating mobile browsers via a desktop browser. However, users have opened an issue on GitHub where they are requesting Microsoft to make changes so they can test their code on real mobile browsers.
As time goes by, things will get better where Playwright is concerned as the software giant adds more features and remove whatever bugs that may be lingering around.