From 52e326abd1508bf21f593ed11b36f52ac17e8d0f Mon Sep 17 00:00:00 2001 From: Andrey Lushnikov Date: Mon, 11 Apr 2022 17:53:57 -0600 Subject: [PATCH] docs: release notes for 1.21 (#13491) --- docs/src/release-notes-csharp.md | 34 +++++++++++++++++++ docs/src/release-notes-java.md | 33 ++++++++++++++++++ docs/src/release-notes-js.md | 58 ++++++++++++++++++++++++++++++++ docs/src/release-notes-python.md | 40 ++++++++++++++++++++++ 4 files changed, 165 insertions(+) diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.md index 87b811bbbf..7fe64a4820 100644 --- a/docs/src/release-notes-csharp.md +++ b/docs/src/release-notes-csharp.md @@ -5,6 +5,40 @@ title: "Release notes" +## Version 1.21 + +### Highlights + +- New **experimental** role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). + + ```csharp + // Click a button with accessible name "log in" + await page.ClickAsync("role=button[name='log in']") + ``` + + To use role selectors, make sure to pass `PLAYWRIGHT_EXPERIMENTAL_FEATURES=1` environment variable. + + Read more in [our documentation](./selectors#role-selector). +- New `scale` option in [`method: Page.screenshot`] for smaller sized screenshots. +- New `caret` option in [`method: Page.screenshot`] to control text caret. Defaults to `"hide"`. +- We now ship a designated .NET docker image `mcr.microsoft.com/playwright/dotnet`. Read more in [our documentation](./docker). + +### Behavior Changes + +- Playwright now supports large file uploads (100s of MBs) via [`method: Locator.setInputFiles`] API. + +### Browser Versions + +- Chromium 101.0.4951.26 +- Mozilla Firefox 98.0.2 +- WebKit 15.4 + +This version was also tested against the following stable channels: + +- Google Chrome 100 +- Microsoft Edge 100 + + ## Version 1.20 ### Web-First Assertions diff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.md index 02ace73f88..071f115b34 100644 --- a/docs/src/release-notes-java.md +++ b/docs/src/release-notes-java.md @@ -5,6 +5,39 @@ title: "Release notes" +## Version 1.21 + +### Highlights + +- New **experimental** role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). + + ```java + // Click a button with accessible name "log in" + page.click("role=button[name='log in']") + ``` + + To use role selectors, make sure to pass `PLAYWRIGHT_EXPERIMENTAL_FEATURES=1` environment variable. + + Read more in [our documentation](./selectors#role-selector). +- New `scale` option in [`method: Page.screenshot`] for smaller sized screenshots. +- New `caret` option in [`method: Page.screenshot`] to control text caret. Defaults to `"hide"`. + +### Behavior Changes + +- Playwright now supports large file uploads (100s of MBs) via [`method: Locator.setInputFiles`] API. + +### Browser Versions + +- Chromium 101.0.4951.26 +- Mozilla Firefox 98.0.2 +- WebKit 15.4 + +This version was also tested against the following stable channels: + +- Google Chrome 100 +- Microsoft Edge 100 + + ## Version 1.20 ### Highlights diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.md index 3f05b46de7..4d937120e6 100644 --- a/docs/src/release-notes-js.md +++ b/docs/src/release-notes-js.md @@ -5,6 +5,64 @@ title: "Release notes" +## Version 1.21 + +### Highlights + +- New **experimental** role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). + + ```js + // Click a button with accessible name "log in" + await page.click('role=button[name="log in"]') + ``` + + To use role selectors, make sure to pass `PLAYWRIGHT_EXPERIMENTAL_FEATURES=1` environment variable: + + ```js + // playwright.config.js + process.env.PLAYWRIGHT_EXPERIMENTAL_FEATURES = '1'; + module.exports = { + /* ... */ + }; + ``` + + Read more in [our documentation](./selectors#role-selector). +- New `scale` option in [`method: Page.screenshot`] for smaller sized screenshots. +- New `caret` option in [`method: Page.screenshot`] to control text caret. Defaults to `"hide"`. + +- New method `expect.poll` to wait for an arbitrary condition: + + ```js + // Poll the method until it returns an expected result. + await expect.poll(async () => { + const response = await page.request.get('https://api.example.com'); + return response.status(); + }).toBe(200); + ``` + + `expect.poll` supports most synchronous matchers, like `.toBe()`, `.toContain()`, etc. + Read more in [our documentation](./test-assertions.md#polling). + +### Behavior Changes + +- ESM support when running TypeScript tests is now enabled by default. The `PLAYWRIGHT_EXPERIMENTAL_TS_ESM` env variable is + no longer required. +- The `mcr.microsoft.com/playwright` docker image no longer contains Python. Please use `mcr.microsoft.com/playwright/python` + as a Playwright-ready docker image with pre-installed Python. +- Playwright now supports large file uploads (100s of MBs) via [`method: Locator.setInputFiles`] API. + +### Browser Versions + +- Chromium 101.0.4951.26 +- Mozilla Firefox 98.0.2 +- WebKit 15.4 + +This version was also tested against the following stable channels: + +- Google Chrome 100 +- Microsoft Edge 100 + + ## Version 1.20 ### Highlights diff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.md index 020d8c2ab8..6792fa1f88 100644 --- a/docs/src/release-notes-python.md +++ b/docs/src/release-notes-python.md @@ -5,6 +5,46 @@ title: "Release notes" +## Version 1.21 + +### Highlights + +- New **experimental** role selectors that allow selecting elements by their [ARIA role](https://www.w3.org/TR/wai-aria-1.2/#roles), [ARIA attributes](https://www.w3.org/TR/wai-aria-1.2/#aria-attributes) and [accessible name](https://w3c.github.io/accname/#dfn-accessible-name). + + ```python async + # Click a button with accessible name "log in" + await page.click("role=button[name='log in']") + ``` + + ```python sync + # Click a button with accessible name "log in" + page.click("role=button[name='log in']") + ``` + + To use role selectors, make sure to pass `PLAYWRIGHT_EXPERIMENTAL_FEATURES=1` environment variable. + + Read more in [our documentation](./selectors#role-selector). +- New `scale` option in [`method: Page.screenshot`] for smaller sized screenshots. +- New `caret` option in [`method: Page.screenshot`] to control text caret. Defaults to `"hide"`. + +### Behavior Changes + +- The `mcr.microsoft.com/playwright` docker image no longer contains Python. Please use `mcr.microsoft.com/playwright/python` + as a Playwright-ready docker image with pre-installed Python. +- Playwright now supports large file uploads (100s of MBs) via [`method: Locator.setInputFiles`] API. + +### Browser Versions + +- Chromium 101.0.4951.26 +- Mozilla Firefox 98.0.2 +- WebKit 15.4 + +This version was also tested against the following stable channels: + +- Google Chrome 100 +- Microsoft Edge 100 + + ## Version 1.20 ### Highlights