Skip to content

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

docs: use encodeToString instead of encode in examples (#27297)

Yury Semikhatsky3ea03c9f4cce
diff --git a/docs/src/screenshots.md b/docs/src/screenshots.md
index b9a9296405..bbc9b5c2e2 100644
--- a/docs/src/screenshots.md
+++ b/docs/src/screenshots.md
@@ -75,7 +75,7 @@ console.log(buffer.toString('base64'));
```java
byte[] buffer = page.screenshot();
-System.out.println(Base64.getEncoder().encode(buffer));
+System.out.println(Base64.getEncoder().encodeToString(buffer));
```
```python async