Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: release notes for v1.40 (#28175)

Dmitry Gozmanaec4399d8f97
diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md
index 1383b0a0b3..9209694046 100644
--- a/docs/src/release-notes-csharp.md
+++ b/docs/src/release-notes-csharp.md
@@ -4,6 +4,50 @@ title: "Release notes"
toc_max_heading_level: 2
---
+## Version 1.40
+
+### Test Generator Update
+
+![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
+
+New tools to generate assertions:
+- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
+- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
+- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
+
+Here is an example of a generated test with assertions:
+
+```csharp
+await Page.GotoAsync("https://playwright.dev/");
+await Page.GetByRole(AriaRole.Link, new() { Name = "Get started" }).ClickAsync();
+await Expect(Page.GetByLabel("Breadcrumbs").GetByRole(AriaRole.List)).ToContainTextAsync("Installation");
+await Expect(Page.GetByLabel("Search")).ToBeVisibleAsync();
+await Page.GetByLabel("Search").ClickAsync();
+await Page.GetByPlaceholder("Search docs").FillAsync("locator");
+await Expect(Page.GetByPlaceholder("Search docs")).ToHaveValueAsync("locator");
+```
+
+### New APIs
+
+- 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.
+- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
+
+### Other Changes
+
+- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
+- Playwright [docker image](./docker.md) now comes with Node.js v20.
+
+### Browser Versions
+
+* Chromium 120.0.6099.28
+* Mozilla Firefox 119.0
+* WebKit 17.4
+
+This version was also tested against the following stable channels:
+
+* Google Chrome 119
+* Microsoft Edge 119
+
## Version 1.39
Evergreen browsers update.
diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md
index a07ebf448b..041b390c09 100644
--- a/docs/src/release-notes-java.md
+++ b/docs/src/release-notes-java.md
@@ -4,6 +4,50 @@ title: "Release notes"
toc_max_heading_level: 2
---
+## Version 1.40
+
+### Test Generator Update
+
+![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
+
+New tools to generate assertions:
+- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
+- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
+- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
+
+Here is an example of a generated test with assertions:
+
+```java
+page.navigate("https://playwright.dev/");
+page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Get started")).click();
+assertThat(page.getByLabel("Breadcrumbs").getByRole(AriaRole.LIST)).containsText("Installation");
+assertThat(page.getByLabel("Search")).isVisible();
+page.getByLabel("Search").click();
+page.getByPlaceholder("Search docs").fill("locator");
+assertThat(page.getByPlaceholder("Search docs")).hasValue("locator");
+```
+
+### New APIs
+
+- 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.
+- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
+
+### Other Changes
+
+- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
+- Playwright [docker image](./docker.md) now comes with Node.js v20.
+
+### Browser Versions
+
+* Chromium 120.0.6099.28
+* Mozilla Firefox 119.0
+* WebKit 17.4
+
+This version was also tested against the following stable channels:
+
+* Google Chrome 119
+* Microsoft Edge 119
+
## Version 1.39
Evergreen browsers update.
diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md
index 164108ad1c..38a06d0149 100644
--- a/docs/src/release-notes-js.md
+++ b/docs/src/release-notes-js.md
@@ -6,6 +6,54 @@ toc_max_heading_level: 2
import LiteYouTube from '@site/src/components/LiteYouTube';
+## Version 1.40
+
+### Test Generator Update
+
+![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
+
+New tools to generate assertions:
+- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
+- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
+- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
+
+Here is an example of a generated test with assertions:
+
+```js
+import { test, expect } from '@playwright/test';
+
+test('test', async ({ page }) => {
+ await page.goto('https://playwright.dev/');
+ await page.getByRole('link', { name: 'Get started' }).click();
+ await expect(page.getByLabel('Breadcrumbs').getByRole('list')).toContainText('Installation');
+ await expect(page.getByLabel('Search')).toBeVisible();
+ await page.getByLabel('Search').click();
+ await page.getByPlaceholder('Search docs').fill('locator');
+ await expect(page.getByPlaceholder('Search docs')).toHaveValue('locator');
+});
+```
+
+### New APIs
+
+- 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.
+- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
+
+### Other Changes
+
+- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
+- Playwright [docker image](./docker.md) now comes with Node.js v20.
+
+### Browser Versions
+
+* Chromium 120.0.6099.28
+* Mozilla Firefox 119.0
+* WebKit 17.4
+
+This version was also tested against the following stable channels:
+
+* Google Chrome 119
+* Microsoft Edge 119
+
## Version 1.39
<LiteYouTube
diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md
index 9399c60e04..ada5a664bf 100644
--- a/docs/src/release-notes-python.md
+++ b/docs/src/release-notes-python.md
@@ -4,6 +4,53 @@ title: "Release notes"
toc_max_heading_level: 2
---
+## Version 1.40
+
+### Test Generator Update
+
+![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
+
+New tools to generate assertions:
+- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
+- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
+- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
+
+Here is an example of a generated test with assertions:
+
+```python
+from playwright.sync_api import Page, expect
+
+def test_example(page: Page) -> None:
+ page.goto("https://playwright.dev/")
+ page.get_by_role("link", name="Get started").click()
+ expect(page.get_by_label("Breadcrumbs").get_by_role("list")).to_contain_text("Installation")
+ expect(page.get_by_label("Search")).to_be_visible()
+ page.get_by_label("Search").click()
+ page.get_by_placeholder("Search docs").fill("locator")
+ expect(page.get_by_placeholder("Search docs")).to_have_value("locator");
+```
+
+### New APIs
+
+- 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.
+- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
+
+### Other Changes
+
+- Method [`method: Download.path`] throws an error for failed and cancelled downloads.
+- Playwright [docker image](./docker.md) now comes with Node.js v20.
+
+### Browser Versions
+
+* Chromium 120.0.6099.28
+* Mozilla Firefox 119.0
+* WebKit 17.4
+
+This version was also tested against the following stable channels:
+
+* Google Chrome 119
+* Microsoft Edge 119
+
## Version 1.39
Evergreen browsers update.