diff --git a/dotnet/docs/release-notes.mdx b/dotnet/docs/release-notes.mdx index 32af6cba3cc..89c74a62317 100644 --- a/dotnet/docs/release-notes.mdx +++ b/dotnet/docs/release-notes.mdx @@ -7,6 +7,48 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import HTMLCard from '@site/src/components/HTMLCard'; +## Version 1.52 + +### Highlights +- New method [Expect(Locator).ToContainClassAsync()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-class) to ergonomically assert individual class names on the element. + + ```csharp + await Expect(Page.GetByRole(AriaRole.Listitem, new() { Name = "Ship v1.52" })).ToContainClassAsync("done"); + ``` + +- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and `/url` for links. + + ```csharp + await Expect(locator).ToMatchAriaSnapshotAsync(@" + - list + - /children: equal + - listitem: Feature A + - listitem: + - link ""Feature B"": + - /url: ""https://playwright.dev"" + "); + ``` + +### Miscellaneous +- New option [MaxRedirects](/api/class-apirequest.mdx#api-request-new-context-option-max-redirects) in [ApiRequest.NewContextAsync()](/api/class-apirequest.mdx#api-request-new-context) to control the maximum number of redirects. +- New option [Ref](/api/class-locator.mdx#locator-aria-snapshot-option-ref) in [Locator.AriaSnapshotAsync()](/api/class-locator.mdx#locator-aria-snapshot) to generate reference for each element in the snapshot which can later be used to locate the element. +- HTML reporter now supports *NOT filtering* via `!@my-tag` or `!my-file.spec.ts` or `!p:my-project`. + +### Breaking Changes +- Base URL matching is not supported in [Page.Frame()](/api/class-page.mdx#page-frame) anymore. We recommend migrating to [Page.FrameLocator()](/api/class-page.mdx#page-frame-locator) instead for having a more convenient API. +- Glob URL patterns in methods like [Page.RouteAsync()](/api/class-page.mdx#page-route) do not support `?` and `[]` anymore. We recommend using regular expressions instead. +- Method [Route.ContinueAsync()](/api/class-route.mdx#route-continue) does not allow to override the `Cookie` header anymore. If a `Cookie` header is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [BrowserContext.AddCookiesAsync()](/api/class-browsercontext.mdx#browser-context-add-cookies). +- macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benefiting from the latest WebKit improvements. + +### Browser Versions +- Chromium 136.0.7103.25 +- Mozilla Firefox 137.0 +- WebKit 18.4 + +This version was also tested against the following stable channels: +- Google Chrome 135 +- Microsoft Edge 135 + ## Version 1.51 ### Highlights diff --git a/java/docs/release-notes.mdx b/java/docs/release-notes.mdx index 513d53f1aca..43d98bd0bd5 100644 --- a/java/docs/release-notes.mdx +++ b/java/docs/release-notes.mdx @@ -7,6 +7,48 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import HTMLCard from '@site/src/components/HTMLCard'; +## Version 1.52 + +### Highlights +- New method [assertThat(locator).containsClass()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-class) to ergonomically assert individual class names on the element. + + ```java + assertThat(page.getByRole(AriaRole.LISTITEM, new Page.GetByRoleOptions().setName("Ship v1.52"))).containsClass("done"); + ``` + +- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and `/url` for links. + + ```java + assertThat(locator).toMatchAriaSnapshot(""" + - list + - /children: equal + - listitem: Feature A + - listitem: + - link "Feature B": + - /url: "https://playwright.dev" + """); + ``` + +### Miscellaneous +- New option [setMaxRedirects](/api/class-apirequest.mdx#api-request-new-context-option-max-redirects) in [APIRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context) to control the maximum number of redirects. +- New option [setRef](/api/class-locator.mdx#locator-aria-snapshot-option-ref) in [Locator.ariaSnapshot()](/api/class-locator.mdx#locator-aria-snapshot) to generate reference for each element in the snapshot which can later be used to locate the element. +- HTML reporter now supports *NOT filtering* via `!@my-tag` or `!my-file.spec.ts` or `!p:my-project`. + +### Breaking Changes +- Base URL matching is not supported in [Page.frame()](/api/class-page.mdx#page-frame) anymore. We recommend migrating to [Page.frameLocator()](/api/class-page.mdx#page-frame-locator) instead for having a more convenient API. +- Glob URL patterns in methods like [Page.route()](/api/class-page.mdx#page-route) do not support `?` and `[]` anymore. We recommend using regular expressions instead. +- Method [Route.resume()](/api/class-route.mdx#route-continue) does not allow to override the `Cookie` header anymore. If a `Cookie` header is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [BrowserContext.addCookies()](/api/class-browsercontext.mdx#browser-context-add-cookies). +- macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benefiting from the latest WebKit improvements. + +### Browser Versions +- Chromium 136.0.7103.25 +- Mozilla Firefox 137.0 +- WebKit 18.4 + +This version was also tested against the following stable channels: +- Google Chrome 135 +- Microsoft Edge 135 + ## Version 1.51 ### Highlights diff --git a/nodejs/docs/ci.mdx b/nodejs/docs/ci.mdx index 894251c862f..49f05744952 100644 --- a/nodejs/docs/ci.mdx +++ b/nodejs/docs/ci.mdx @@ -101,7 +101,7 @@ jobs: name: 'Playwright Tests' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright:v1.51.1-noble + image: mcr.microsoft.com/playwright:v1.52.0-noble options: --user 1001 steps: - uses: actions/checkout@v4 @@ -335,7 +335,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright:v1.51.1-noble +container: mcr.microsoft.com/playwright:v1.52.0-noble steps: - task: NodeTool@0 @@ -359,7 +359,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In executors: pw-noble-development: docker: - - image: mcr.microsoft.com/playwright:v1.51.1-noble + - image: mcr.microsoft.com/playwright:v1.52.0-noble ``` Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures. @@ -382,7 +382,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image]( ```groovy pipeline { - agent { docker { image 'mcr.microsoft.com/playwright:v1.51.1-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright:v1.52.0-noble' } } stages { stage('e2e-tests') { steps { @@ -399,7 +399,7 @@ pipeline { Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)). ```yml -image: mcr.microsoft.com/playwright:v1.51.1-noble +image: mcr.microsoft.com/playwright:v1.52.0-noble ``` ### GitLab CI @@ -412,7 +412,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.51.1-noble + image: mcr.microsoft.com/playwright:v1.52.0-noble script: ... ``` @@ -427,7 +427,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.51.1-noble + image: mcr.microsoft.com/playwright:v1.52.0-noble parallel: 7 script: - npm ci @@ -442,7 +442,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.51.1-noble + image: mcr.microsoft.com/playwright:v1.52.0-noble parallel: matrix: - PROJECT: ['chromium', 'webkit'] @@ -458,7 +458,7 @@ To run Playwright tests on Google Cloud Build, use our public Docker image ([see ```yml steps: -- name: mcr.microsoft.com/playwright:v1.51.1-noble +- name: mcr.microsoft.com/playwright:v1.52.0-noble script: ... env: @@ -476,7 +476,7 @@ type: docker steps: - name: test - image: mcr.microsoft.com/playwright:v1.51.1-noble + image: mcr.microsoft.com/playwright:v1.52.0-noble commands: - npx playwright test ``` diff --git a/nodejs/docs/docker.mdx b/nodejs/docs/docker.mdx index 191298d0905..ccd1d1923b9 100644 --- a/nodejs/docs/docker.mdx +++ b/nodejs/docs/docker.mdx @@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on ### Pull the image ```bash -docker pull mcr.microsoft.com/playwright:v1.51.1-noble +docker pull mcr.microsoft.com/playwright:v1.52.0-noble ``` ### Run the image @@ -34,7 +34,7 @@ By default, the Docker image will use the `root` user to run the browsers. This On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers. ```bash -docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.51.1-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.52.0-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.51.1-noble /bin/b On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it. ```bash -docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v1.51.1-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v1.52.0-noble /bin/bash ``` [`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions: @@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the Start the Playwright Server in Docker: ```bash -docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.51.1-noble /bin/sh -c "npx -y playwright@1.51.1 run-server --port 3000 --host 0.0.0.0" +docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.52.0-noble /bin/sh -c "npx -y playwright@1.52.0 run-server --port 3000 --host 0.0.0.0" ``` #### Connecting to the Server @@ -105,7 +105,7 @@ const browser = await playwright['chromium'].connect('ws://127.0.0.1:3000/'); If you need to access local servers from within the Docker container: ```bash -docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.51.1-noble /bin/sh -c "npx -y playwright@1.51.1 run-server --port 3000 --host 0.0.0.0" +docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.52.0-noble /bin/sh -c "npx -y playwright@1.52.0 run-server --port 3000 --host 0.0.0.0" ``` This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers. @@ -120,9 +120,9 @@ When running tests remotely, ensure the Playwright version in your tests matches See [all available image tags]. We currently publish images with the following tags: -- `:v1.51.1` - Playwright v1.51.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.51.1-noble` - Playwright v1.51.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.51.1-jammy` - Playwright v1.51.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). +- `:v1.52.0` - Playwright v1.52.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.52.0-noble` - Playwright v1.52.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.52.0-jammy` - Playwright v1.52.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). :::note @@ -146,7 +146,7 @@ To run Playwright inside Docker, you need to have Node.js, [Playwright browsers] ```Dockerfile FROM node:20-bookworm -RUN npx -y playwright@1.51.1 install --with-deps +RUN npx -y playwright@1.52.0 install --with-deps ``` diff --git a/nodejs/docs/intro.mdx b/nodejs/docs/intro.mdx index c0de939fb47..8f5ce8463a4 100644 --- a/nodejs/docs/intro.mdx +++ b/nodejs/docs/intro.mdx @@ -74,7 +74,7 @@ The `tests` folder contains a basic example test to help you get started with te ## Running the Example Test -By default tests will be run on all 3 browsers, Chromium, Firefox and WebKit using 3 workers. This can be configured in the [playwright.config file](./test-configuration.mdx). Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal. +By default tests will be run on all 3 browsers, Chromium, Firefox and WebKit using several workers. This can be configured in the [playwright.config file](./test-configuration.mdx). Tests are run in headless mode meaning no browser will open up when running the tests. Results of the tests and test logs will be shown in the terminal. diff --git a/nodejs/docs/release-notes.mdx b/nodejs/docs/release-notes.mdx index d797eddbc65..50283b5c680 100644 --- a/nodejs/docs/release-notes.mdx +++ b/nodejs/docs/release-notes.mdx @@ -9,6 +9,52 @@ import HTMLCard from '@site/src/components/HTMLCard'; import LiteYouTube from '@site/src/components/LiteYouTube'; +## Version 1.52 + +### Highlights +- New method [expect(locator).toContainClass()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-class) to ergonomically assert individual class names on the element. + + ```ts + await expect(page.getByRole('listitem', { name: 'Ship v1.52' })).toContainClass('done'); + ``` + +- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and `/url` for links. + + ```ts + await expect(locator).toMatchAriaSnapshot(` + - list + - /children: equal + - listitem: Feature A + - listitem: + - link "Feature B": + - /url: "https://playwright.dev" + `); + ``` + +### Test Runner +- New property [testProject.workers](/api/class-testproject.mdx#test-project-workers) allows to specify the number of concurrent worker processes to use for a test project. The global limit of property [testConfig.workers](/api/class-testconfig.mdx#test-config-workers) still applies. +- New [testConfig.failOnFlakyTests](/api/class-testconfig.mdx#test-config-fail-on-flaky-tests) option to fail the test run if any flaky tests are detected, similarly to `--fail-on-flaky-tests`. This is useful for CI/CD environments where you want to ensure that all tests are stable before deploying. +- New property [testResult.annotations](/api/class-testresult.mdx#test-result-annotations) contains annotations for each test retry. + +### Miscellaneous +- New option [maxRedirects](/api/class-apirequest.mdx#api-request-new-context-option-max-redirects) in [apiRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context) to control the maximum number of redirects. +- New option [ref](/api/class-locator.mdx#locator-aria-snapshot-option-ref) in [locator.ariaSnapshot()](/api/class-locator.mdx#locator-aria-snapshot) to generate reference for each element in the snapshot which can later be used to locate the element. +- HTML reporter now supports *NOT filtering* via `!@my-tag` or `!my-file.spec.ts` or `!p:my-project`. + +### Breaking Changes +- Glob URL patterns in methods like [page.route()](/api/class-page.mdx#page-route) do not support `?` and `[]` anymore. We recommend using regular expressions instead. +- Method [route.continue()](/api/class-route.mdx#route-continue) does not allow to override the `Cookie` header anymore. If a `Cookie` header is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [browserContext.addCookies()](/api/class-browsercontext.mdx#browser-context-add-cookies). +- macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benefiting from the latest WebKit improvements. + +### Browser Versions +- Chromium 136.0.7103.25 +- Mozilla Firefox 137.0 +- WebKit 18.4 + +This version was also tested against the following stable channels: +- Google Chrome 135 +- Microsoft Edge 135 + ## Version 1.51 ### StorageState for indexedDB diff --git a/python/docs/release-notes.mdx b/python/docs/release-notes.mdx index 80cb585a0dc..857bef74672 100644 --- a/python/docs/release-notes.mdx +++ b/python/docs/release-notes.mdx @@ -7,6 +7,48 @@ import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import HTMLCard from '@site/src/components/HTMLCard'; +## Version 1.52 + +### Highlights +- New method [expect(locator).to_contain_class()](/api/class-locatorassertions.mdx#locator-assertions-to-contain-class) to ergonomically assert individual class names on the element. + + ```python + expect(page.get_by_role('listitem', name='Ship v1.52')).to_contain_class('done') + ``` + +- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and `/url` for links. + + ```python + expect(locator).to_match_aria_snapshot(""" + - list + - /children: equal + - listitem: Feature A + - listitem: + - link "Feature B": + - /url: "https://playwright.dev" + """) + ``` + +### Miscellaneous +- New option [max_redirects](/api/class-apirequest.mdx#api-request-new-context-option-max-redirects) in [api_request.new_context()](/api/class-apirequest.mdx#api-request-new-context) to control the maximum number of redirects. +- New option [ref](/api/class-locator.mdx#locator-aria-snapshot-option-ref) in [locator.aria_snapshot()](/api/class-locator.mdx#locator-aria-snapshot) to generate reference for each element in the snapshot which can later be used to locate the element. +- HTML reporter now supports *NOT filtering* via `!@my-tag` or `!my-file.spec.ts` or `!p:my-project`. + +### Breaking Changes +- Base URL matching is not supported in [page.frame()](/api/class-page.mdx#page-frame) anymore. We recommend migrating to [page.frame_locator()](/api/class-page.mdx#page-frame-locator) instead for having a more convenient API. +- Glob URL patterns in methods like [page.route()](/api/class-page.mdx#page-route) do not support `?` and `[]` anymore. We recommend using regular expressions instead. +- Method [route.continue_()](/api/class-route.mdx#route-continue) does not allow to override the `Cookie` header anymore. If a `Cookie` header is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [browser_context.add_cookies()](/api/class-browsercontext.mdx#browser-context-add-cookies). +- macOS 13 is now deprecated and will no longer receive WebKit updates. Please upgrade to a more recent macOS version to continue benefiting from the latest WebKit improvements. + +### Browser Versions +- Chromium 136.0.7103.25 +- Mozilla Firefox 137.0 +- WebKit 18.4 + +This version was also tested against the following stable channels: +- Google Chrome 135 +- Microsoft Edge 135 + ## Version 1.51 ### Highlights