Skip to content

Commit 1781bf3

Browse files
committed
cherry-pick(#33706): docs: release notes for languages v1.49
1 parent b52a210 commit 1781bf3

6 files changed

+242
-10
lines changed

docs/src/api/class-locatorassertions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -2139,15 +2139,15 @@ await expect(page.locator('body')).toMatchAriaSnapshot(`
21392139
```
21402140

21412141
```python async
2142-
await page.goto('https://demo.playwright.dev/todomvc/')
2142+
await page.goto("https://demo.playwright.dev/todomvc/")
21432143
await expect(page.locator('body')).to_match_aria_snapshot('''
21442144
- heading "todos"
21452145
- textbox "What needs to be done?"
21462146
''')
21472147
```
21482148

21492149
```python sync
2150-
page.goto('https://demo.playwright.dev/todomvc/')
2150+
page.goto("https://demo.playwright.dev/todomvc/")
21512151
expect(page.locator('body')).to_match_aria_snapshot('''
21522152
- heading "todos"
21532153
- textbox "What needs to be done?"

docs/src/api/class-tracing.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,10 @@ await test.step('Log in', async () => {
302302
```java
303303
// All actions between group and groupEnd
304304
// will be shown in the trace viewer as a group.
305-
page.context().tracing.group("Open Playwright.dev > API");
305+
page.context().tracing().group("Open Playwright.dev > API");
306306
page.navigate("https://playwright.dev/");
307307
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("API")).click();
308-
page.context().tracing.groupEnd();
308+
page.context().tracing().groupEnd();
309309
```
310310

311311
```python sync
@@ -329,10 +329,10 @@ await page.context.tracing.group_end()
329329
```csharp
330330
// All actions between GroupAsync and GroupEndAsync
331331
// will be shown in the trace viewer as a group.
332-
await Page.Context().Tracing.GroupAsync("Open Playwright.dev > API");
332+
await Page.Context.Tracing.GroupAsync("Open Playwright.dev > API");
333333
await Page.GotoAsync("https://playwright.dev/");
334334
await Page.GetByRole(AriaRole.Link, new() { Name = "API" }).ClickAsync();
335-
await Page.Context().Tracing.GroupEndAsync();
335+
await Page.Context.Tracing.GroupEndAsync();
336336
```
337337

338338
### param: Tracing.group.name

docs/src/aria-snapshots.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,19 @@ await expect(page.locator('body')).toMatchAriaSnapshot(`
6767
```
6868

6969
```python sync
70-
page.locator("body").to_match_aria_snapshot("""
70+
expect(page.locator("body")).to_match_aria_snapshot("""
7171
- heading "title"
7272
""")
7373
```
7474

7575
```python async
76-
await page.locator("body").to_match_aria_snapshot("""
76+
await expect(page.locator("body")).to_match_aria_snapshot("""
7777
- heading "title"
7878
""")
7979
```
8080

8181
```java
82-
page.locator("body").expect().toMatchAriaSnapshot("""
82+
assertThat(page.locator("body")).matchesAriaSnapshot("""
8383
- heading "title"
8484
""");
8585
```
@@ -185,7 +185,7 @@ interactive interface:
185185
- **"Assert snapshot" Action**: In the code generator, you can use the "Assert snapshot" action to automatically create
186186
a snapshot assertion for the selected elements. This is a quick way to capture the aria snapshot as part of your
187187
recorded test flow.
188-
188+
189189
- **"Aria snapshot" Tab**: The "Aria snapshot" tab within the code generator interface visually represents the
190190
aria snapshot for a selected locator, letting you explore, inspect, and verify element roles, attributes, and
191191
accessible names to aid snapshot creation and review.

docs/src/release-notes-csharp.md

+85
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,91 @@ toc_max_heading_level: 2
55
---
66

77

8+
## Version 1.49
9+
10+
### Aria snapshots
11+
12+
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
13+
14+
```csharp
15+
await page.GotoAsync("https://playwright.dev");
16+
await Expect(page.Locator("body")).ToMatchAriaSnapshotAsync(@"
17+
- banner:
18+
- heading /Playwright enables reliable/ [level=1]
19+
- link ""Get started""
20+
- link ""Star microsoft/playwright on GitHub""
21+
- main:
22+
- img ""Browsers (Chromium, Firefox, WebKit)""
23+
- heading ""Any browser • Any platform • One API""
24+
");
25+
```
26+
27+
You can generate this assertion with [Test Generator](./codegen) or by calling [`method: Locator.ariaSnapshot`].
28+
29+
Learn more in the [aria snapshots guide](./aria-snapshots).
30+
31+
### Tracing groups
32+
33+
New method [`method: Tracing.group`] allows you to visually group actions in the trace viewer.
34+
35+
```csharp
36+
// All actions between GroupAsync and GroupEndAsync
37+
// will be shown in the trace viewer as a group.
38+
await Page.Context.Tracing.GroupAsync("Open Playwright.dev > API");
39+
await Page.GotoAsync("https://playwright.dev/");
40+
await Page.GetByRole(AriaRole.Link, new() { Name = "API" }).ClickAsync();
41+
await Page.Context.Tracing.GroupEndAsync();
42+
```
43+
44+
### Breaking: `chrome` and `msedge` channels switch to new headless mode
45+
46+
This change affects you if you're using one of the following channels in your `playwright.config.ts`:
47+
- `chrome`, `chrome-dev`, `chrome-beta`, or `chrome-canary`
48+
- `msedge`, `msedge-dev`, `msedge-beta`, or `msedge-canary`
49+
50+
After updating to Playwright v1.49, run your test suite. If it still passes, you're good to go. If not, you will probably need to update your snapshots, and adapt some of your test code around PDF viewers and extensions. See [issue #33566](https://github.com/microsoft/playwright/issues/33566) for more details.
51+
52+
### Try new Chromium headless
53+
54+
You can opt into the new headless mode by using `'chromium'` channel. As [official Chrome documentation puts it](https://developer.chrome.com/blog/chrome-headless-shell):
55+
56+
> New Headless on the other hand is the real Chrome browser, and is thus more authentic, reliable, and offers more features. This makes it more suitable for high-accuracy end-to-end web app testing or browser extension testing.
57+
58+
See [issue #33566](https://github.com/microsoft/playwright/issues/33566) for the list of possible breakages you could encounter and more details on Chromium headless. Please file an issue if you see any problems after opting in.
59+
60+
```xml csharp title="runsettings.xml"
61+
<?xml version="1.0" encoding="utf-8"?>
62+
<RunSettings>
63+
<Playwright>
64+
<BrowserName>chromium</BrowserName>
65+
<LaunchOptions>
66+
<Channel>chromium</Channel>
67+
</LaunchOptions>
68+
</Playwright>
69+
</RunSettings>
70+
```
71+
72+
```bash csharp
73+
dotnet test -- Playwright.BrowserName=chromium Playwright.LaunchOptions.Channel=chromium
74+
```
75+
76+
### Miscellaneous
77+
78+
- There will be no more updates for WebKit on Ubuntu 20.04 and Debian 11. We recommend updating your OS to a later version.
79+
- `<canvas>` elements inside a snapshot now draw a preview.
80+
81+
### Browser Versions
82+
83+
- Chromium 131.0.6778.33
84+
- Mozilla Firefox 132.0
85+
- WebKit 18.2
86+
87+
This version was also tested against the following stable channels:
88+
89+
- Google Chrome 130
90+
- Microsoft Edge 130
91+
92+
893
## Version 1.48
994

1095
### WebSocket routing

docs/src/release-notes-java.md

+73
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,79 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.49
8+
9+
### Aria snapshots
10+
11+
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
12+
13+
```java
14+
page.navigate("https://playwright.dev");
15+
assertThat(page.locator("body")).matchesAriaSnapshot("""
16+
- banner:
17+
- heading /Playwright enables reliable/ [level=1]
18+
- link "Get started"
19+
- link "Star microsoft/playwright on GitHub"
20+
- main:
21+
- img "Browsers (Chromium, Firefox, WebKit)"
22+
- heading "Any browser • Any platform • One API"
23+
""");
24+
```
25+
26+
You can generate this assertion with [Test Generator](./codegen) or by calling [`method: Locator.ariaSnapshot`].
27+
28+
Learn more in the [aria snapshots guide](./aria-snapshots).
29+
30+
### Tracing groups
31+
32+
New method [`method: Tracing.group`] allows you to visually group actions in the trace viewer.
33+
34+
```java
35+
// All actions between group and groupEnd
36+
// will be shown in the trace viewer as a group.
37+
page.context().tracing().group("Open Playwright.dev > API");
38+
page.navigate("https://playwright.dev/");
39+
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("API")).click();
40+
page.context().tracing().groupEnd();
41+
```
42+
43+
### Breaking: `chrome` and `msedge` channels switch to new headless mode
44+
45+
This change affects you if you're using one of the following channels in your `playwright.config.ts`:
46+
- `chrome`, `chrome-dev`, `chrome-beta`, or `chrome-canary`
47+
- `msedge`, `msedge-dev`, `msedge-beta`, or `msedge-canary`
48+
49+
After updating to Playwright v1.49, run your test suite. If it still passes, you're good to go. If not, you will probably need to update your snapshots, and adapt some of your test code around PDF viewers and extensions. See [issue #33566](https://github.com/microsoft/playwright/issues/33566) for more details.
50+
51+
### Try new Chromium headless
52+
53+
You can opt into the new headless mode by using `'chromium'` channel. As [official Chrome documentation puts it](https://developer.chrome.com/blog/chrome-headless-shell):
54+
55+
> New Headless on the other hand is the real Chrome browser, and is thus more authentic, reliable, and offers more features. This makes it more suitable for high-accuracy end-to-end web app testing or browser extension testing.
56+
57+
See [issue #33566](https://github.com/microsoft/playwright/issues/33566) for the list of possible breakages you could encounter and more details on Chromium headless. Please file an issue if you see any problems after opting in.
58+
59+
```java
60+
Browser browser = playwright.chromium().launch(new BrowserType.LaunchOptions().setChannel("chromium"));
61+
```
62+
63+
### Miscellaneous
64+
65+
- There will be no more updates for WebKit on Ubuntu 20.04 and Debian 11. We recommend updating your OS to a later version.
66+
- `<canvas>` elements inside a snapshot now draw a preview.
67+
68+
### Browser Versions
69+
70+
- Chromium 131.0.6778.33
71+
- Mozilla Firefox 132.0
72+
- WebKit 18.2
73+
74+
This version was also tested against the following stable channels:
75+
76+
- Google Chrome 130
77+
- Microsoft Edge 130
78+
79+
780
## Version 1.48
881

982
### WebSocket routing

docs/src/release-notes-python.md

+74
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,80 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.49
8+
9+
### Aria snapshots
10+
11+
New assertion [`method: LocatorAssertions.toMatchAriaSnapshot`] verifies page structure by comparing to an expected accessibility tree, represented as YAML.
12+
13+
```python
14+
page.goto("https://playwright.dev")
15+
expect(page.locator('body')).to_match_aria_snapshot('''
16+
- banner:
17+
- heading /Playwright enables reliable/ [level=1]
18+
- link "Get started"
19+
- link "Star microsoft/playwright on GitHub"
20+
- main:
21+
- img "Browsers (Chromium, Firefox, WebKit)"
22+
- heading "Any browser • Any platform • One API"
23+
''')
24+
```
25+
26+
You can generate this assertion with [Test Generator](./codegen) or by calling [`method: Locator.ariaSnapshot`].
27+
28+
Learn more in the [aria snapshots guide](./aria-snapshots).
29+
30+
### Tracing groups
31+
32+
New method [`method: Tracing.group`] allows you to visually group actions in the trace viewer.
33+
34+
```python
35+
# All actions between group and group_end
36+
# will be shown in the trace viewer as a group.
37+
page.context.tracing.group("Open Playwright.dev > API")
38+
page.goto("https://playwright.dev/")
39+
page.get_by_role("link", name="API").click()
40+
page.context.tracing.group_end()
41+
```
42+
43+
### Breaking: `chrome` and `msedge` channels switch to new headless mode
44+
45+
This change affects you if you're using one of the following channels in your `playwright.config.ts`:
46+
- `chrome`, `chrome-dev`, `chrome-beta`, or `chrome-canary`
47+
- `msedge`, `msedge-dev`, `msedge-beta`, or `msedge-canary`
48+
49+
After updating to Playwright v1.49, run your test suite. If it still passes, you're good to go. If not, you will probably need to update your snapshots, and adapt some of your test code around PDF viewers and extensions. See [issue #33566](https://github.com/microsoft/playwright/issues/33566) for more details.
50+
51+
### Try new Chromium headless
52+
53+
You can opt into the new headless mode by using `'chromium'` channel. As [official Chrome documentation puts it](https://developer.chrome.com/blog/chrome-headless-shell):
54+
55+
> New Headless on the other hand is the real Chrome browser, and is thus more authentic, reliable, and offers more features. This makes it more suitable for high-accuracy end-to-end web app testing or browser extension testing.
56+
57+
See [issue #33566](https://github.com/microsoft/playwright/issues/33566) for the list of possible breakages you could encounter and more details on Chromium headless. Please file an issue if you see any problems after opting in.
58+
59+
```bash python
60+
pytest test_login.py --browser-channel chromium
61+
```
62+
63+
### Miscellaneous
64+
65+
- There will be no more updates for WebKit on Ubuntu 20.04 and Debian 11. We recommend updating your OS to a later version.
66+
- `<canvas>` elements inside a snapshot now draw a preview.
67+
- Python 3.8 is not supported anymore.
68+
69+
### Browser Versions
70+
71+
- Chromium 131.0.6778.33
72+
- Mozilla Firefox 132.0
73+
- WebKit 18.2
74+
75+
This version was also tested against the following stable channels:
76+
77+
- Google Chrome 130
78+
- Microsoft Edge 130
79+
80+
781
## Version 1.48
882

983
### WebSocket routing

0 commit comments

Comments
 (0)