docs: fix java auth example (#8155)

Fixes #8153
This commit is contained in:
Yury Semikhatsky 2021-08-12 01:49:56 -07:00 committed by GitHub
parent 44cdda43fe
commit 1f168bd9c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -110,7 +110,7 @@ const context = await browser.newContext({ storageState: 'state.json' });
```java
// Save storage state into the file.
context.storageState(new BrowserContext.StorageStateOptions().setPath("state.json"));
context.storageState(new BrowserContext.StorageStateOptions().setPath(Paths.get("state.json")));
// Create a new context with the saved storage state.
BrowserContext context = browser.newContext(