Skip to content

Commit

Permalink
chery-pick(#18884): docs(locator): code snippet fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Nov 17, 2022
1 parent af17071 commit d39040d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/locators.md
Expand Up @@ -99,7 +99,7 @@ page.get_by_role("button", name="Sign in").click()
```

```csharp
await page.GetByRole(AriaRole.BUTTON, new() { NameString = "Sign in" }).ClickAsync();
await page.GetByRole(AriaRole.Button, new() { NameString = "Sign in" }).ClickAsync();
```

:::tip
Expand Down Expand Up @@ -248,7 +248,7 @@ await Expect(page
.ToBeVisibleAsync();

await page
.GetByRole(AriaRole.Ceckbox, new() { NameString = "Subscribe" })
.GetByRole(AriaRole.Checkbox, new() { NameString = "Subscribe" })
.CheckAsync();

await page
Expand Down Expand Up @@ -1023,7 +1023,7 @@ product.get_by_role("button", name="Add to cart").click()

```java
Locator product = page
.get_by_role("listitem")
.getByRole(AriaRole.LISTITEM)
.filter(new Locator.FilterOptions().setHasText("Product 2"));

product
Expand Down

0 comments on commit d39040d

Please sign in to comment.