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

Fixes https://github.com/microsoft/playwright/issues/27273
This commit is contained in:
Yury Semikhatsky 2023-09-25 14:57:58 -07:00 committed by GitHub
parent 9a5356f93b
commit 3ea03c9f4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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