diff --git a/nodejs/docs/ci.mdx b/nodejs/docs/ci.mdx index 9a7e00f37e..c63a4f2913 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.56.1-noble + image: mcr.microsoft.com/playwright:v1.57.0-noble options: --user 1001 steps: - uses: actions/checkout@v5 @@ -335,7 +335,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright:v1.56.1-noble +container: mcr.microsoft.com/playwright:v1.57.0-noble steps: - task: UseNode@1 @@ -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.56.1-noble + - image: mcr.microsoft.com/playwright:v1.57.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.56.1-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright:v1.57.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.56.1-noble +image: mcr.microsoft.com/playwright:v1.57.0-noble ``` ### GitLab CI @@ -412,7 +412,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.56.1-noble + image: mcr.microsoft.com/playwright:v1.57.0-noble script: ... ``` @@ -427,7 +427,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.56.1-noble + image: mcr.microsoft.com/playwright:v1.57.0-noble parallel: 7 script: - npm ci @@ -442,7 +442,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright:v1.56.1-noble + image: mcr.microsoft.com/playwright:v1.57.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.56.1-noble +- name: mcr.microsoft.com/playwright:v1.57.0-noble script: ... env: @@ -476,7 +476,7 @@ type: docker steps: - name: test - image: mcr.microsoft.com/playwright:v1.56.1-noble + image: mcr.microsoft.com/playwright:v1.57.0-noble commands: - npx playwright test ``` diff --git a/nodejs/docs/docker.mdx b/nodejs/docs/docker.mdx index 63840b70ef..8407f59341 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.56.1-noble +docker pull mcr.microsoft.com/playwright:v1.57.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.56.1-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.57.0-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright:v1.56.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.56.1-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright:v1.57.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.56.1-noble /bin/sh -c "npx -y playwright@1.56.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.57.0-noble /bin/sh -c "npx -y playwright@1.57.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.56.1-noble /bin/sh -c "npx -y playwright@1.56.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.57.0-noble /bin/sh -c "npx -y playwright@1.57.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.56.1` - Playwright v1.56.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.56.1-noble` - Playwright v1.56.1 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.56.1-jammy` - Playwright v1.56.1 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish). +- `:v1.57.0` - Playwright v1.57.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.57.0-noble` - Playwright v1.57.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). +- `:v1.57.0-jammy` - Playwright v1.57.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.56.1 install --with-deps +RUN npx -y playwright@1.57.0 install --with-deps ``` diff --git a/nodejs/docs/release-notes.mdx b/nodejs/docs/release-notes.mdx index 663a61b859..9d9fe7e7d3 100644 --- a/nodejs/docs/release-notes.mdx +++ b/nodejs/docs/release-notes.mdx @@ -21,7 +21,9 @@ It shows you all your executed tests sorted by slowness, and can help you unders ### Chrome for Testing -Starting with this release, Playwright switches from Chromium, to using [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57. We're expecting no functional changes to come from this switch - the biggest change is the new icon and title in your toolbar: +Starting with this release, Playwright switches from Chromium, to using [Chrome for Testing](https://developer.chrome.com/blog/chrome-for-testing/) builds. Both headed and headless browsers are subject to this. Your tests should still be passing after upgrading to Playwright 1.57. + +We're expecting no functional changes to come from this switch. The biggest change is the new icon and title in your toolbar. ![new and old logo](../images/cft-logo-change.png) @@ -58,7 +60,7 @@ test('homepage', async ({ page }) => { }); ``` -This is not just useful for capturing varying ports of dev servers: You can also use it to wait for readiness of a service that doesn't expose an HTTP readiness check, but instead prints a readiness message to stdout or stderr. +This is not just useful for capturing varying ports of dev servers. You can also use it to wait for readiness of a service that doesn't expose an HTTP readiness check, but instead prints a readiness message to stdout or stderr. ### Breaking Change @@ -66,12 +68,11 @@ After 3 years of being deprecated, we removed `Page#accessibility` from our API. ### New APIs - New property [testConfig.tag](/api/class-testconfig.mdx#test-config-tag) adds a tag to all tests in this run. This is useful when using [merge-reports](./test-sharding.mdx#merging-reports-from-multiple-shards). -- [worker.on('console')](/api/class-worker.mdx#worker-event-console) event is emitted when JavaScript within the worker calls one of console API methods, e.g. console.log or console.dir. [worker.waitForEvent()](/api/class-worker.mdx#worker-wait-for-event) can be used to wait for it. You can opt out of this using the `PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE` environment variable. +- [worker.on('console')](/api/class-worker.mdx#worker-event-console) event is emitted when JavaScript within the worker calls one of console API methods, e.g. console.log or console.dir. [worker.waitForEvent()](/api/class-worker.mdx#worker-wait-for-event) can be used to wait for it. - [locator.description()](/api/class-locator.mdx#locator-description) returns locator description previously set with [locator.describe()](/api/class-locator.mdx#locator-describe), and `Locator.toString()` now uses the description when available. -- New option [steps](/api/class-locator.mdx#locator-click-option-steps) in [locator.click()](/api/class-locator.mdx#locator-click) and [locator.dragTo()](/api/class-locator.mdx#locator-drag-to) that configures the number of `mousemove` events emitted while moving the mouse pointer to the target element. +- New option [steps](/api/class-locator.mdx#locator-click-option-steps) in [locator.click()](/api/class-locator.mdx#locator-click) and [locator.dragTo()](/api/class-locator.mdx#locator-drag-to) that configures the number of `mousemove` events emitted while moving the mouse pointer to the target element. - Network requests issued by [Service Workers](./service-workers.mdx#network-events-and-routing) are now reported and can be routed through the [BrowserContext](./api/class-browsercontext.mdx), only in Chromium. You can opt out using the `PLAYWRIGHT_DISABLE_SERVICE_WORKER_NETWORK` environment variable. -- New methods [request.postData()](/api/class-request.mdx#request-post-data), [request.postDataBuffer()](/api/class-request.mdx#request-post-data-buffer) and [request.postDataJSON()](/api/class-request.mdx#request-post-data-json). -- Option [testConfig.webServer](/api/class-testconfig.mdx#test-config-web-server) added a `wait` field to check readiness based on stdout/stderr. +- Console messages from Service Workers are dispatched through [worker.on('console')](/api/class-worker.mdx#worker-event-console). You can opt out of this using the `PLAYWRIGHT_DISABLE_SERVICE_WORKER_CONSOLE` environment variable. ### Browser Versions - Chromium 143.0.7499.4