Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix HTML snippets #19507

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/src/locators.md
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ Consider the following DOM structure where we want to click on the buy button of
<h3>Product 2</h3>
<button>Add to cart</button>
</li>
<ul>
</ul>
```

### Filter by text
Expand Down Expand Up @@ -854,7 +854,7 @@ page.get_by_role("listitem").filter(has_text="Product 2").get_by_role(
await page
.GetByRole(AriaRole.Listitem)
.Filter(new() { HasText = "Product 2" })
.GetByRole(AriaRole.Button, new () { Name = "Add to cart" })
.GetByRole(AriaRole.Button, new() { Name = "Add to cart" })
.ClickAsync();
```

Expand Down Expand Up @@ -893,7 +893,7 @@ page.get_by_role("listitem").filter(has_text=re.compile("Product 2")).get_by_rol
await page
.GetByRole(AriaRole.Listitem)
.Filter(new() { HasTextRegex = new Regex("Product 2") })
.GetByRole(AriaRole.Button, new () { Name = "Add to cart" })
.GetByRole(AriaRole.Button, new() { Name = "Add to cart" })
.ClickAsync();
```

Expand Down Expand Up @@ -948,11 +948,11 @@ page.get_by_role("listitem").filter(
await page
.GetByRole(AriaRole.Listitem)
.Filter(new() {
Has = page.GetByRole(AriaRole.Heading, new () {
Has = page.GetByRole(AriaRole.Heading, new() {
Name = "Product 2"
})
})
.GetByRole(AriaRole.Button, new () { Name = "Add to cart" })
.GetByRole(AriaRole.Button, new() { Name = "Add to cart" })
.ClickAsync();
```

Expand Down Expand Up @@ -992,7 +992,7 @@ expect(
await Expect(page
.GetByRole(AriaRole.Listitem)
.Filter(new() {
Has = page.GetByRole(AriaRole.Heading, new () { Name = "Product 2" })
Has = page.GetByRole(AriaRole.Heading, new() { Name = "Product 2" })
})
.toHaveCountAsync(1);
```
Expand Down