This PR cherry-picks the following commits:
- 946994ca92
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
af0d2936ac
commit
75aaaac3eb
|
|
@ -21,7 +21,7 @@ page.getByLabel("User Name").fill("John");
|
||||||
|
|
||||||
page.getByLabel("Password").fill("secret-password");
|
page.getByLabel("Password").fill("secret-password");
|
||||||
|
|
||||||
page.getByRole("button", new Page.GetByRoleOptions().setName("Sign in")).click();
|
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Sign in")).click();
|
||||||
|
|
||||||
assertThat(page.getByText("Welcome, John!")).isVisible();
|
assertThat(page.getByText("Welcome, John!")).isVisible();
|
||||||
```
|
```
|
||||||
|
|
@ -37,7 +37,7 @@ All the same methods are also available on [Locator], [FrameLocator] and [Frame]
|
||||||
- [`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.
|
- [`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
|
```js
|
||||||
assertThat(page.getByRole("button")).hasAttribute("disabled", "");
|
assertThat(page.getByRole(AriaRole.BUTTON)).hasAttribute("disabled", "");
|
||||||
```
|
```
|
||||||
|
|
||||||
### Browser Versions
|
### Browser Versions
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue