Skip to content

Releases: microsoft/playwright

v1.34.3

25 May 00:08
f11873a
Compare
Choose a tag to compare

Highlights

#23228 - [BUG] Getting "Please install @playwright/test package..." after upgrading from 1.34.0 to 1.34.1

Browser Versions

  • Chromium 114.0.5735.26
  • Mozilla Firefox 113.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 113
  • Microsoft Edge 113

v1.34.2

23 May 22:50
2f3d88f
Compare
Choose a tag to compare

Highlights

#23225 - [BUG] VSCode Extension broken with Playwright 1.34.1

Browser Versions

  • Chromium 114.0.5735.26
  • Mozilla Firefox 113.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 113
  • Microsoft Edge 113

v1.34.1

23 May 03:23
fe024dd
Compare
Choose a tag to compare

Highlights

#23186 - [BUG] Container image for v1.34.0 missing library for webkit
#23206 - [BUG] Unable to install supported browsers for v1.34.0 from playwright-core
#23207 - [BUG] importing ES Module JSX component is broken since 1.34

Browser Versions

  • Chromium 114.0.5735.26
  • Mozilla Firefox 113.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 113
  • Microsoft Edge 113

v1.34.0

20 May 02:25
4aee014
Compare
Choose a tag to compare

Playwright v1.33 & v1.34 updates

Highlights

  • UI Mode now shows steps, fixtures and attachments:

  • New property testProject.teardown to specify a project that needs to run after this
    and all dependent projects have finished. Teardown is useful to cleanup any resources acquired by this project.

    A common pattern would be a setup dependency with a corresponding teardown:

    // playwright.config.ts
    import { defineConfig } from '@playwright/test';
    
    export default defineConfig({
      projects: [
        {
          name: 'setup',
          testMatch: /global.setup\.ts/,
          teardown: 'teardown',
        },
        {
          name: 'teardown',
          testMatch: /global.teardown\.ts/,
        },
        {
          name: 'chromium',
          use: devices['Desktop Chrome'],
          dependencies: ['setup'],
        },
        {
          name: 'firefox',
          use: devices['Desktop Firefox'],
          dependencies: ['setup'],
        },
        {
          name: 'webkit',
          use: devices['Desktop Safari'],
          dependencies: ['setup'],
        },
      ],
    });
  • New method expect.configure to create pre-configured expect instance with its own defaults such as timeout and soft.

    const slowExpect = expect.configure({ timeout: 10000 });
    await slowExpect(locator).toHaveText('Submit');
    
    // Always do soft assertions.
    const softExpect = expect.configure({ soft: true });
  • New options stderr and stdout in testConfig.webServer to configure output handling:

    // playwright.config.ts
    import { defineConfig } from '@playwright/test';
    
    export default defineConfig({
      // Run your local dev server before starting the tests
      webServer: {
        command: 'npm run start',
        url: 'http://127.0.0.1:3000',
        reuseExistingServer: !process.env.CI,
        stdout: 'pipe',
        stderr: 'pipe',
      },
    });
  • New locator.and() to create a locator that matches both locators.

    const button = page.getByRole('button').and(page.getByTitle('Subscribe'));
  • New events browserContext.on('console') and browserContext.on('dialog') to subscribe to any dialogs
    and console messages from any page from the given browser context. Use the new methods consoleMessage.page()
    and dialog.page() to pin-point event source.

⚠️ Breaking changes

  • npx playwright test no longer works if you install both playwright and @playwright/test. There's no need
    to install both, since you can always import browser automation APIs from @playwright/test directly:

    // automation.ts
    import { chromium, firefox, webkit } from '@playwright/test';
    /* ... */
  • Node.js 14 is no longer supported since it reached its end-of-life on April 30, 2023.

Browser Versions

  • Chromium 114.0.5735.26
  • Mozilla Firefox 113.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 113
  • Microsoft Edge 113

v1.33.0

27 Apr 01:36
Compare
Choose a tag to compare

Playwright v1.33 & v1.34 updates

