Playwright - v1.31.0

New APIs

Using dependencies allows global setup to produce traces and other artifacts,
see the setup steps in the test report and more.

// playwright.config.ts
import { defineConfig } from '@playwright/test';

export default defineConfig({
projects: [
name: 'setup',
testMatch: /global.setup.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'],

const button = page.getByRole('button');

// Make sure at least some part of element intersects viewport.
await expect(button).toBeInViewport();

// Make sure element is fully outside of viewport.
await expect(button).not.toBeInViewport();

// Make sure that at least half of the element intersects viewport.
await expect(button).toBeInViewport({ ratio: 0.5 });


  • DOM snapshots in trace viewer can be now opened in a separate window.
  • New method defineConfig to be used in playwright.config.
  • New option maxRedirects for method Route.fetch.
  • Playwright now supports Debian 11 arm64.
  • Official docker images now include Node 18 instead of Node 16.

⚠️ Breaking change in component tests

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

playwright-ct.config configuration file for component testing now requires calling defineConfig.

// Before

import { type PlaywrightTestConfig, devices } from '@playwright/experimental-ct-react';
const config: PlaywrightTestConfig = {
  // ... config goes here ...
export default config;

Replace config variable definition with defineConfig call:

// After

import { defineConfig, devices } from '@playwright/experimental-ct-react';
export default defineConfig({
  // ... config goes here ...

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


Feb. 21, 2023, 7:13 p.m.
Register or login to:
  • 🔍View and search all Playwright releases.
  • 🛠️Create and share lists to track your tools.
  • 🚨Setup notifications for major, security, feature or patch updates.
  • 🚀Much more coming soon!
Continue with GitHub
Continue with Google