Skip to content

Commit aec4399

Browse files
authored
docs: release notes for v1.40 (#28175)
1 parent 25b9c4e commit aec4399

File tree

4 files changed

+183
-0
lines changed

4 files changed

+183
-0
lines changed

docs/src/release-notes-csharp.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,50 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.40
8+
9+
### Test Generator Update
10+
11+
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
12+
13+
New tools to generate assertions:
14+
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
15+
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
16+
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
17+
18+
Here is an example of a generated test with assertions:
19+
20+
```csharp
21+
await Page.GotoAsync("https://playwright.dev/");
22+
await Page.GetByRole(AriaRole.Link, new() { Name = "Get started" }).ClickAsync();
23+
await Expect(Page.GetByLabel("Breadcrumbs").GetByRole(AriaRole.List)).ToContainTextAsync("Installation");
24+
await Expect(Page.GetByLabel("Search")).ToBeVisibleAsync();
25+
await Page.GetByLabel("Search").ClickAsync();
26+
await Page.GetByPlaceholder("Search docs").FillAsync("locator");
27+
await Expect(Page.GetByPlaceholder("Search docs")).ToHaveValueAsync("locator");
28+
```
29+
30+
### New APIs
31+
32+
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
33+
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
34+
35+
### Other Changes
36+
37+
- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
38+
- Playwright [docker image](./docker.md) now comes with Node.js v20.
39+
40+
### Browser Versions
41+
42+
* Chromium 120.0.6099.28
43+
* Mozilla Firefox 119.0
44+
* WebKit 17.4
45+
46+
This version was also tested against the following stable channels:
47+
48+
* Google Chrome 119
49+
* Microsoft Edge 119
50+
751
## Version 1.39
852

953
Evergreen browsers update.

docs/src/release-notes-java.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,50 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.40
8+
9+
### Test Generator Update
10+
11+
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
12+
13+
New tools to generate assertions:
14+
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
15+
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
16+
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
17+
18+
Here is an example of a generated test with assertions:
19+
20+
```java
21+
page.navigate("https://playwright.dev/");
22+
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Get started")).click();
23+
assertThat(page.getByLabel("Breadcrumbs").getByRole(AriaRole.LIST)).containsText("Installation");
24+
assertThat(page.getByLabel("Search")).isVisible();
25+
page.getByLabel("Search").click();
26+
page.getByPlaceholder("Search docs").fill("locator");
27+
assertThat(page.getByPlaceholder("Search docs")).hasValue("locator");
28+
```
29+
30+
### New APIs
31+
32+
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
33+
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
34+
35+
### Other Changes
36+
37+
- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
38+
- Playwright [docker image](./docker.md) now comes with Node.js v20.
39+
40+
### Browser Versions
41+
42+
* Chromium 120.0.6099.28
43+
* Mozilla Firefox 119.0
44+
* WebKit 17.4
45+
46+
This version was also tested against the following stable channels:
47+
48+
* Google Chrome 119
49+
* Microsoft Edge 119
50+
751
## Version 1.39
852

953
Evergreen browsers update.

docs/src/release-notes-js.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,54 @@ toc_max_heading_level: 2
66

77
import LiteYouTube from '@site/src/components/LiteYouTube';
88

9+
## Version 1.40
10+
11+
### Test Generator Update
12+
13+
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
14+
15+
New tools to generate assertions:
16+
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
17+
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
18+
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
19+
20+
Here is an example of a generated test with assertions:
21+
22+
```js
23+
import { test, expect } from '@playwright/test';
24+
25+
test('test', async ({ page }) => {
26+
await page.goto('https://playwright.dev/');
27+
await page.getByRole('link', { name: 'Get started' }).click();
28+
await expect(page.getByLabel('Breadcrumbs').getByRole('list')).toContainText('Installation');
29+
await expect(page.getByLabel('Search')).toBeVisible();
30+
await page.getByLabel('Search').click();
31+
await page.getByPlaceholder('Search docs').fill('locator');
32+
await expect(page.getByPlaceholder('Search docs')).toHaveValue('locator');
33+
});
34+
```
35+
36+
### New APIs
37+
38+
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
39+
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
40+
41+
### Other Changes
42+
43+
- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
44+
- Playwright [docker image](./docker.md) now comes with Node.js v20.
45+
46+
### Browser Versions
47+
48+
* Chromium 120.0.6099.28
49+
* Mozilla Firefox 119.0
50+
* WebKit 17.4
51+
52+
This version was also tested against the following stable channels:
53+
54+
* Google Chrome 119
55+
* Microsoft Edge 119
56+
957
## Version 1.39
1058

1159
<LiteYouTube

docs/src/release-notes-python.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,53 @@ title: "Release notes"
44
toc_max_heading_level: 2
55
---
66

7+
## Version 1.40
8+
9+
### Test Generator Update
10+
11+
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
12+
13+
New tools to generate assertions:
14+
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
15+
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
16+
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
17+
18+
Here is an example of a generated test with assertions:
19+
20+
```python
21+
from playwright.sync_api import Page, expect
22+
23+
def test_example(page: Page) -> None:
24+
page.goto("https://playwright.dev/")
25+
page.get_by_role("link", name="Get started").click()
26+
expect(page.get_by_label("Breadcrumbs").get_by_role("list")).to_contain_text("Installation")
27+
expect(page.get_by_label("Search")).to_be_visible()
28+
page.get_by_label("Search").click()
29+
page.get_by_placeholder("Search docs").fill("locator")
30+
expect(page.get_by_placeholder("Search docs")).to_have_value("locator");
31+
```
32+
33+
### New APIs
34+
35+
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
36+
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
37+
38+
### Other Changes
39+
40+
- Method [`method: Download.path`] throws an error for failed and cancelled downloads.
41+
- Playwright [docker image](./docker.md) now comes with Node.js v20.
42+
43+
### Browser Versions
44+
45+
* Chromium 120.0.6099.28
46+
* Mozilla Firefox 119.0
47+
* WebKit 17.4
48+
49+
This version was also tested against the following stable channels:
50+
51+
* Google Chrome 119
52+
* Microsoft Edge 119
53+
754
## Version 1.39
855

956
Evergreen browsers update.

0 commit comments

Comments
 (0)