Locators Update

  • Use locator.or() to create a locator that matches either of the two locators.
    Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead.
    In this case, you can wait for either a "New email" button, or a dialog and act accordingly:

    const newEmail = page.getByRole('button', { name: 'New' });
    const dialog = page.getByText('Confirm security settings');
    await expect(newEmail.or(dialog)).toBeVisible();
    if (await dialog.isVisible())
      await page.getByRole('button', { name: 'Dismiss' }).click();
    await newEmail.click();
  • Use new options hasNot and hasNotText in locator.filter()
    to find elements that do not match certain conditions.

    const rowLocator = page.locator('tr');
    await rowLocator
        .filter({ hasNotText: 'text in column 1' })
        .filter({ hasNot: page.getByRole('button', { name: 'column 2 button' }) })
        .screenshot();
  • Use new web-first assertion locatorAssertions.toBeAttached() to ensure that the element
    is present in the page's DOM. Do not confuse with the locatorAssertions.toBeVisible() that ensures that
    element is both attached & visible.

New APIs

⚠️ Breaking change

  • The mcr.microsoft.com/playwright:v1.33.0 now serves a Playwright image based on Ubuntu Jammy.
    To use the focal-based image, please use mcr.microsoft.com/playwright:v1.33.0-focal instead.

Browser Versions

  • Chromium 113.0.5672.53
  • Mozilla Firefox 112.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 112
  • Microsoft Edge 112

v1.32.3

11 Apr 03:37
Compare
Choose a tag to compare

Highlights

#22144 - [BUG] WebServer only starting after timeout
#22191 - chore: allow reusing browser between the tests
#22215 - [BUG] Tests failing in toPass often marked as passed

Browser Versions

  • Chromium 112.0.5615.29
  • Mozilla Firefox 111.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 111
  • Microsoft Edge 111

v1.32.2

03 Apr 22:13
ed7a560
Compare
Choose a tag to compare

Highlights

#21993 - [BUG] Browser crash when using Playwright VSC extension and trace-viewer enabled in config
#22003 - [Feature] Make Vue component mount props less restrictive
#22089 - [REGRESSION]: Tests failing with "Error: tracing.stopChunk"

Browser Versions

  • Chromium 112.0.5615.29
  • Mozilla Firefox 111.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 111
  • Microsoft Edge 111

v1.32.1

25 Mar 05:40
Compare
Choose a tag to compare

Highlights

#21832 - [BUG] Trace is not opening on specific broken locator
#21897 - [BUG] --ui fails to open with error reading mainFrame from an undefined this._page
#21918 - [BUG]: UI mode, skipped tests not being found
#21941 - [BUG] UI mode does not show webServer startup errors
#21953 - [BUG] Parameterized tests are not displayed in the UI mode

Browser Versions

  • Chromium 112.0.5615.29
  • Mozilla Firefox 111.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 111
  • Microsoft Edge 111

v1.32.0

22 Mar 21:59
Compare
Choose a tag to compare

📣 Introducing UI Mode (preview)

Playwright v1.32 updates

New UI Mode lets you explore, run and debug tests. Comes with a built-in watch mode.

Playwright UI Mode

Engage with a new flag --ui:

npx playwright test --ui

New APIs

⚠️ Breaking change in component tests

Note: component tests only, does not affect end-to-end tests.

  • @playwright/experimental-ct-react now supports React 18 only.
  • If you're running component tests with React 16 or 17, please replace
    @playwright/experimental-ct-react with @playwright/experimental-ct-react17.

Browser Versions

  • Chromium 112.0.5615.29
  • Mozilla Firefox 111.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 111
  • Microsoft Edge 111

v1.31.2

02 Mar 20:01
Compare
Choose a tag to compare

Highlights

#20784 - [BUG] ECONNREFUSED on GitHub Actions with Node 18
#21145 - [REGRESSION]: firefox-1378 times out on await page.reload() when URL contains a #hash
#21226 - [BUG] Playwright seems to get stuck when using shard option and last test is skipped
#21227 - Using the webServer config with a Vite dev server?
#21312 - throw if defineConfig is not used for component testing

Browser Versions

  • Chromium 111.0.5563.19
  • Mozilla Firefox 109.0
  • WebKit 16.4

This version was also tested against the following stable channels:

  • Google Chrome 110
  • Microsoft Edge 110