docs: release notes for v1.40 (#28175)

This commit is contained in:
Dmitry Gozman 2023-11-15 18:38:43 -08:00 committed by GitHub
parent 25b9c4eb4a
commit aec4399d8f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 183 additions and 0 deletions

View file

@ -4,6 +4,50 @@ title: "Release notes"
toc_max_heading_level: 2
---
## Version 1.40
### Test Generator Update
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
New tools to generate assertions:
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
Here is an example of a generated test with assertions:
```csharp
await Page.GotoAsync("https://playwright.dev/");
await Page.GetByRole(AriaRole.Link, new() { Name = "Get started" }).ClickAsync();
await Expect(Page.GetByLabel("Breadcrumbs").GetByRole(AriaRole.List)).ToContainTextAsync("Installation");
await Expect(Page.GetByLabel("Search")).ToBeVisibleAsync();
await Page.GetByLabel("Search").ClickAsync();
await Page.GetByPlaceholder("Search docs").FillAsync("locator");
await Expect(Page.GetByPlaceholder("Search docs")).ToHaveValueAsync("locator");
```
### New APIs
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
### Other Changes
- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
- Playwright [docker image](./docker.md) now comes with Node.js v20.
### Browser Versions
* Chromium 120.0.6099.28
* Mozilla Firefox 119.0
* WebKit 17.4
This version was also tested against the following stable channels:
* Google Chrome 119
* Microsoft Edge 119
## Version 1.39
Evergreen browsers update.

View file

@ -4,6 +4,50 @@ title: "Release notes"
toc_max_heading_level: 2
---
## Version 1.40
### Test Generator Update
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
New tools to generate assertions:
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
Here is an example of a generated test with assertions:
```java
page.navigate("https://playwright.dev/");
page.getByRole(AriaRole.LINK, new Page.GetByRoleOptions().setName("Get started")).click();
assertThat(page.getByLabel("Breadcrumbs").getByRole(AriaRole.LIST)).containsText("Installation");
assertThat(page.getByLabel("Search")).isVisible();
page.getByLabel("Search").click();
page.getByPlaceholder("Search docs").fill("locator");
assertThat(page.getByPlaceholder("Search docs")).hasValue("locator");
```
### New APIs
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
### Other Changes
- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
- Playwright [docker image](./docker.md) now comes with Node.js v20.
### Browser Versions
* Chromium 120.0.6099.28
* Mozilla Firefox 119.0
* WebKit 17.4
This version was also tested against the following stable channels:
* Google Chrome 119
* Microsoft Edge 119
## Version 1.39
Evergreen browsers update.

View file

@ -6,6 +6,54 @@ toc_max_heading_level: 2
import LiteYouTube from '@site/src/components/LiteYouTube';
## Version 1.40
### Test Generator Update
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
New tools to generate assertions:
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
Here is an example of a generated test with assertions:
```js
import { test, expect } from '@playwright/test';
test('test', async ({ page }) => {
await page.goto('https://playwright.dev/');
await page.getByRole('link', { name: 'Get started' }).click();
await expect(page.getByLabel('Breadcrumbs').getByRole('list')).toContainText('Installation');
await expect(page.getByLabel('Search')).toBeVisible();
await page.getByLabel('Search').click();
await page.getByPlaceholder('Search docs').fill('locator');
await expect(page.getByPlaceholder('Search docs')).toHaveValue('locator');
});
```
### New APIs
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
### Other Changes
- Methods [`method: Download.path`] and [`method: Download.createReadStream`] throw an error for failed and cancelled downloads.
- Playwright [docker image](./docker.md) now comes with Node.js v20.
### Browser Versions
* Chromium 120.0.6099.28
* Mozilla Firefox 119.0
* WebKit 17.4
This version was also tested against the following stable channels:
* Google Chrome 119
* Microsoft Edge 119
## Version 1.39
<LiteYouTube

View file

@ -4,6 +4,53 @@ title: "Release notes"
toc_max_heading_level: 2
---
## Version 1.40
### Test Generator Update
![Playwright Test Generator](https://github.com/microsoft/playwright/assets/9881434/8c3d6fac-5381-4aaf-920f-6e22b964eec6)
New tools to generate assertions:
- "Assert visibility" tool generates [`method: LocatorAssertions.toBeVisible`].
- "Assert value" tool generates [`method: LocatorAssertions.toHaveValue`].
- "Assert text" tool generates [`method: LocatorAssertions.toContainText`].
Here is an example of a generated test with assertions:
```python
from playwright.sync_api import Page, expect
def test_example(page: Page) -> None:
page.goto("https://playwright.dev/")
page.get_by_role("link", name="Get started").click()
expect(page.get_by_label("Breadcrumbs").get_by_role("list")).to_contain_text("Installation")
expect(page.get_by_label("Search")).to_be_visible()
page.get_by_label("Search").click()
page.get_by_placeholder("Search docs").fill("locator")
expect(page.get_by_placeholder("Search docs")).to_have_value("locator");
```
### New APIs
- Option [`option: reason`] in [`method: Page.close`], [`method: BrowserContext.close`] and [`method: Browser.close`]. Close reason is reported for all operations interrupted by the closure.
- Option [`option: firefoxUserPrefs`] in [`method: BrowserType.launchPersistentContext`].
### Other Changes
- Method [`method: Download.path`] throws an error for failed and cancelled downloads.
- Playwright [docker image](./docker.md) now comes with Node.js v20.
### Browser Versions
* Chromium 120.0.6099.28
* Mozilla Firefox 119.0
* WebKit 17.4
This version was also tested against the following stable channels:
* Google Chrome 119
* Microsoft Edge 119
## Version 1.39
Evergreen browsers update.