diff --git a/docs/src/auth.md b/docs/src/auth.md index 48fe2d7544..4ca67b34a6 100644 --- a/docs/src/auth.md +++ b/docs/src/auth.md @@ -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(