diff --git a/dotnet/docs/api/class-screencast.mdx b/dotnet/docs/api/class-screencast.mdx index f5c0deac37..8be1a8b355 100644 --- a/dotnet/docs/api/class-screencast.mdx +++ b/dotnet/docs/api/class-screencast.mdx @@ -191,7 +191,9 @@ Starts the screencast. When [Path](/api/class-screencast.mdx#screencast-start-op Max frame height in pixels. - Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If a screencast is already active (e.g. started by tracing or video recording), the existing configuration takes precedence and the frame size may exceed these bounds or this option may be ignored. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + + A page is captured only once, and all consumers share that single capture. Tracing captures screenshots this way as well, so with tracing or the `recordVideo` context option already active this option is ignored, and both the frames and any recorded video use the size of the running capture. **Returns** - [Disposable]# diff --git a/dotnet/docs/browsers.mdx b/dotnet/docs/browsers.mdx index ce3076574f..273301169e 100644 --- a/dotnet/docs/browsers.mdx +++ b/dotnet/docs/browsers.mdx @@ -509,7 +509,11 @@ Developers can opt into this mode by exporting `PLAYWRIGHT_BROWSERS_PATH=$HOME/p Playwright keeps track of the clients that use its browsers. When there are no more clients that require a particular version of the browser, that version is deleted from the system. That way you can safely use Playwright instances of different versions and at the same time, you don't waste disk space for the browsers that are no longer in use. -To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable. +To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable, or pass the `--no-remove` option to the install command: + +```bash +pwsh bin/Debug/netX/playwright.ps1 install --no-remove +``` ### List all installed browsers: diff --git a/java/docs/api/class-screencast.mdx b/java/docs/api/class-screencast.mdx index 28c334b809..4ccabf4b10 100644 --- a/java/docs/api/class-screencast.mdx +++ b/java/docs/api/class-screencast.mdx @@ -194,7 +194,9 @@ Starts the screencast. When [setPath](/api/class-screencast.mdx#screencast-start Max frame height in pixels. - Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If a screencast is already active (e.g. started by tracing or video recording), the existing configuration takes precedence and the frame size may exceed these bounds or this option may be ignored. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + + A page is captured only once, and all consumers share that single capture. Tracing captures screenshots this way as well, so with tracing or the `recordVideo` context option already active this option is ignored, and both the frames and any recorded video use the size of the running capture. **Returns** - [Disposable]# diff --git a/java/docs/browsers.mdx b/java/docs/browsers.mdx index 607f4baadd..f0e24a11dc 100644 --- a/java/docs/browsers.mdx +++ b/java/docs/browsers.mdx @@ -588,7 +588,11 @@ mvn test Playwright keeps track of the clients that use its browsers. When there are no more clients that require a particular version of the browser, that version is deleted from the system. That way you can safely use Playwright instances of different versions and at the same time, you don't waste disk space for the browsers that are no longer in use. -To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable. +To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable, or pass the `--no-remove` option to the install command: + +```bash +mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="install --no-remove" +``` ### List all installed browsers: diff --git a/java/docs/ci.mdx b/java/docs/ci.mdx index c5349fb4cd..50f11160c2 100644 --- a/java/docs/ci.mdx +++ b/java/docs/ci.mdx @@ -75,7 +75,7 @@ jobs: name: 'Playwright Tests' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright/java:v1.61.0-noble + image: mcr.microsoft.com/playwright/java:v1.62.0-noble options: --user 1001 steps: - uses: actions/checkout@v6 @@ -160,7 +160,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright/java:v1.61.0-noble +container: mcr.microsoft.com/playwright/java:v1.62.0-noble steps: - task: JavaToolInstaller@1 @@ -183,7 +183,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In executors: pw-noble-development: docker: - - image: mcr.microsoft.com/playwright/java:v1.61.0-noble + - image: mcr.microsoft.com/playwright/java:v1.62.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. @@ -194,7 +194,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image]( ```groovy pipeline { - agent { docker { image 'mcr.microsoft.com/playwright/java:v1.61.0-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright/java:v1.62.0-noble' } } stages { stage('e2e-tests') { steps { @@ -211,7 +211,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/java:v1.61.0-noble +image: mcr.microsoft.com/playwright/java:v1.62.0-noble ``` ### GitLab CI @@ -224,7 +224,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright/java:v1.61.0-noble + image: mcr.microsoft.com/playwright/java:v1.62.0-noble script: ... ``` diff --git a/java/docs/docker.mdx b/java/docs/docker.mdx index 13dcb45168..b922504a20 100644 --- a/java/docs/docker.mdx +++ b/java/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/java:v1.61.0-noble +docker pull mcr.microsoft.com/playwright/java:v1.62.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/java:v1.61.0-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.62.0-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.61.0-noble / 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/java:v1.61.0-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.62.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.61.0-noble /bin/sh -c "npx -y playwright@1.61.0 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.62.0-noble /bin/sh -c "npx -y playwright@1.62.0 run-server --port 3000 --host 0.0.0.0" ``` #### Connecting to the Server @@ -107,7 +107,7 @@ public class App { 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.61.0-noble /bin/sh -c "npx -y playwright@1.61.0 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.62.0-noble /bin/sh -c "npx -y playwright@1.62.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. @@ -140,10 +140,10 @@ Once this is enabled you can open the port specified in a new browser tab and yo See [all available image tags]. We currently publish images with the following tags: -- `:v1.61.0` - Playwright v1.61.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.61.0-noble` - Playwright v1.61.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.61.0-jammy` - Playwright v1.61.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). -- `:v1.61.0-resolute` - Playwright v1.61.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). +- `:v1.62.0` - Playwright v1.62.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.62.0-noble` - Playwright v1.62.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.62.0-jammy` - Playwright v1.62.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). +- `:v1.62.0-resolute` - Playwright v1.62.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon). :::note diff --git a/java/docs/intro.mdx b/java/docs/intro.mdx index 512c32c5b4..9b2ab47c2c 100644 --- a/java/docs/intro.mdx +++ b/java/docs/intro.mdx @@ -58,7 +58,7 @@ public class App { com.microsoft.playwright playwright - 1.61.0 + 1.62.0 diff --git a/java/docs/test-runners.mdx b/java/docs/test-runners.mdx index 1bde5a455c..173dbfbc95 100644 --- a/java/docs/test-runners.mdx +++ b/java/docs/test-runners.mdx @@ -198,7 +198,7 @@ repositories { } dependencies { - implementation 'com.microsoft.playwright:playwright:1.61.0' + implementation 'com.microsoft.playwright:playwright:1.62.0' } application { @@ -231,7 +231,7 @@ repositories { } dependencies { - implementation("com.microsoft.playwright:playwright:1.61.0") + implementation("com.microsoft.playwright:playwright:1.62.0") } application { diff --git a/nodejs/docs/api/class-screencast.mdx b/nodejs/docs/api/class-screencast.mdx index bed1f0c8d0..794503dc76 100644 --- a/nodejs/docs/api/class-screencast.mdx +++ b/nodejs/docs/api/class-screencast.mdx @@ -213,7 +213,9 @@ await page.screencast.stop(); Max frame height in pixels. - Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If a screencast is already active (e.g. started by tracing or video recording), the existing configuration takes precedence and the frame size may exceed these bounds or this option may be ignored. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + + A page is captured only once, and all consumers share that single capture. Tracing captures screenshots this way as well, so with tracing or the `recordVideo` context option already active this option is ignored, and both the frames and any recorded video use the size of the running capture. **Returns** - [Promise]<[Disposable]># diff --git a/nodejs/docs/api/class-testoptions.mdx b/nodejs/docs/api/class-testoptions.mdx index 39b4d1d531..6deb3e46ef 100644 --- a/nodejs/docs/api/class-testoptions.mdx +++ b/nodejs/docs/api/class-testoptions.mdx @@ -1081,6 +1081,21 @@ Learn more about [recording trace](../test-use-options.mdx#recording-options). - `attachments` [boolean] *(optional)* Whether to include test attachments. Defaults to true. Optional. + - `screencast` [boolean] | [Object] *(optional)* + - `size` [Object] *(optional)* + - `width` [number] + + Max screenshot width in pixels. + - `height` [number] + + Max screenshot height in pixels. + + Dimensions of the captured screenshots. Each screenshot is scaled down to preserve the page's aspect ratio and may be smaller than these bounds. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. Optional. + - `quality` [number] *(optional)* + + The quality of the screenshots, between 0-100. Defaults to 90. Optional. + + Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview. Passing `true` is a shortcut for `{}`. Takes precedence over `screenshots`. Optional. - `screenshots` [boolean] *(optional)* Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview. Defaults to true. Optional. diff --git a/nodejs/docs/api/class-tracing.mdx b/nodejs/docs/api/class-tracing.mdx index 5c67e1fdf3..6e1b45beb7 100644 --- a/nodejs/docs/api/class-tracing.mdx +++ b/nodejs/docs/api/class-tracing.mdx @@ -123,6 +123,23 @@ await context.tracing.stop({ path: 'trace.zip' }); - `name` [string] *(optional)*# If specified, intermediate trace files are going to be saved into the files with the given name prefix inside the [tracesDir](/api/class-browsertype.mdx#browser-type-launch-option-traces-dir) directory specified in [browserType.launch()](/api/class-browsertype.mdx#browser-type-launch). To specify the final trace zip file name, you need to pass `path` option to [tracing.stop()](/api/class-tracing.mdx#tracing-stop) instead. + - `screencast` [boolean] | [Object] *(optional)* Added in: v1.63# + - `size` [Object] *(optional)* + - `width` [number] + + Max screenshot width in pixels. + - `height` [number] + + Max screenshot height in pixels. + + Dimensions of the captured screenshots. Each screenshot is scaled down to preserve the page's aspect ratio and may be smaller than these bounds. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. Optional. + - `quality` [number] *(optional)* + + The quality of the screenshots, between 0-100. Defaults to 90. Optional. + + Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview. Passing `true` is a shortcut for `{}`. Takes precedence over [screenshots](/api/class-tracing.mdx#tracing-start-option-screenshots). + + A page is captured only once, and tracing shares that capture with [screencast.start()](/api/class-screencast.mdx#screencast-start) and video recording. The trace viewer renders the timeline preview at a fixed size, so these settings only matter to those other consumers: raise them to keep tracing from capping what the others receive. - `screenshots` [boolean] *(optional)*# Whether to capture screenshots during tracing. Screenshots are used to build a timeline preview. diff --git a/nodejs/docs/browsers.mdx b/nodejs/docs/browsers.mdx index bfc9f2d24c..3e66ecf435 100644 --- a/nodejs/docs/browsers.mdx +++ b/nodejs/docs/browsers.mdx @@ -614,7 +614,11 @@ npx playwright install Playwright keeps track of the clients that use its browsers. When there are no more clients that require a particular version of the browser, that version is deleted from the system. That way you can safely use Playwright instances of different versions and at the same time, you don't waste disk space for the browsers that are no longer in use. -To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable. +To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable, or pass the `--no-remove` option to the install command: + +```bash +npx playwright install --no-remove +``` ### List all installed browsers: diff --git a/nodejs/docs/test-cli.mdx b/nodejs/docs/test-cli.mdx index 4c93bda035..c1b402512f 100644 --- a/nodejs/docs/test-cli.mdx +++ b/nodejs/docs/test-cli.mdx @@ -223,6 +223,7 @@ npx playwright install --with-deps | `--dry-run` | Don't perform installation, just print information | | `--only-shell` | Only install chromium-headless-shell instead of full Chromium | | `--no-shell` | Don't install chromium-headless-shell | +| `--no-remove` | Don't remove unused browsers | #### Install Deps Options diff --git a/python/docs/api/class-screencast.mdx b/python/docs/api/class-screencast.mdx index f95ed42a81..23edd2d281 100644 --- a/python/docs/api/class-screencast.mdx +++ b/python/docs/api/class-screencast.mdx @@ -190,7 +190,9 @@ Starts the screencast. When [path](/api/class-screencast.mdx#screencast-start-op Max frame height in pixels. - Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If a screencast is already active (e.g. started by tracing or video recording), the existing configuration takes precedence and the frame size may exceed these bounds or this option may be ignored. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + Specifies the dimensions of screencast frames. The actual frame is scaled to preserve the page's aspect ratio and may be smaller than these bounds. If not specified the size will be equal to page viewport scaled down to fit into 800×800. + + A page is captured only once, and all consumers share that single capture. Tracing captures screenshots this way as well, so with tracing or the `recordVideo` context option already active this option is ignored, and both the frames and any recorded video use the size of the running capture. **Returns** - [Disposable]# diff --git a/python/docs/browsers.mdx b/python/docs/browsers.mdx index c39d7d40e2..1d88c406e0 100644 --- a/python/docs/browsers.mdx +++ b/python/docs/browsers.mdx @@ -544,7 +544,11 @@ Developers can opt into this mode by exporting `PLAYWRIGHT_BROWSERS_PATH=$HOME/p Playwright keeps track of the clients that use its browsers. When there are no more clients that require a particular version of the browser, that version is deleted from the system. That way you can safely use Playwright instances of different versions and at the same time, you don't waste disk space for the browsers that are no longer in use. -To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable. +To opt-out from the unused browser removal, you can set the `PLAYWRIGHT_SKIP_BROWSER_GC=1` environment variable, or pass the `--no-remove` option to the install command: + +```bash +playwright install --no-remove +``` ### List all installed browsers: