From 8a9692e2c5107cdba4de3ceaa416446bc7a14858 Mon Sep 17 00:00:00 2001
From: Playwright Service <89237858+playwrightmachine@users.noreply.github.com>
Date: Fri, 16 Dec 2022 09:19:35 -0800
Subject: [PATCH] chery-pick(#19507): docs: fix HTML snippets (#19508)
This PR cherry-picks the following commits:
- ba8a6c4b086f1cf6caa2107ee19764931beee85f
---
docs/src/locators.md | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/docs/src/locators.md b/docs/src/locators.md
index 20f941b4f0..422d468e7f 100644
--- a/docs/src/locators.md
+++ b/docs/src/locators.md
@@ -815,7 +815,7 @@ Consider the following DOM structure where we want to click on the buy button of
Product 2
-
+
```
### Filter by text
@@ -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();
```
@@ -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();
```
@@ -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();
```
@@ -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);
```