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 Java locator screenshot example (#38443)

Ran Meng7f94bfbabf7d
diff --git a/docs/src/locators.md b/docs/src/locators.md
index 2f62ff3b56..4896ae5b29 100644
--- a/docs/src/locators.md
+++ b/docs/src/locators.md
@@ -1611,7 +1611,7 @@ rowLocator
.setHas(page.getByRole(
AriaRole.BUTTON,
new Page.GetByRoleOptions().setName("Say goodbye"))))
- .screenshot(new Page.ScreenshotOptions().setPath("screenshot.png"));
+ .screenshot(new Locator.ScreenshotOptions().setPath(Paths.get("screenshot.png")));
```
```csharp