Playwright - v1.40.0


Test Generator Update

Playwright Test Generator

New tools to generate assertions:
- "Assert visibility" tool generates expect(locator).toBeVisible().
- "Assert value" tool generates expect(locator).toHaveValue(value).
- "Assert text" tool generates expect(locator).toContainText(text).

Here is an example of a generated test with assertions:

import { test, expect } from '@playwright/test';

test('test', async ({ page }) => {
  await page.goto('https://playwright.dev/');
  await page.getByRole('link', { name: 'Get started' }).click();
  await expect(page.getByLabel('Breadcrumbs').getByRole('list')).toContainText('Installation');
  await expect(page.getByLabel('Search')).toBeVisible();
  await page.getByLabel('Search').click();
  await page.getByPlaceholder('Search docs').fill('locator');
  await expect(page.getByPlaceholder('Search docs')).toHaveValue('locator');
});

New APIs

Other Changes

Browser Versions

  • Chromium 120.0.6099.28
  • Mozilla Firefox 119.0
  • WebKit 17.4

This version was also tested against the following stable channels:
* Google Chrome 119
* Microsoft Edge 119


Details

date
Nov. 16, 2023, 10:53 p.m.
name
v1.40.0
type
Minor
👇
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
or