TrustRadius: an HG Insights company

Playwright

Score7.7 out of 10

15 Reviews and Ratings

What is Playwright?

A cross-browser testing tool, playwright supports all modern rendering engines including Chromium, WebKit, and Firefox. Users can test on Windows, Linux, and macOS, locally or on CI, headless or headed. It is also cross-language, so that the Playwright API can be used in TypeScript, JavaScript, Python, .NET, Java. Test Mobile Web. Native mobile emulation of Google Chrome for Android and Mobile Safari. The same rendering engine works on the Desktop and in the Cloud.

Playright features


Auto-wait - Playwright waits for elements to be actionable prior to performing actions. It also has a rich set of introspection events. The combination of the two eliminates the need for artificial timeouts - the primary cause of flaky tests.
Web-first assertions - Playwright assertions are created specifically for the dynamic web. Checks are automatically retried until the necessary conditions are met.
Tracing - Configure test retry strategy, capture execution trace, videos, screenshots to eliminate flakes.
Multiple everything - Test scenarios that span multiple tabs, multiple origins and multiple users. Create scenarios with different contexts for different users and run them against your server, all in one test.
Trusted events - Hover elements, interact with dynamic controls, produce trusted events. Playwright uses real browser input pipeline indistinguishable from the real user.
Test frames, pierce Shadow DOM - Playwright selectors pierce shadow DOM and allow entering frames.
Browser contexts - Playwright creates a browser context for each test. Browser context is equivalent to a brand new browser profile. This delivers full test isolation with zero overhead. Creating a new browser context only takes a handful of milliseconds.

Browser contexts. Playwright creates a browser context for each test. Browser context is equivalent to a brand new browser profile. This delivers full test isolation with zero overhead. Creating a new browser context only takes a handful of milliseconds.

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.
Codegen - Generate tests by recording actions. Save them into any language.
Playwright inspector - Inspect page, generate selectors, step through the test execution, see click points, explore execution logs.
Trace Viewer - Capture all the information to investigate the test failure. Playwright trace contains test execution screencast, live DOM snapshots, action explorer, and test source.



Playwright

Use Cases and Deployment Scope

We have used it in various use cases for validating our API and UI. Login UI test case. Various features in the API are being tested using Playwright. Also, AI chatbots are tested using Playwright.

Pros

  • API
  • UI
  • Performance

Cons

  • UI
  • API
  • Performance

Return on Investment

  • Usable
  • customisable
  • extendable

Usability

Other Software Used

AI/ML API, Data Center Real-User Monitoring (DCRUM), discontinued, ASAP Rent

Why we chose Playwright for our testing needs

Use Cases and Deployment Scope

We use Playwright to automate our LMS's critical path. It is a complex software with many possible edge cases, it takes 2 testers 3 full days to fully smoke the app (not regression). With Playwright we automated the critical path, we integrated it into our CI/CD, and now it's constantly running and detecting errors and bugs before they even reach to QA.

Pros

  • automation
  • integrations
  • support
  • community
  • features
  • easy to use
  • documentation

Cons

  • bigger adoption
  • mobile testing

Return on Investment

  • Reduce of cost of manual testers
  • Reduce of released bugs
  • Reduce of costs of developer time
  • Increase QA Coverage

Usability

Alternatives Considered

Selenium, Cypress.io and Appium

Other Software Used

Datadog, Postman, WorkRamp