docs: change StorageState type to string in java and C# (#5268)

This commit is contained in:
Yury Semikhatsky 2021-02-02 17:48:32 -08:00 committed by GitHub
parent 1a464c732c
commit 4cd0d3e5da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 6 deletions

View File

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

View File

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

View File

@ -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
types/types.d.ts vendored
View File

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