Skip to content

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

docs(locators): Fix wrong python api usage (#39524)

WEGFan521739911961
diff --git a/docs/src/locators.md b/docs/src/locators.md
index a556162368..3a6a5de389 100644
--- a/docs/src/locators.md
+++ b/docs/src/locators.md
@@ -1207,10 +1207,10 @@ const button = page.getByRole('button').and(page.getByTitle('Subscribe'));
Locator button = page.getByRole(AriaRole.BUTTON).and(page.getByTitle("Subscribe"));
```
```python async
-button = page.get_by_role("button").and_(page.getByTitle("Subscribe"))
+button = page.get_by_role("button").and_(page.get_by_title("Subscribe"))
```
```python sync
-button = page.get_by_role("button").and_(page.getByTitle("Subscribe"))
+button = page.get_by_role("button").and_(page.get_by_title("Subscribe"))
```
```csharp
var button = page.GetByRole(AriaRole.Button).And(page.GetByTitle("Subscribe"));