mirror of
https://github.com/microsoft/playwright.git
synced 2025-06-26 21:40:17 +00:00
docs: fix locator screenshot examples (#10794)
This commit is contained in:
parent
2e956aa0d1
commit
e9d0b5ee1d
@ -83,7 +83,7 @@ await page.locator('.header').screenshot({ path: 'screenshot.png' });
|
|||||||
```
|
```
|
||||||
|
|
||||||
```java
|
```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
|
```python async
|
||||||
@ -95,5 +95,5 @@ page.locator(".header").screenshot(path="screenshot.png")
|
|||||||
```
|
```
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
await page.Locator(".header").ScreenshotAsync(new ElementHandleScreenshotOptions { Path = "screenshot.png" });
|
await page.Locator(".header").ScreenshotAsync(new LocatorScreenshotOptions { Path = "screenshot.png" });
|
||||||
```
|
```
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user