docs: fix locator screenshot examples (#10794)

This commit is contained in:
Yury Semikhatsky 2021-12-08 12:38:59 -08:00 committed by GitHub
parent 2e956aa0d1
commit e9d0b5ee1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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" });
```