release notes
release notes
Published 2/11/2022
MinorContains breaking changes
Playwright Test v1.19 now supports soft assertions. Failed soft assertions do not terminate test execution, but mark the test as failed. Read more in our documentation.
// Make a few checks that will not stop the test when failed...
await expect.soft(page.locator('#status')).toHaveText('Success');
await expect.soft(page.locator('#eta')).toHaveText('1 day');
// ... and continue the test to check more things.
await page.locator('#next-page').click();
await expect.soft(page.locator('#title')).toHaveText('Make another order');
You can now specify a custom error message as a second argument to the expect and expect.soft functions, for example:
await expect(page.locator('text=Name'), 'should be logged in').toBeVisible();
The error would look like this:
Error: should be logged in
Call log:
- expect.toBeVisible with timeout 5000ms
- waiting for selector "text=Name"
2 |
3 | test('example test', async({ page }) => {
> 4 | await expect(page.locator('text=Name'), 'should be logged in').toBeVisible();
| ^
5 | });
6 |
By default, tests in a single file are run in order. If you have many independent tests in a single file, you can now
run them in parallel with method: test.describe.configure:
import { test } from '@playwright/test';
test.describe.configure({ mode: 'parallel' });
test('parallel 1', async () => {});
test('parallel 2', async () => {});
It is unlikely that this change will affect you, no action is required if your tests keep running as they did.
We've noticed that in rare cases, the set of tests to be executed was configured in the global setup by means of the environment variables. We also noticed some applications that were post processing the reporters' output in the global teardown. If you are doing one of the two, learn more
has option that makes sure it contains another locator inside:await page.locator('article', {
has: page.locator('.highlight'),
}).locator('button').click();
The snippet above will select article that has highlight in it and will press the button in it. Read more in locator documentation
method: Locator.pagemethod: Page.screenshot and method: Locator.screenshot now automatically hides blinking careturl in testConfig.webServer to ensure your web server is ready before running the testsproperty: TestInfo.errors and property: TestResult.errors that contain all failed assertions and soft assertions.This version was also tested against the following stable channels:
release notes
Published 2/11/2022
MinorContains breaking changes
Playwright Test v1.19 now supports soft assertions. Failed soft assertions do not terminate test execution, but mark the test as failed. Read more in our documentation.
// Make a few checks that will not stop the test when failed...
await expect.soft(page.locator('#status')).toHaveText('Success');
await expect.soft(page.locator('#eta')).toHaveText('1 day');
// ... and continue the test to check more things.
await page.locator('#next-page').click();
await expect.soft(page.locator('#title')).toHaveText('Make another order');
You can now specify a custom error message as a second argument to the expect and expect.soft functions, for example:
await expect(page.locator('text=Name'), 'should be logged in').toBeVisible();
The error would look like this:
Error: should be logged in
Call log:
- expect.toBeVisible with timeout 5000ms
- waiting for selector "text=Name"
2 |
3 | test('example test', async({ page }) => {
> 4 | await expect(page.locator('text=Name'), 'should be logged in').toBeVisible();
| ^
5 | });
6 |
By default, tests in a single file are run in order. If you have many independent tests in a single file, you can now
run them in parallel with method: test.describe.configure:
import { test } from '@playwright/test';
test.describe.configure({ mode: 'parallel' });
test('parallel 1', async () => {});
test('parallel 2', async () => {});
It is unlikely that this change will affect you, no action is required if your tests keep running as they did.
We've noticed that in rare cases, the set of tests to be executed was configured in the global setup by means of the environment variables. We also noticed some applications that were post processing the reporters' output in the global teardown. If you are doing one of the two, learn more
has option that makes sure it contains another locator inside:await page.locator('article', {
has: page.locator('.highlight'),
}).locator('button').click();
The snippet above will select article that has highlight in it and will press the button in it. Read more in locator documentation
method: Locator.pagemethod: Page.screenshot and method: Locator.screenshot now automatically hides blinking careturl in testConfig.webServer to ensure your web server is ready before running the testsproperty: TestInfo.errors and property: TestResult.errors that contain all failed assertions and soft assertions.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.