Skip to content

v1.52.0

Latest
Compare
Choose a tag to compare
@mxschmitt mxschmitt released this 17 Apr 17:08
471930b

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: /children for strict matching and /url for 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 maxRedirects in apiRequest.newContext() to control the maximum number of redirects.
  • New option ref in locator.ariaSnapshot() to generate reference for each element in the snapshot which can later be used to locate the element.
  • HTML reporter now supports NOT filtering via !@my-tag or !my-file.spec.ts or !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 Cookie header anymore. If a Cookie header 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