Skip to content

Commit

Permalink
Showing 4 changed files with 33 additions and 6 deletions.
12 changes: 10 additions & 2 deletions docs/src/api/class-browser.md
Original file line number Diff line number Diff line change
@@ -132,7 +132,11 @@ page.goto("https://example.com")

### option: Browser.newContext.proxy = %%-context-option-proxy-%%

### option: Browser.newContext.storageState = %%-context-option-storage-state-%%
### option: Browser.newContext.storageState = %%-js-python-context-option-storage-state-%%

### option: Browser.newContext.storageState = %%-csharp-java-context-option-storage-state-%%

### option: Browser.newContext.storageStatePath = %%-csharp-java-context-option-storage-state-path-%%

## async method: Browser.newPage
- returns: <[Page]>
@@ -147,7 +151,11 @@ testing frameworks should explicitly create [`method: Browser.newContext`] follo

### option: Browser.newPage.proxy = %%-context-option-proxy-%%

### option: Browser.newPage.storageState = %%-context-option-storage-state-%%
### option: Browser.newPage.storageState = %%-js-python-context-option-storage-state-%%

### option: Browser.newPage.storageState = %%-csharp-java-context-option-storage-state-%%

### option: Browser.newPage.storageStatePath = %%-csharp-java-context-option-storage-state-path-%%

## method: Browser.version
- returns: <[string]>
4 changes: 4 additions & 0 deletions docs/src/api/class-browsercontext.md
Original file line number Diff line number Diff line change
@@ -712,6 +712,10 @@ Whether to emulate network being offline for the browser context.

Returns storage state for this browser context, contains current cookies and local storage snapshot.

## async method: BrowserContext.storageState
* langs: charp, java
- returns: <[string]>

### option: BrowserContext.storageState.path
- `path` <[path]>

19 changes: 17 additions & 2 deletions docs/src/api/params.md
Original file line number Diff line number Diff line change
@@ -143,7 +143,8 @@ Specify environment variables that will be visible to the browser. Defaults to `

Specify environment variables that will be visible to the browser. Defaults to `process.env`.

## context-option-storage-state
## js-python-context-option-storage-state
* langs: js, python
- `storageState` <[path]|[Object]>
- `cookies` <[Array]<[Object]>> Optional cookies to set for context
- `name` <[string]>
@@ -161,9 +162,23 @@ Specify environment variables that will be visible to the browser. Defaults to `
- `name` <[string]>
- `value` <[string]>

Populates context with given storage state. This method can be used to initialize context with logged-in information
Populates context with given storage state. This option can be used to initialize context with logged-in information
obtained via [`method: BrowserContext.storageState`]. Either a path to the file with saved storage, or an object with the following fields:

## csharp-java-context-option-storage-state
* langs: csharp, java
- `storageState` <[string]>

Populates context with given storage state. This option can be used to initialize context with logged-in information
obtained via [`method: BrowserContext.storageState`].

## csharp-java-context-option-storage-state-path
* langs: csharp, java
- `storageStatePath` <[path]>

Populates context with given storage state. This option can be used to initialize context with logged-in information
obtained via [`method: BrowserContext.storageState`]. Path to the file with saved storage state.

## context-option-acceptdownloads
- `acceptDownloads` <[boolean]>

4 changes: 2 additions & 2 deletions types/types.d.ts
Original file line number Diff line number Diff line change
@@ -7431,7 +7431,7 @@ export interface Browser extends EventEmitter {
};

/**
* Populates context with given storage state. This method can be used to initialize context with logged-in information
* Populates context with given storage state. This option can be used to initialize context with logged-in information
* obtained via
* [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browsercontextstoragestateoptions).
* Either a path to the file with saved storage, or an object with the following fields:
@@ -9506,7 +9506,7 @@ export interface BrowserContextOptions {
};

/**
* Populates context with given storage state. This method can be used to initialize context with logged-in information
* Populates context with given storage state. This option can be used to initialize context with logged-in information
* obtained via
* [browserContext.storageState([options])](https://playwright.dev/docs/api/class-browsercontext#browsercontextstoragestateoptions).
* Either a path to the file with saved storage, or an object with the following fields:

0 comments on commit 4cd0d3e

Please sign in to comment.