From ec2b2b53146af1486502f84368826e6c4493a48a Mon Sep 17 00:00:00 2001 From: "microsoft-playwright-automation[bot]" <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com> Date: Wed, 10 Dec 2025 10:10:49 +0000 Subject: [PATCH] feat(roll): roll to ToT Playwright (10-12-25) --- dotnet/docs/locators.mdx | 2 +- java/docs/locators.mdx | 6 +++--- nodejs/docs/api/class-browser.mdx | 9 ++++++--- nodejs/docs/api/class-testoptions.mdx | 9 ++++++--- python/docs/ci.mdx | 12 ++++++------ python/docs/docker.mdx | 18 +++++++++--------- src/components/GitHubStarButton/index.tsx | 2 +- 7 files changed, 32 insertions(+), 26 deletions(-) diff --git a/dotnet/docs/locators.mdx b/dotnet/docs/locators.mdx index 80febbb216..29b02ac6fe 100644 --- a/dotnet/docs/locators.mdx +++ b/dotnet/docs/locators.mdx @@ -477,7 +477,7 @@ Alternatively, filter by **not having** text: ```csharp // 5 in-stock items -await Expect(Page.getByRole(AriaRole.Listitem).Filter(new() { HasNotText = "Out of stock" })) +await Expect(Page.GetByRole(AriaRole.Listitem).Filter(new() { HasNotText = "Out of stock" })) .ToHaveCountAsync(5); ``` diff --git a/java/docs/locators.mdx b/java/docs/locators.mdx index 6498c57b0a..4754e740bc 100644 --- a/java/docs/locators.mdx +++ b/java/docs/locators.mdx @@ -520,10 +520,10 @@ Locators support an option to only select elements that have or have not a desce ```java page.getByRole(AriaRole.LISTITEM) .filter(new Locator.FilterOptions() - .setHas(page.GetByRole(AriaRole.HEADING, new Page.GetByRoleOptions() + .setHas(page.getByRole(AriaRole.HEADING, new Page.GetByRoleOptions() .setName("Product 2")))) .getByRole(AriaRole.BUTTON, - new Page.GetByRoleOptions().setName("Add to cart")) + new Locator.GetByRoleOptions().setName("Add to cart")) .click(); ``` @@ -644,7 +644,7 @@ Consider a page with two buttons, the first invisible and the second [visible](. * This will only find a second button, because it is visible, and then click it. ```java - page.locator("button").filter(new Locator.FilterOptions.setVisible(true)).click(); + page.locator("button").filter(new Locator.FilterOptions().setVisible(true)).click(); ``` ## Lists diff --git a/nodejs/docs/api/class-browser.mdx b/nodejs/docs/api/class-browser.mdx index 353d0e9308..0ebd3e090c 100644 --- a/nodejs/docs/api/class-browser.mdx +++ b/nodejs/docs/api/class-browser.mdx @@ -171,16 +171,19 @@ If directly using this method to create [BrowserContext]s, it is best practice t - `agent` [Object] *(optional)* Added in: v1.58# - `provider` [string] - LLM provider to use + LLM provider to use. - `model` [string] - Model identifier within provider + Model identifier within provider. - `cacheFile` [string] *(optional)* Cache file to use/generate code for performed actions into. Cache is not used if not specified (default). - `cacheMode` ['force'] | ['ignore'] | ['auto'] *(optional)* - Cache control, defauls to 'auto' + Cache control, defaults to 'auto'. + - `secrets` [Object]<[string], [string]> *(optional)* + + Secrets to hide from the LLM. Agent settings for [page.perform()](/api/class-page.mdx#page-perform) and [page.extract()](/api/class-page.mdx#page-extract). - `baseURL` [string] *(optional)*# diff --git a/nodejs/docs/api/class-testoptions.mdx b/nodejs/docs/api/class-testoptions.mdx index db79a9a5cf..336191c2f8 100644 --- a/nodejs/docs/api/class-testoptions.mdx +++ b/nodejs/docs/api/class-testoptions.mdx @@ -108,16 +108,19 @@ testOptions.agent - [Object] - `provider` [string] - LLM provider to use + LLM provider to use. - `model` [string] - Model identifier within provider + Model identifier within provider. - `cacheFile` [string] *(optional)* Cache file to use/generate code for performed actions into. Cache is not used if not specified (default). - `cacheMode` ['force'] | ['ignore'] | ['auto'] *(optional)* - Cache control, defauls to 'auto' + Cache control, defaults to 'auto'. + - `secrets` [Object]<[string], [string]> *(optional)* + + Secrets to hide from the LLM. --- diff --git a/python/docs/ci.mdx b/python/docs/ci.mdx index 398dcc9b3a..ef8ac08626 100644 --- a/python/docs/ci.mdx +++ b/python/docs/ci.mdx @@ -83,7 +83,7 @@ jobs: name: 'Playwright Tests' runs-on: ubuntu-latest container: - image: mcr.microsoft.com/playwright/python:v1.56.0-noble + image: mcr.microsoft.com/playwright/python:v1.57.0-noble options: --user 1001 steps: - uses: actions/checkout@v5 @@ -173,7 +173,7 @@ trigger: pool: vmImage: ubuntu-latest -container: mcr.microsoft.com/playwright/python:v1.56.0-noble +container: mcr.microsoft.com/playwright/python:v1.57.0-noble steps: - task: UsePythonVersion@0 @@ -197,7 +197,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In executors: pw-noble-development: docker: - - image: mcr.microsoft.com/playwright/python:v1.56.0-noble + - image: mcr.microsoft.com/playwright/python: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. @@ -208,7 +208,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image]( ```groovy pipeline { - agent { docker { image 'mcr.microsoft.com/playwright/python:v1.56.0-noble' } } + agent { docker { image 'mcr.microsoft.com/playwright/python:v1.57.0-noble' } } stages { stage('e2e-tests') { steps { @@ -225,7 +225,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/python:v1.56.0-noble +image: mcr.microsoft.com/playwright/python:v1.57.0-noble ``` ### GitLab CI @@ -238,7 +238,7 @@ stages: tests: stage: test - image: mcr.microsoft.com/playwright/python:v1.56.0-noble + image: mcr.microsoft.com/playwright/python:v1.57.0-noble script: ... ``` diff --git a/python/docs/docker.mdx b/python/docs/docker.mdx index 0860e007b6..a93756b1b0 100644 --- a/python/docs/docker.mdx +++ b/python/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/python:v1.56.0-noble +docker pull mcr.microsoft.com/playwright/python: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/python:v1.56.0-noble /bin/bash +docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.57.0-noble /bin/bash ``` #### Crawling and scraping @@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.56.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/python:v1.56.0-noble /bin/bash +docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python: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.0-noble /bin/sh -c "npx -y playwright@1.56.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.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 @@ -122,7 +122,7 @@ async with async_playwright() as p: 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.0-noble /bin/sh -c "npx -y playwright@1.56.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.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. @@ -155,9 +155,9 @@ 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.56.0` - Playwright v1.56.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.56.0-noble` - Playwright v1.56.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat). -- `:v1.56.0-jammy` - Playwright v1.56.0 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 @@ -181,7 +181,7 @@ To run Playwright inside Docker, you need to have Python, [Playwright browsers]( ```Dockerfile FROM python:3.12-bookworm -RUN pip install playwright==@1.56.0 && \ +RUN pip install playwright==@1.57.0 && \ playwright install --with-deps ``` diff --git a/src/components/GitHubStarButton/index.tsx b/src/components/GitHubStarButton/index.tsx index da9e750b4d..2e3656e730 100644 --- a/src/components/GitHubStarButton/index.tsx +++ b/src/components/GitHubStarButton/index.tsx @@ -6,7 +6,7 @@ type StarButtonProps = { repo: string } -const STARS = '79k+'; // NOTE: this line is generated by src/generate.js. Do not change! +const STARS = '80k+'; // NOTE: this line is generated by src/generate.js. Do not change! const StarButton: React.FC = ({owner, repo}) => { if (!repo)