Skip to content

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.

docs: fix compilation errors in locator filtering code snippet (#38488)

Ran Meng88567c416fb9
diff --git a/docs/src/locators.md b/docs/src/locators.md
index 8e22965c5f..dc59495729 100644
--- a/docs/src/locators.md
+++ b/docs/src/locators.md
@@ -942,10 +942,10 @@ await page
```java
page.getByRole(AriaRole.LISTITEM)
.filter(new Locator.FilterOptions()
- .setHas(page.GetByRole(AriaRole.HEADING, new Page.GetByRoleOptions()
+ .setHas(page.getByRole(AriaRole.HEADING, new Page.GetByRoleOptions()
.setName("Product 2"))))
.getByRole(AriaRole.BUTTON,
- new Page.GetByRoleOptions().setName("Add to cart"))
+ new Locator.GetByRoleOptions().setName("Add to cart"))
.click();
```