#30779 - [REGRESSION]: When using video: 'on' with VSCode extension the browser got closed #30755 - [REGRESSION]: Electron launch with spaces inside executablePath didn't work #30770 - [REGRESSION]: Mask elements outside of viewport when creating fullscreen screenshots didn't work #30858 - [REGRESSION]: ipv6 got shown instead of localhost in show-trace/show-report
Browser Versions
Chromium 125.0.6422.14
Mozilla Firefox 125.0.1
WebKit 17.4
This version was also tested against the following stable channels:
After executing the handler added with page.addLocatorHandler(), Playwright will now wait until the overlay that triggered the handler is not visible anymore. You can opt-out of this behavior with the new noWaitAfter option.
You can use new times option in page.addLocatorHandler() to specify maximum number of times the handler should be run.
constlocator=page.getByText('This interstitial covers the button');awaitpage.addLocatorHandler(locator,asyncoverlay=>{awaitoverlay.locator('#close').click();},{times: 3,noWaitAfter: true});// Run your tests that can be interrupted by the overlay.// ...awaitpage.removeLocatorHandler(locator);
Miscellaneous options
multipart option in apiRequestContext.fetch() now accepts FormData and supports repeating fields with the same name.
constformData=newFormData();formData.append('file',newFile(['let x = 2024;'],'f1.js',{type: 'text/javascript'}));formData.append('file',newFile(['hello'],'f2.txt',{type: 'text/plain'}));context.request.post('https://example.com/uploadFiles',{multipart: formData});
expect(callback).toPass({ intervals }) can now be configured by expect.toPass.inervals option globally in testConfig.expect or per project in testProject.expect.
expect(page).toHaveURL(url) now supports ignoreCaseoption.
New method suite.entries() returns child test suites and test cases in their declaration order. suite.type and testCase.type can be used to tell apart test cases and suites in the list.
Blob reporter now allows overriding report file path with a single option outputFile. The same option can also be specified as PLAYWRIGHT_BLOB_OUTPUT_FILE environment variable that might be more convenient on CI/CD.
JUnit reporter now supports includeProjectInTestName option.
Command line
--last-failed CLI option for running only tests that failed in the previous run.
First run all tests:
$ npx playwright test
Running 103 tests using 5 workers
...
2 failed
[chromium] › my-test.spec.ts:8:5 › two ─────────────────────────────────────────────────────────
[chromium] › my-test.spec.ts:13:5 › three ──────────────────────────────────────────────────────
101 passed (30.0s)
Now fix the failing tests and run Playwright again with --last-failed option:
$ npx playwright test --last-failed
Running 2 tests using 2 workers
2 passed (1.2s)
Browser Versions
Chromium 125.0.6422.14
Mozilla Firefox 125.0.1
WebKit 17.4
This version was also tested against the following stable channels:
#30300 - [REGRESSION]: UI mode restarts if keep storage state #30339 - [REGRESSION]: Brand new install of playwright, unable to run chromium with show browser using vscode
Browser Versions
Chromium 124.0.6367.29
Mozilla Firefox 124.0
WebKit 17.4
This version was also tested against the following stable channels:
// Clear all cookies.awaitcontext.clearCookies();// New: clear cookies with a particular name.awaitcontext.clearCookies({name: 'session-id'});// New: clear cookies for a particular domain.awaitcontext.clearCookies({domain: 'my-origin.com'});
New mode retain-on-first-failure for testOptions.trace. In this mode, trace is recorded for the first run of each test, but not for retires. When test run fails, the trace file is retained, otherwise it is removed.
New method locator.contentFrame() converts a Locator object to a FrameLocator. This can be useful when you have a Locator object obtained somewhere, and later on would like to interact with the content inside the frame.
New method frameLocator.owner() converts a FrameLocator object to a Locator. This can be useful when you have a FrameLocator object obtained somewhere, and later on would like to interact with the iframe element.
#29732 - [Regression]: HEAD requests to webServer.url since v1.42.0 #29746 - [Regression]: Playwright CT CLI scripts fail due to broken initializePlugin import #29739 - [Bug]: Component tests fails when imported a module with a dot in a name #29731 - [Regression]: 1.42.0 breaks some import statements #29760 - [Bug]: Possible regression with chained locators in v1.42
Browser Versions
Chromium 123.0.6312.4
Mozilla Firefox 123.0
WebKit 17.4
This version was also tested against the following stable channels:
This feature is experimental, we are actively looking for the feedback based on your scenarios.
New method page.addLocatorHandler() registers a callback that will be invoked when specified element becomes visible and may block Playwright actions. The callback can get rid of the overlay. Here is an example that closes a cookie dialog when it appears.
// Setup the handler.awaitpage.addLocatorHandler(page.getByRole('heading',{name: 'Hej! You are in control of your cookies.'}),async()=>{awaitpage.getByRole('button',{name: 'Accept all'}).click();});// Write the test as usual.awaitpage.goto('https://www.ikea.com/');awaitpage.getByRole('link',{name: 'Collection of blue and white'}).click();awaitexpect(page.getByRole('heading',{name: 'Light and easy'})).toBeVisible();
Project wildcard filter
Playwright command line flag now supports '*' wildcard when filtering by project.
npx playwright test --project='*mobile*'
Other APIs
expect(callback).toPass({ timeout })
The timeout can now be configured by expect.toPass.timeout option globally or in project config
electronApplication.on('console') electronApplication.on('console') event is emitted when Electron main process calls console API methods.
Mixing the test instances in the same suite is no longer supported. Allowing it was an oversight as it makes reasoning about the semantics unnecessarily hard.
#29067 - [REGRESSION] Codegen/Recorder: not all clicks are being actioned nor recorded #29028 - [REGRESSION] React component tests throw type error when passing null/undefined to component #29027 - [REGRESSION] React component tests not passing Date prop values #29023 - [REGRESSION] React component tests not rendering children prop #29019 - [REGRESSION] trace.playwright.dev does not currently support the loading from URL
Browser Versions
Chromium 121.0.6167.57
Mozilla Firefox 121.0
WebKit 17.4
This version was also tested against the following stable channels:
This PR was automatically created by Snyk using the credentials of a real user.
![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to upgrade @playwright/test from 1.19.0-alpha-1643749494000 to 1.44.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 **1489 versions** ahead of your current version. - The recommended version was released on **2 months ago**. #### Issues fixed by the recommended upgrade: | | Issue | Score | Exploit Maturity | :-------------------------:|:-------------------------|:-------------------------|:------------------------- ![low severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/l.png 'low severity') | Prototype Pollution
[SNYK-JS-MINIMIST-2429795](https://snyk.io/vuln/SNYK-JS-MINIMIST-2429795) | **506** | Proof of Concept ![critical severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/c.png 'critical severity') | Incomplete List of Disallowed Inputs
[SNYK-JS-BABELTRAVERSE-5962462](https://snyk.io/vuln/SNYK-JS-BABELTRAVERSE-5962462) | **506** | Proof of Concept ![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png 'high severity') | Uncontrolled resource consumption
[SNYK-JS-BRACES-6838727](https://snyk.io/vuln/SNYK-JS-BRACES-6838727) | **506** | Proof of Concept ![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png 'high severity') | Server-side Request Forgery (SSRF)
[SNYK-JS-IP-6240864](https://snyk.io/vuln/SNYK-JS-IP-6240864) | **506** | Proof of Concept ![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png 'high severity') | Regular Expression Denial of Service (ReDoS)
[SNYK-JS-SEMVER-3247795](https://snyk.io/vuln/SNYK-JS-SEMVER-3247795) | **506** | Proof of Concept ![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png 'high severity') | Denial of Service (DoS)
[SNYK-JS-WS-7266574](https://snyk.io/vuln/SNYK-JS-WS-7266574) | **506** | Proof of Concept ![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png 'high severity') | Denial of Service (DoS)
[SNYK-JS-JPEGJS-2859218](https://snyk.io/vuln/SNYK-JS-JPEGJS-2859218) | **506** | Proof of Concept ![high severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/h.png 'high severity') | Inefficient Regular Expression Complexity
[SNYK-JS-MICROMATCH-6838728](https://snyk.io/vuln/SNYK-JS-MICROMATCH-6838728) | **506** | No Known Exploit ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png 'medium severity') | Missing Release of Resource after Effective Lifetime
[SNYK-JS-INFLIGHT-6095116](https://snyk.io/vuln/SNYK-JS-INFLIGHT-6095116) | **506** | Proof of Concept ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png 'medium severity') | Server-Side Request Forgery (SSRF)
[SNYK-JS-IP-7148531](https://snyk.io/vuln/SNYK-JS-IP-7148531) | **506** | Proof of Concept ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png 'medium severity') | Prototype Pollution
[SNYK-JS-JSON5-3182856](https://snyk.io/vuln/SNYK-JS-JSON5-3182856) | **506** | Proof of Concept ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png 'medium severity') | Prototype Pollution
[SNYK-JS-JSON5-3182856](https://snyk.io/vuln/SNYK-JS-JSON5-3182856) | **506** | Proof of Concept ![medium severity](https://res.cloudinary.com/snyk/image/upload/w_20,h_20/v1561977819/icon/m.png 'medium severity') | Regular Expression Denial of Service (ReDoS)
[SNYK-JS-MINIMATCH-3050818](https://snyk.io/vuln/SNYK-JS-MINIMATCH-3050818) | **506** | No Known Exploit
Release notes
Package name: @playwright/test
Highlights
#30779 - [REGRESSION]: When using
video: 'on'
with VSCode extension the browser got closed#30755 - [REGRESSION]: Electron launch with spaces inside executablePath didn't work
#30770 - [REGRESSION]: Mask elements outside of viewport when creating fullscreen screenshots didn't work
#30858 - [REGRESSION]: ipv6 got shown instead of localhost in show-trace/show-report
Browser Versions
This version was also tested against the following stable channels:
New APIs
Accessibility assertions
expect(locator).toHaveAccessibleName() checks if the element has the specified accessible name:
expect(locator).toHaveAccessibleDescription() checks if the element has the specified accessible description:
expect(locator).toHaveRole() checks if the element has the specified ARIA role:
Locator handler
noWaitAfter
option.times
option in page.addLocatorHandler() to specify maximum number of times the handler should be run.Miscellaneous options
multipart
option inapiRequestContext.fetch()
now acceptsFormData
and supports repeating fields with the same name.expect(callback).toPass({ intervals })
can now be configured byexpect.toPass.inervals
option globally in testConfig.expect or per project in testProject.expect.expect(page).toHaveURL(url)
now supportsignoreCase
option.testProject.ignoreSnapshots allows to configure per project whether to skip screenshot expectations.
Reporter API
outputFile
. The same option can also be specified asPLAYWRIGHT_BLOB_OUTPUT_FILE
environment variable that might be more convenient on CI/CD.includeProjectInTestName
option.Command line
--last-failed
CLI option for running only tests that failed in the previous run.First run all tests:
$ npx playwright test Running 103 tests using 5 workers ... 2 failed [chromium] › my-test.spec.ts:8:5 › two ───────────────────────────────────────────────────────── [chromium] › my-test.spec.ts:13:5 › three ────────────────────────────────────────────────────── 101 passed (30.0s)
Now fix the failing tests and run Playwright again with
--last-failed
option:$ npx playwright test --last-failed Running 2 tests using 2 workers 2 passed (1.2s)
Browser Versions
This version was also tested against the following stable channels:
Highlights
#30300 - [REGRESSION]: UI mode restarts if keep storage state
#30339 - [REGRESSION]: Brand new install of playwright, unable to run chromium with show browser using vscode
Browser Versions
This version was also tested against the following stable channels:
New APIs
Method browserContext.clearCookies() now supports filters to remove only some cookies.
New mode
retain-on-first-failure
for testOptions.trace. In this mode, trace is recorded for the first run of each test, but not for retires. When test run fails, the trace file is retained, otherwise it is removed.New property testInfo.tags exposes test tags during test execution.
New method locator.contentFrame() converts a
Locator
object to aFrameLocator
. This can be useful when you have aLocator
object obtained somewhere, and later on would like to interact with the content inside the frame.New method frameLocator.owner() converts a
FrameLocator
object to aLocator
. This can be useful when you have aFrameLocator
object obtained somewhere, and later on would like to interact with theiframe
element.UI Mode Updates
@ fast
or clicking on the tag itself.Browser Versions
This version was also tested against the following stable channels:
Highlights
#29732 - [Regression]: HEAD requests to webServer.url since v1.42.0
#29746 - [Regression]: Playwright CT CLI scripts fail due to broken initializePlugin import
#29739 - [Bug]: Component tests fails when imported a module with a dot in a name
#29731 - [Regression]: 1.42.0 breaks some import statements
#29760 - [Bug]: Possible regression with chained locators in v1.42
Browser Versions
This version was also tested against the following stable channels:
New APIs
Test tags
New tag syntax for adding tags to the tests (@-tokens in the test title are still supported).
Use
--grep
command line option to run only tests with certain tags.npx playwright test --grep @ fast
Annotating skipped tests
New annotation syntax for test annotations allows annotating the tests that do not run.
page.addLocatorHandler()
Warning
This feature is experimental, we are actively looking for the feedback based on your scenarios.
New method page.addLocatorHandler() registers a callback that will be invoked when specified element becomes visible and may block Playwright actions. The callback can get rid of the overlay. Here is an example that closes a cookie dialog when it appears.
Project wildcard filter
Playwright command line flag now supports '*' wildcard when filtering by project.
Other APIs
expect(callback).toPass({ timeout })
The timeout can now be configured by
expect.toPass.timeout
option globally or in project configelectronApplication.on('console')
electronApplication.on('console') event is emitted when Electron main process calls console API methods.
page.pdf() accepts two new options
tagged
andoutline
.Breaking changes
Mixing the test instances in the same suite is no longer supported. Allowing it was an oversight as it makes reasoning about the semantics unnecessarily hard.
Announcements
Browser Versions
This version was also tested against the following stable channels:
#29123 - [REGRESSION] route.continue: Protocol error (Fetch.continueRequest): Invalid InterceptionId.
Browser Versions
This version was also tested against the following stable channels:
#29067 - [REGRESSION] Codegen/Recorder: not all clicks are being actioned nor recorded
#29028 - [REGRESSION] React component tests throw type error when passing null/undefined to component
#29027 - [REGRESSION] React component tests not passing Date prop values
#29023 - [REGRESSION] React component tests not rendering children prop
#29019 - [REGRESSION] trace.playwright.dev does not currently support the loading from URL
Browser Versions
This version was also tested against the following stable channels:
...