Skip to content

Commit 75aaaac

Browse files
chery-pick(#17918): docs: AriaRole is enum (#17921)
This PR cherry-picks the following commits: - 946994c Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
1 parent af0d293 commit 75aaaac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/release-notes-java.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ page.getByLabel("User Name").fill("John");
2121

2222
page.getByLabel("Password").fill("secret-password");
2323

24-
page.getByRole("button", new Page.GetByRoleOptions().setName("Sign in")).click();
24+
page.getByRole(AriaRole.BUTTON, new Page.GetByRoleOptions().setName("Sign in")).click();
2525

2626
assertThat(page.getByText("Welcome, John!")).isVisible();
2727
```
@@ -37,7 +37,7 @@ All the same methods are also available on [Locator], [FrameLocator] and [Frame]
3737
- [`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.
3838

3939
```js
40-
assertThat(page.getByRole("button")).hasAttribute("disabled", "");
40+
assertThat(page.getByRole(AriaRole.BUTTON)).hasAttribute("disabled", "");
4141
```
4242

4343
### Browser Versions

0 commit comments

Comments
 (0)