parent
5996a0df0a
commit
cde807867c
|
|
@ -87,6 +87,18 @@ class BrowserTypeExamples
|
||||||
|
|
||||||
## async method: BrowserType.connect
|
## async method: BrowserType.connect
|
||||||
* since: v1.8
|
* since: v1.8
|
||||||
|
* langs: js
|
||||||
|
- returns: <[Browser]>
|
||||||
|
|
||||||
|
This method attaches Playwright to an existing browser instance created via [`method: BrowserType.launchServer`].
|
||||||
|
|
||||||
|
:::note
|
||||||
|
The major and minor version of the Playwright instance that connects needs to match the version of Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
||||||
|
:::
|
||||||
|
|
||||||
|
## async method: BrowserType.connect
|
||||||
|
* since: v1.8
|
||||||
|
* langs: python, csharp, java
|
||||||
- returns: <[Browser]>
|
- returns: <[Browser]>
|
||||||
|
|
||||||
This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
|
This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
|
||||||
|
|
@ -97,9 +109,17 @@ The major and minor version of the Playwright instance that connects needs to ma
|
||||||
|
|
||||||
### param: BrowserType.connect.wsEndpoint
|
### param: BrowserType.connect.wsEndpoint
|
||||||
* since: v1.10
|
* since: v1.10
|
||||||
|
* langs: js
|
||||||
- `wsEndpoint` <[string]>
|
- `wsEndpoint` <[string]>
|
||||||
|
|
||||||
A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
|
A Playwright browser websocket endpoint to connect to. You obtain this endpoint via [`method: BrowserServer.wsEndpoint`].
|
||||||
|
|
||||||
|
### param: BrowserType.connect.wsEndpoint
|
||||||
|
* since: v1.10
|
||||||
|
* langs: python, csharp, java
|
||||||
|
- `wsEndpoint` <[string]>
|
||||||
|
|
||||||
|
A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint` in Node.js.
|
||||||
|
|
||||||
### option: BrowserType.connect.headers
|
### option: BrowserType.connect.headers
|
||||||
* since: v1.11
|
* since: v1.11
|
||||||
|
|
|
||||||
12
packages/playwright-core/types/types.d.ts
vendored
12
packages/playwright-core/types/types.d.ts
vendored
|
|
@ -14603,12 +14603,14 @@ export interface BrowserType<Unused = {}> {
|
||||||
*/
|
*/
|
||||||
connectOverCDP(options: ConnectOverCDPOptions & { wsEndpoint?: string }): Promise<Browser>;
|
connectOverCDP(options: ConnectOverCDPOptions & { wsEndpoint?: string }): Promise<Browser>;
|
||||||
/**
|
/**
|
||||||
* This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
|
* This method attaches Playwright to an existing browser instance created via
|
||||||
|
* [browserType.launchServer([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server).
|
||||||
*
|
*
|
||||||
* **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
|
* **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
|
||||||
* Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
* Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
||||||
*
|
*
|
||||||
* @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
|
* @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via
|
||||||
|
* [browserServer.wsEndpoint()](https://playwright.dev/docs/api/class-browserserver#browser-server-ws-endpoint).
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
connect(wsEndpoint: string, options?: ConnectOptions): Promise<Browser>;
|
connect(wsEndpoint: string, options?: ConnectOptions): Promise<Browser>;
|
||||||
|
|
@ -14619,12 +14621,14 @@ export interface BrowserType<Unused = {}> {
|
||||||
* @deprecated
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
/**
|
/**
|
||||||
* This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
|
* This method attaches Playwright to an existing browser instance created via
|
||||||
|
* [browserType.launchServer([options])](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server).
|
||||||
*
|
*
|
||||||
* **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
|
* **NOTE** The major and minor version of the Playwright instance that connects needs to match the version of
|
||||||
* Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
* Playwright that launches the browser (1.2.3 → is compatible with 1.2.x).
|
||||||
*
|
*
|
||||||
* @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
|
* @param wsEndpoint A Playwright browser websocket endpoint to connect to. You obtain this endpoint via
|
||||||
|
* [browserServer.wsEndpoint()](https://playwright.dev/docs/api/class-browserserver#browser-server-ws-endpoint).
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
connect(options: ConnectOptions & { wsEndpoint?: string }): Promise<Browser>;
|
connect(options: ConnectOptions & { wsEndpoint?: string }): Promise<Browser>;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue