cherry-pick(#17886): docs: v1.27 release notes for python, java and dotnet
This commit is contained in:
parent
299bceaada
commit
b85b1ec6a0
|
|
@ -4,6 +4,54 @@ title: "Release notes"
|
|||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
## 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.
|
||||
|
||||
```csharp
|
||||
await page.GetByLabel("User Name").FillAsync("John");
|
||||
|
||||
await page.GetByLabel("Password").FillAsync("secret-password");
|
||||
|
||||
await page.GetByRole("button", new() { Name = "Sign in" }).ClickAsync();
|
||||
|
||||
await Expect(page.GetByText("Welcome, John!")).ToBeVisibleAsync();
|
||||
```
|
||||
|
||||
All the same methods are also available on [Locator], [FrameLocator] and [Frame] classes.
|
||||
|
||||
### Other highlights
|
||||
|
||||
- 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.
|
||||
|
||||
### 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.
|
||||
|
||||
```js
|
||||
await Expect(page.GetByRole("button")).ToHaveAttribute("disabled", "");
|
||||
```
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -4,6 +4,54 @@ title: "Release notes"
|
|||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
## 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.
|
||||
|
||||
```java
|
||||
page.getByLabel("User Name").fill("John");
|
||||
|
||||
page.getByLabel("Password").fill("secret-password");
|
||||
|
||||
page.getByRole("button", new Page.GetByRoleOptions().setName("Sign in")).click();
|
||||
|
||||
assertThat(page.getByText("Welcome, John!")).isVisible();
|
||||
```
|
||||
|
||||
All the same methods are also available on [Locator], [FrameLocator] and [Frame] classes.
|
||||
|
||||
### Other highlights
|
||||
|
||||
- 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.
|
||||
|
||||
### 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.
|
||||
|
||||
```js
|
||||
assertThat(page.getByRole("button")).hasAttribute("disabled", "");
|
||||
```
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* 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
|
||||
|
|
|
|||
|
|
@ -4,6 +4,54 @@ title: "Release notes"
|
|||
toc_max_heading_level: 2
|
||||
---
|
||||
|
||||
## 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.
|
||||
|
||||
```python
|
||||
page.get_by_label("User Name").fill("John")
|
||||
|
||||
page.get_by_label("Password").fill("secret-password")
|
||||
|
||||
page.get_by_role("button", name="Sign in").click()
|
||||
|
||||
expect(page.get_by_text("Welcome, John!")).to_be_visible()
|
||||
```
|
||||
|
||||
All the same methods are also available on [Locator], [FrameLocator] and [Frame] classes.
|
||||
|
||||
### Other highlights
|
||||
|
||||
- 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.
|
||||
|
||||
### 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.
|
||||
|
||||
```js
|
||||
expect(page.get_by_role("button")).to_have_attribute("disabled", "")
|
||||
```
|
||||
|
||||
### Browser Versions
|
||||
|
||||
* 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
|
||||
|
|
|
|||
Loading…
Reference in a new issue