Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
TypeScript automationchromechromiume2e-testingelectronend-to-end-testingfirefoxjavascriptplaywrighttesttest-automationtestingtesting-toolswebwebkit
docs: add release notes for 1.22 (#14100)
Andrey Lushnikov5268dd7196dd
diff --git a/docs/src/release-notes-csharp.md b/docs/src/release-notes-csharp.mdindex 40bfd07506..1b582d2c0f 100644--- a/docs/src/release-notes-csharp.md+++ b/docs/src/release-notes-csharp.md@@ -5,6 +5,28 @@ title: "Release notes"<!-- TOC -->+## Version 1.22++### Highlights++- 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']")+ ```++ Read more in [our documentation](./selectors#role-selector).++- New [`method: Locator.filter`] API to filter an existing locator++ ```csharp+ var buttons = page.Locator("role=button");+ // ...+ var submitLocator = buttons.Filter(new LocatorFilterOptions { HasText = "Sign up" });+ await submitLocator.ClickAsync();+ ```+## Version 1.21### Highlightsdiff --git a/docs/src/release-notes-java.md b/docs/src/release-notes-java.mdindex a77252035c..db54b38b6e 100644--- a/docs/src/release-notes-java.md+++ b/docs/src/release-notes-java.md@@ -5,6 +5,32 @@ title: "Release notes"<!-- TOC -->+## Version 1.22++### Highlights++- 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']")+ ```++ Read more in [our documentation](./selectors#role-selector).++- New [`method: Locator.filter`] API to filter an existing locator++ ```java+ Locator buttonsLocator = page.locator("role=button");+ // ...+ Locator submitButton = buttonsLocator.filter(new Locator.FilterOptions().setHasText("Submit"));+ submitButton.click();+ ```++- Playwright for Java now supports **Ubuntu 20.04 ARM64** and **Apple M1**.+ You can now run Playwright for Java tests on Apple M1, inside Docker on Apple M1, and on Raspberry Pi.++## Version 1.21### Highlightsdiff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.mdindex cd9ca57885..0c3c2ce61c 100644--- a/docs/src/release-notes-js.md+++ b/docs/src/release-notes-js.md@@ -5,6 +5,76 @@ title: "Release notes"<!-- TOC -->+## Version 1.22++### Highlights++- Components Testing (preview)++ Playwright Test can now test your [React](https://reactjs.org/),+ [Vue.js](https://vuejs.org/) or [Svelte](https://svelte.dev/) components.+ You can use all the features+ of Playwright Test (such as parallelization, emulation & debugging) while running components+ in real browsers.++ Here is what a typical component test looks like:++ ```ts+ // App.spec.tsx+ import { test, expect } from '@playwright/experimental-ct-react';+ import App from './App';++ // Let's test component in a dark scheme!+ test.use({ colorScheme: 'dark' });++ test('should render', async ({ mount }) => {+ const component = await mount(<App></App>);++ // As with any Playwright test, assert locator text.+ await expect(component).toContainText('React');+ // Or do a screenshot 🚀+ await expect(component).toHaveScreenshot();+ // Or use any Playwright method+ await component.click();+ });+ ```++ Read more in [our documentation](./test-components).++- 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"]')+ ```++ Read more in [our documentation](./selectors#role-selector).++- New [`method: Locator.filter`] API to filter an existing locator++ ```js+ const buttons = page.locator('role=button');+ // ...+ const submitButton = buttons.filter({ hasText: 'Submit' });+ await submitButton.click();+ ```++- New web-first assertions [`method: PageAssertions.toHaveScreenshot`] and [`method: LocatorAssertions.toHaveScreenshot`] that+ wait for screenshot stabilization and enhances test reliability.++ The new assertions has screenshot-specific defaults, such as:+ * disables animations+ * uses CSS scale option++ ```js+ await page.goto('https://playwright.dev');+ await expect(page).toHaveScreenshot();+ ```++ The new [`method: PageAssertions.toHaveScreenshot`] saves screenshots at the same+ location as [`method: ScreenshotAssertions.toMatchSnapshot#1`].++## Version 1.21### Highlightsdiff --git a/docs/src/release-notes-python.md b/docs/src/release-notes-python.mdindex 650368ffc1..fe4072d1a5 100644--- a/docs/src/release-notes-python.md+++ b/docs/src/release-notes-python.md@@ -5,6 +5,34 @@ title: "Release notes"<!-- TOC -->+## Version 1.22++### Highlights++- 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).++ ```py+ # Click a button with accessible name "log in"+ page.click("role=button[name='log in']")+ ```++ Read more in [our documentation](./selectors#role-selector).++- New [`method: Locator.filter`] API to filter an existing locator++ ```py+ buttons = page.locator("role=button")+ # ...+ submit_button = buttons.filter(has_text="Submit")+ submit_button.click()+ ```++- Codegen now supports generating Pytest Tests++ +++## Version 1.21### Highlights