docs: release notes for 1.21 (#13491)
This commit is contained in:
parent
0f6638190e
commit
52e326abd1
|
|
@ -5,6 +5,40 @@ title: "Release notes"
|
|||
|
||||
<!-- TOC -->
|
||||
|
||||
## 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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,39 @@ title: "Release notes"
|
|||
|
||||
<!-- TOC -->
|
||||
|
||||
## 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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,64 @@ title: "Release notes"
|
|||
|
||||
<!-- TOC -->
|
||||
|
||||
## 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
|
||||
|
|
|
|||
|
|
@ -5,6 +5,46 @@ title: "Release notes"
|
|||
|
||||
<!-- TOC -->
|
||||
|
||||
## 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue