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: release notes for v1.27 (#17858)
Dmitry Gozmancdeb9e306663
diff --git a/docs/src/release-notes-js.md b/docs/src/release-notes-js.mdindex b1144aac65..1d7dda92d7 100644--- a/docs/src/release-notes-js.md+++ b/docs/src/release-notes-js.md@@ -4,17 +4,69 @@ title: "Release notes"toc_max_heading_level: 2----## Version 1.26+## Version 1.27++### Locators++With these new APIs writing locators is a joy:+- [`method: Page.getByText`] to locate by text content.+- [`method: Page.getByRole`] to locate by [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).+- [`method: Page.getByLabel`] to locate a form control by associated label's text.+- [`method: Page.getByPlaceholder`] to locate an input by placeholder.+- [`method: Page.getByAltText`] to locate an element, usually image, by its text alternative.+- [`method: Page.getByTitle`] to locate an element by its title.++```js+await page.getByLabel('User Name').fill('John');++await page.getByLabel('Password').fill('secret-password');++await page.getByRole('button', { name: 'Sign in' }).click();++await expect(page.getByText('Welcome, John!')).toBeVisible();+```++All the same methods are also available on [Locator], [FrameLocator] and [Frame] classes.++### Other highlights++- `workers` option in the `playwright.config.ts` now accepts a percentage string to use some of the available CPUs. You can also pass it in the command line:+ ```bash+ npx playwright test --workers=20%+ ```-### (Experimental) Docker integration+- New options `host` and `port` for the html reporter.+ ```js+ reporters: [['html', { host: 'localhost', port: '9223' }]]+ ```++- New field `FullConfig.configFile` is available to test reporters, specifying the path to the config file if any.++- As announced in v1.25, Ubuntu 18 will not be supported as of Dec 2022. In addition to that, there will be no WebKit updates on Ubuntu 18 starting from the next Playwright release.-Playwright Test now ships an **experimental** Docker integration. The Docker container provides a consistent environment, eliminating browser rendering differences across platforms.+### Behavior Changes++- [`method: LocatorAssertions.toHaveAttribute`] with an empty value does not match missing attribute anymore. For example, the following snippet will succeed when `button` **does not** have a `disabled` attribute.-With this integration, only **browser binaries** are running inside a Docker container, while all the code is still running on the host operating system.+ ```js+ await expect(page.getByRole('button')).toHaveAttribute('disabled', '');+ ```-<img width="450px" src="https://user-images.githubusercontent.com/746130/189774482-fd65d4ce-7b45-46c8-8761-36b76dba4671.png" />+- Command line options `--grep` and `--grep-invert` previously incorrectly ignored `grep` and `grepInvert` options specified in the config. Now all of them are applied together.++### Browser Versions-Read more in [our documentation](./docker#experimental-playwright-test-docker-integration).+* Chromium 107.0.5304.18+* Mozilla Firefox 105.0.1+* WebKit 16.0++This version was also tested against the following stable channels:++* Google Chrome 106+* Microsoft Edge 106+++## Version 1.26### Assertions@@ -41,7 +93,7 @@ await page.goto('https://playwright.dev', {```Prior to 1.26, this would wait for all iframes to fire the `DOMContentLoaded`-event.+event.To align with web specification, the `'domcontentloaded'` value only waits forthe target frame to fire the `'DOMContentLoaded'` event. Use `waitUntil: 'load'` to wait for all iframes.@@ -151,7 +203,7 @@ if you encounter any issues!Linux support looks like this:| | Ubuntu 18.04 | Ubuntu 20.04 | Ubuntu 22.04 | Debian 11-| :--- | :---: | :---: | :---: | :---: |+| :--- | :---: | :---: | :---: | :---: || Chromium | ✅ | ✅ | ✅ | ✅ || WebKit | ✅ | ✅ | ✅ | ✅ || Firefox | ✅ | ✅ | ✅ | ✅ |@@ -174,7 +226,7 @@ test.describe(() => {});```-### 🧩 Component Tests Update+### 🧩 Component Tests UpdatePlaywright 1.24 Component Tests introduce `beforeMount` and `afterMount` hooks.Use these to configure your app for tests.