release notes
release notes
Published 4/27/2023
MinorContains breaking changes
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.
locator.or()hasNot in locator.filter()hasNotText in locator.filter()locatorAssertions.toBeAttached()timeout in route.fetch()reporter.onExit()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.This version was also tested against the following stable channels:
release notes
Published 4/27/2023
MinorContains breaking changes
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.
locator.or()hasNot in locator.filter()hasNotText in locator.filter()locatorAssertions.toBeAttached()timeout in route.fetch()reporter.onExit()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.This version was also tested against the following stable channels:
Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.