PlaywrightšŸŽ­ | Karan Kataria

PlaywrightšŸŽ­

What it is?

Playwright is a test automation tool specifically engineered for the modern web and generally runs very quickly, even for complex testing projects.

Playwright enables reliable end-to-end testing for modern web apps.

Why Playwright?

Playwright is a relatively new open source tool for browser automation, with its first version released by Microsoft in 2020. It was built by the team behind Puppeteer, which is a headless testing framework for Chrome/Chromium.

While far newer than Selenium, Playwright is picking up steam quickly and has a growing following. Due in part to its young age, it supports fewer browsers/languages than Selenium, but by the same token it also includes newer features and capabilities that are more aligned with the modern web. It is actively developed by Microsoft.

Below mentioned are some key features which could ask you to drive a bit toward Playwright and explore further

  • Cross-browser. Playwright supports all modern rendering engines including Chromium, WebKit, and Firefox.
  • Cross-platform. Test on Windows, Linux, and macOS, locally or on CI, headless or headed.
  • Test Mobile Web. Native mobile emulation of Google Chrome for Android and Mobile Safari. The same rendering engine works on your Desktop and in the Cloud.
  • Auto-wait. Playwright waits for elements to be actionable prior to performing actions. The combination of the two eliminates the need for artificial timeouts - the primary cause of flaky tests.
  • Test frames, pierce Shadow DOM. Playwright selectors pierce shadow DOM and allow entering frames seamlessly.
  • Log in once. Save the authentication state of the context and reuse it in all the tests. This bypasses repetitive log-in operations in each test, yet delivers full isolation of independent tests.
  • Playwright inspector. Inspect page, generate selectors, step through the test execution, see click points, explore execution logs.
  • Tracing. Configure test retry strategy, capture execution trace, videos, screenshots to eliminate flakes.

Tagged users
editor-img
Avni
@74-faunie
Integrating Software Development and Quality Assurance with Engineering Team @ GlueLabs.
Checkout related posts on: