Skip to content

Commit 9262b20

Browse files
feat(roll): roll to ToT Playwright (12-11-25) (#1918)
Co-authored-by: microsoft-playwright-automation[bot] <203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
1 parent ee6d795 commit 9262b20

14 files changed

Lines changed: 499 additions & 235 deletions

File tree

dotnet/docs/api/class-locator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ await button.ClickAsync();
555555

556556
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.57</font><x-search>locator.Description</x-search>
557557

558-
Returns locator description previously set with [Locator.Describe()](/api/class-locator.mdx#locator-describe).
558+
Returns locator description previously set with [Locator.Describe()](/api/class-locator.mdx#locator-describe). Returns `null` if no custom description has been set. Prefer `Locator.toString()` for a human-readable representation, as it uses the description when available.
559559

560560
**Usage**
561561

dotnet/docs/api/class-request.mdx

Lines changed: 125 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,57 @@ await Request.AllHeadersAsync();
4343

4444
---
4545

46+
### BodyAsync {#request-body}
47+
48+
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.57</font><x-search>request.BodyAsync</x-search>
49+
50+
The request body, if present.
51+
52+
**Usage**
53+
54+
```csharp
55+
await Request.BodyAsync();
56+
```
57+
58+
**Returns**
59+
- [string]?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-body-return"/><a href="#request-body-return" class="list-anchor">#</a>
60+
61+
---
62+
63+
### BodyBufferAsync {#request-body-buffer}
64+
65+
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.57</font><x-search>request.BodyBufferAsync</x-search>
66+
67+
The request body in a binary form. Returns null if the request has no body.
68+
69+
**Usage**
70+
71+
```csharp
72+
await Request.BodyBufferAsync();
73+
```
74+
75+
**Returns**
76+
- [byte]&#91;&#93;?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-body-buffer-return"/><a href="#request-body-buffer-return" class="list-anchor">#</a>
77+
78+
---
79+
80+
### BodyJSONAsync {#request-body-json}
81+
82+
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.57</font><x-search>request.BodyJSONAsync</x-search>
83+
84+
Returns the request body as a parsed JSON object. If the request `Content-Type` is `application/x-www-form-urlencoded`, this method returns a key/value object parsed from the form data. Otherwise, it parses the body as JSON.
85+
86+
**Usage**
87+
88+
```csharp
89+
await Request.BodyJSONAsync();
90+
```
91+
92+
**Returns**
93+
- [JsonElement]?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-body-json-return"/><a href="#request-body-json-return" class="list-anchor">#</a>
94+
95+
---
96+
4697
### Failure {#request-failure}
4798

4899
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>request.Failure</x-search>
@@ -188,59 +239,6 @@ Request.Method
188239

189240
---
190241

191-
### PostData {#request-post-data}
192-
193-
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>request.PostData</x-search>
194-
195-
Request's post body, if any.
196-
197-
**Usage**
198-
199-
```csharp
200-
Request.PostData
201-
```
202-
203-
**Returns**
204-
- [string]?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-post-data-return"/><a href="#request-post-data-return" class="list-anchor">#</a>
205-
206-
---
207-
208-
### PostDataBuffer {#request-post-data-buffer}
209-
210-
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>request.PostDataBuffer</x-search>
211-
212-
Request's post body in a binary form, if any.
213-
214-
**Usage**
215-
216-
```csharp
217-
Request.PostDataBuffer
218-
```
219-
220-
**Returns**
221-
- [byte]&#91;&#93;?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-post-data-buffer-return"/><a href="#request-post-data-buffer-return" class="list-anchor">#</a>
222-
223-
---
224-
225-
### PostDataJSON {#request-post-data-json}
226-
227-
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.12</font><x-search>request.PostDataJSON</x-search>
228-
229-
Returns parsed request's body for `form-urlencoded` and JSON as a fallback if any.
230-
231-
When the response is `application/x-www-form-urlencoded` then a key/value object of the values will be returned. Otherwise it will be parsed as JSON.
232-
233-
**Usage**
234-
235-
```csharp
236-
Request.PostDataJSON
237-
```
238-
239-
**Returns**
240-
- [JsonElement]?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-post-data-json-return"/><a href="#request-post-data-json-return" class="list-anchor">#</a>
241-
242-
---
243-
244242
### RedirectedFrom {#request-redirected-from}
245243

246244
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>request.RedirectedFrom</x-search>
@@ -415,6 +413,80 @@ Request.Url
415413
**Returns**
416414
- [string]<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-url-return"/><a href="#request-url-return" class="list-anchor">#</a>
417415

416+
---
417+
418+
## Deprecated
419+
420+
### PostData {#request-post-data}
421+
422+
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>request.PostData</x-search>
423+
424+
:::warning[Discouraged]
425+
426+
Use [Request.BodyAsync()](/api/class-request.mdx#request-body) instead.
427+
428+
:::
429+
430+
431+
The request body, if present.
432+
433+
**Usage**
434+
435+
```csharp
436+
Request.PostData
437+
```
438+
439+
**Returns**
440+
- [string]?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-post-data-return"/><a href="#request-post-data-return" class="list-anchor">#</a>
441+
442+
---
443+
444+
### PostDataBuffer {#request-post-data-buffer}
445+
446+
<font size="2" style={{position: "relative", top: "-20px"}}>Added before v1.9</font><x-search>request.PostDataBuffer</x-search>
447+
448+
:::warning[Discouraged]
449+
450+
Use [Request.BodyBufferAsync()](/api/class-request.mdx#request-body-buffer) instead.
451+
452+
:::
453+
454+
455+
The request body in a binary form. Returns null if the request has no body.
456+
457+
**Usage**
458+
459+
```csharp
460+
Request.PostDataBuffer
461+
```
462+
463+
**Returns**
464+
- [byte]&#91;&#93;?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-post-data-buffer-return"/><a href="#request-post-data-buffer-return" class="list-anchor">#</a>
465+
466+
---
467+
468+
### PostDataJSON {#request-post-data-json}
469+
470+
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.12</font><x-search>request.PostDataJSON</x-search>
471+
472+
:::warning[Discouraged]
473+
474+
Use [Request.BodyJSONAsync()](/api/class-request.mdx#request-body-json) instead.
475+
476+
:::
477+
478+
479+
Returns the request body as a parsed JSON object. If the request `Content-Type` is `application/x-www-form-urlencoded`, this method returns a key/value object parsed from the form data. Otherwise, it parses the body as JSON.
480+
481+
**Usage**
482+
483+
```csharp
484+
Request.PostDataJSON
485+
```
486+
487+
**Returns**
488+
- [JsonElement]?<a aria-hidden="true" tabIndex="-1" class="list-anchor-link" id="request-post-data-json-return"/><a href="#request-post-data-json-return" class="list-anchor">#</a>
489+
418490

419491
[APIRequest]: /api/class-apirequest.mdx "APIRequest"
420492
[APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext"

dotnet/docs/ci.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ jobs:
7676
name: 'Playwright Tests'
7777
runs-on: ubuntu-latest
7878
container:
79-
image: mcr.microsoft.com/playwright/dotnet:v1.55.0-noble
79+
image: mcr.microsoft.com/playwright/dotnet:v1.56.0-noble
8080
options: --user 1001
8181
steps:
8282
- uses: actions/checkout@v5
@@ -159,7 +159,7 @@ trigger:
159159
160160
pool:
161161
vmImage: ubuntu-latest
162-
container: mcr.microsoft.com/playwright/dotnet:v1.55.0-noble
162+
container: mcr.microsoft.com/playwright/dotnet:v1.56.0-noble
163163
164164
steps:
165165
- task: UseDotNet@2
@@ -182,7 +182,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
182182
executors:
183183
pw-noble-development:
184184
docker:
185-
- image: mcr.microsoft.com/playwright/dotnet:v1.55.0-noble
185+
- image: mcr.microsoft.com/playwright/dotnet:v1.56.0-noble
186186
```
187187

188188
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.
@@ -193,7 +193,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](
193193

194194
```groovy
195195
pipeline {
196-
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.55.0-noble' } }
196+
agent { docker { image 'mcr.microsoft.com/playwright/dotnet:v1.56.0-noble' } }
197197
stages {
198198
stage('e2e-tests') {
199199
steps {
@@ -210,7 +210,7 @@ pipeline {
210210
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)).
211211

212212
```yml
213-
image: mcr.microsoft.com/playwright/dotnet:v1.55.0-noble
213+
image: mcr.microsoft.com/playwright/dotnet:v1.56.0-noble
214214
```
215215

216216
### GitLab CI

dotnet/docs/docker.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on
2222
### Pull the image
2323

2424
```bash
25-
docker pull mcr.microsoft.com/playwright/dotnet:v1.55.0-noble
25+
docker pull mcr.microsoft.com/playwright/dotnet:v1.56.0-noble
2626
```
2727

2828
### Run the image
@@ -34,15 +34,15 @@ By default, the Docker image will use the `root` user to run the browsers. This
3434
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.
3535

3636
```bash
37-
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.55.0-noble /bin/bash
37+
docker run -it --rm --ipc=host mcr.microsoft.com/playwright/dotnet:v1.56.0-noble /bin/bash
3838
```
3939

4040
#### Crawling and scraping
4141

4242
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.
4343

4444
```bash
45-
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.55.0-noble /bin/bash
45+
docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/dotnet:v1.56.0-noble /bin/bash
4646
```
4747

4848
[`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
8282
Start the Playwright Server in Docker:
8383

8484
```bash
85-
docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.55.0-noble /bin/sh -c "npx -y playwright@1.55.0 run-server --port 3000 --host 0.0.0.0"
85+
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"
8686
```
8787

8888
#### Connecting to the Server
@@ -99,7 +99,7 @@ await using var browser = await playwright.Chromium.ConnectAsync("ws://127.0.0.1
9999
If you need to access local servers from within the Docker container:
100100

101101
```bash
102-
docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.55.0-noble /bin/sh -c "npx -y playwright@1.55.0 run-server --port 3000 --host 0.0.0.0"
102+
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"
103103
```
104104

105105
This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers.
@@ -114,9 +114,9 @@ When running tests remotely, ensure the Playwright version in your tests matches
114114
See [all available image tags].
115115

116116
We currently publish images with the following tags:
117-
- `:v1.55.0` - Playwright v1.55.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
118-
- `:v1.55.0-noble` - Playwright v1.55.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
119-
- `:v1.55.0-jammy` - Playwright v1.55.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
117+
- `:v1.56.0` - Playwright v1.56.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
118+
- `:v1.56.0-noble` - Playwright v1.56.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
119+
- `:v1.56.0-jammy` - Playwright v1.56.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
120120

121121
:::note
122122

java/docs/api/class-locator.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -556,7 +556,7 @@ button.click();
556556

557557
<font size="2" style={{position: "relative", top: "-20px"}}>Added in: v1.57</font><x-search>locator.description</x-search>
558558

559-
Returns locator description previously set with [Locator.describe()](/api/class-locator.mdx#locator-describe).
559+
Returns locator description previously set with [Locator.describe()](/api/class-locator.mdx#locator-describe). Returns `null` if no custom description has been set. Prefer `Locator.toString()` for a human-readable representation, as it uses the description when available.
560560

561561
**Usage**
562562

0 commit comments

Comments
 (0)