From ae7a8d2aa76d42f13fc7d140026c72a6044afadc Mon Sep 17 00:00:00 2001 From: Playwright Service <89237858+playwrightmachine@users.noreply.github.com> Date: Tue, 20 Dec 2022 12:53:30 -0800 Subject: [PATCH] chery-pick(#19573): docs: add 1.29 language port release notes (#19606) This PR cherry-picks the following commits: - 3555dbd4b42ce8e689b8a26814b5deed2010dacf Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- docs/src/release-notes-csharp.md | 57 ++++++++++++++++++++++++++++++ docs/src/release-notes-java.md | 38 ++++++++++++++++++++ docs/src/release-notes-js.md | 16 ++++++++- docs/src/release-notes-python.md | 60 ++++++++++++++++++++++++++++++++ 4 files changed, 170 insertions(+), 1 deletion(-) diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index 9f9aad235be5d..0017c7b67e3ae 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -4,6 +4,63 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.29 + +### New APIs + +- New method [`method: Route.fetch`] and new option `Json` for [`method: Route.fulfill`]: + + ```csharp + await Page.RouteAsync("**/api/settings", async route => { + // Fetch original settings. + var response = await route.FetchAsync(); + + // Force settings theme to a predefined value. + var json = await response.JsonAsync(); + json.Theme = "Solarized"; + + // Fulfill with modified data. + await route.FulfillAsync(new() { + Json = json + }); + }); + ``` + +- New method [`method: Locator.all`] to iterate over all matching elements: + + ```csharp + // Check all checkboxes! + var checkboxes = Page.GetByRole(AriaRole.Checkbox); + foreach (var checkbox in await checkboxes.AllAsync()) + await checkbox.CheckAsync(); + ``` + +- [`method: Locator.selectOption`] matches now by value or label: + + ```html + + ``` + + ```csharp + await element.SelectOptionAsync("Red"); + ``` + +### Browser Versions + +* Chromium 109.0.5414.46 +* Mozilla Firefox 107.0 +* WebKit 16.4 + +This version was also tested against the following stable channels: + +* Google Chrome 108 +* Microsoft Edge 108 + + ## Version 1.28 ### Playwright Tools diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index 84e1c4291777a..b6680a4e27761 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -4,6 +4,44 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.29 + +### New APIs + +- New method [`method: Locator.all`] to iterate over all matching elements: + + ```java + // Check all checkboxes! + Locator checkboxes = page.getByRole(AriaRole.CHECKBOX); + for (Locator checkbox : checkboxes.all()) + checkbox.check(); + ``` + +- [`method: Locator.selectOption`] matches now by value or label: + + ```html + + ``` + + ```java + element.selectOption('Red'); + ``` + +### Browser Versions + +* Chromium 109.0.5414.46 +* Mozilla Firefox 107.0 +* WebKit 16.4 + +This version was also tested against the following stable channels: + +* Google Chrome 108 +* Microsoft Edge 108 + ## Version 1.28 ### Playwright Tools diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md index 121c80bfbd813..a3953f513044d 100644 --- a/docs/src/release-notes-js.md +++ b/docs/src/release-notes-js.md @@ -33,6 +33,20 @@ toc_max_heading_level: 2 await checkbox.check(); ``` +- [`method: Locator.selectOption`] matches now by value or label: + + ```html + + ``` + + ```js + await element.selectOption('Red'); + ``` + - Retry blocks of code until all assertions pass: ```js @@ -65,7 +79,7 @@ toc_max_heading_level: 2 - Playwright Test now respects [`jsconfig.json`](https://code.visualstudio.com/docs/languages/jsconfig). - New options `args` and `proxy` for [`method: AndroidDevice.launchBrowser`]. -- Option `postData` in method [`method: Route.continue`] now supports [serializable](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#description) values. +- Option `postData` in method [`method: Route.continue`] now supports [Serializable] values. ### Browser Versions diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index a3c3bbcc91ac4..cacb8389b9ac9 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -4,6 +4,66 @@ title: "Release notes" toc_max_heading_level: 2 --- +## Version 1.29 + +### New APIs + +- New method [`method: Route.fetch`] and new option `json` for [`method: Route.fulfill`]: + + ```python + def handle_route(route: Route): + # Fetch original settings. + response = route.fetch() + + # Force settings theme to a predefined value. + json = response.json() + json["theme"] = "Solorized" + + # Fulfill with modified data. + route.fulfill(json=json) + + + page.route("**/api/settings", handle_route) + ``` + +- New method [`method: Locator.all`] to iterate over all matching elements: + + ```python + # Check all checkboxes! + checkboxes = page.get_by_role("checkbox") + for checkbox in checkboxes.all(): + checkbox.check() + ``` + +- [`method: Locator.selectOption`] matches now by value or label: + + ```html + + ``` + + ```python + element.select_option("Red") + ``` + +### Miscellaneous + +- Option `postData` in method [`method: Route.continue`] now supports [Serializable] values. + +### Browser Versions + +* Chromium 109.0.5414.46 +* Mozilla Firefox 107.0 +* WebKit 16.4 + +This version was also tested against the following stable channels: + +* Google Chrome 108 +* Microsoft Edge 108 + ## Version 1.28 ### Playwright Tools