Snyk has created this PR to upgrade playwright from 1.22.2 to 1.34.1.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 710 versions ahead of your current version.
The recommended version was released 22 days ago, on 2023-05-23.
#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:
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:
New method expect.configure to create pre-configured expect instance with its own defaults such as timeout and soft.
constslowExpect=expect.configure({timeout: 10000});awaitslowExpect(locator).toHaveText('Submit');// Always do soft assertions.constsoftExpect=expect.configure({soft: true});
New options stderr and stdout in testConfig.webServer to configure output handling:
// playwright.config.tsimport{defineConfig}from'@ playwright/test';exportdefaultdefineConfig({// Run your local dev server before starting the testswebServer: {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.
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:
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:
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:
#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:
#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:
Snyk has created this PR to upgrade playwright from 1.22.2 to 1.34.1.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Release notes
Package name: playwright
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
This version was also tested against the following stable channels:
Highlights
UI Mode now shows steps, fixtures and attachments:
![](https://github.com/microsoft/playwright/assets/746130/1d280419-d79a-4a56-b2dc-54d631281d56)
New property
testProject.teardown
to specify a project that needs to run after thisand 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 correspondingteardown
:New method
expect.configure
to create pre-configured expect instance with its own defaults such astimeout
andsoft
.New options
stderr
andstdout
intestConfig.webServer
to configure output handling:New
locator.and()
to create a locator that matches both locators.New events
browserContext.on('console')
andbrowserContext.on('dialog')
to subscribe to any dialogsand console messages from any page from the given browser context. Use the new methods
consoleMessage.page()
and
dialog.page()
to pin-point event source.npx playwright test
no longer works if you install bothplaywright
and@ playwright/test
. There's no needto install both, since you can always import browser automation APIs from
@ playwright/test
directly:Node.js 14 is no longer supported since it reached its end-of-life on April 30, 2023.
Browser Versions
This version was also tested against the following stable channels:
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:
Use new options
hasNot
andhasNotText
inlocator.filter()
to find elements that do not match certain conditions.
Use new web-first assertion
locatorAssertions.toBeAttached()
to ensure that the elementis present in the page's DOM. Do not confuse with the
locatorAssertions.toBeVisible()
that ensures thatelement is both attached & visible.
New APIs
locator.or()
hasNot
inlocator.filter()
hasNotText
inlocator.filter()
locatorAssertions.toBeAttached()
timeout
inroute.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.Browser Versions
This version was also tested against the following stable channels:
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
This version was also tested against the following stable channels:
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
This version was also tested against the following stable channels: