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 locator screenshot examples (#10794)

Yury Semikhatskye9d0b5ee1d65
diff --git a/docs/src/screenshots.md b/docs/src/screenshots.md
index 62cdf56427..e7efe050ac 100644
--- a/docs/src/screenshots.md
+++ b/docs/src/screenshots.md
@@ -83,7 +83,7 @@ await page.locator('.header').screenshot({ path: 'screenshot.png' });
```
```java
-page.locator(".header").screenshot(new ElementHandle.ScreenshotOptions().setPath(Paths.get("screenshot.png")));
+page.locator(".header").screenshot(new Locator.ScreenshotOptions().setPath(Paths.get("screenshot.png")));
```
```python async
@@ -95,5 +95,5 @@ page.locator(".header").screenshot(path="screenshot.png")
```
```csharp
-await page.Locator(".header").ScreenshotAsync(new ElementHandleScreenshotOptions { Path = "screenshot.png" });
+await page.Locator(".header").ScreenshotAsync(new LocatorScreenshotOptions { Path = "screenshot.png" });
```