Highlights
-
New method expect(locator).toContainClass() to ergonomically assert individual class names on the element.
await expect(page.getByRole('listitem', { name: 'Ship v1.52' })).toContainClass('done');
-
Aria Snapshots got two new properties:
/childrenfor strict matching and/urlfor links.await expect(locator).toMatchAriaSnapshot(` - list - /children: equal - listitem: Feature A - listitem: - link "Feature B": - /url: "https://playwright.dev" `);
Test Runner
- New property testProject.workers allows to specify the number of concurrent worker processes to use for a test project. The global limit of property testConfig.workers still applies.
- New testConfig.failOnFlakyTests option to fail the test run if any flaky tests are detected, similarly to
--fail-on-flaky-tests. This is useful for CI/CD environments where you want to ensure that all tests are stable before deploying. - New property testResult.annotations contains annotations for each test retry.
Miscellaneous
- New option
maxRedirectsin apiRequest.newContext() to control the maximum number of redirects. - HTML reporter now supports NOT filtering via
!@my-tagor!my-file.spec.tsor!p:my-project.
Breaking Changes
- Changes to glob URL patterns in methods like page.route():
?wildcard is not supported any more, it will always match question mark?character.- Ranges/sets
[]are not supported anymore. We recommend using regular expressions instead.
- Method route.continue() does not allow to override the
Cookieheader anymore. If aCookieheader is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use browserContext.addCookies(). - macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benefiting from the latest WebKit improvements.
Browser Versions
- Chromium 136.0.7103.25
- Mozilla Firefox 137.0
- WebKit 18.4
This version was also tested against the following stable channels:
- Google Chrome 135
- Microsoft Edge 135