You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/api/class-browsertype.md
+2-22Lines changed: 2 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,31 +87,15 @@ class BrowserTypeExamples
87
87
88
88
## async method: BrowserType.connect
89
89
* since: v1.8
90
-
* langs: js
91
90
- returns: <[Browser]>
92
91
93
-
This method attaches Playwright to an existing browser instance created via [`method: BrowserType.launchServer`].
94
-
95
-
:::note
96
-
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).
97
-
:::
98
-
99
-
## async method: BrowserType.connect
100
-
* since: v1.8
101
-
* langs: python, csharp, java
102
-
- returns: <[Browser]>
103
-
104
-
This method attaches Playwright to an existing browser instance created via `BrowserType.launchServer` in Node.js.
105
-
106
-
:::note
107
-
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).
108
-
:::
92
+
This method attaches Playwright to an existing browser instance. When connecting to another browser launched via `BrowserType.launchServer` in Node.js, the major and minor version needs to match the client version (1.2.3 → is compatible with 1.2.x).
109
93
110
94
### param: BrowserType.connect.wsEndpoint
111
95
* since: v1.10
112
96
-`wsEndpoint` <[string]>
113
97
114
-
A Playwright browser websocket endpoint to connect to. You obtain this endpoint via [`method: BrowserServer.wsEndpoint`].
98
+
A browser websocket endpoint to connect to.
115
99
116
100
### option: BrowserType.connect.headers
117
101
* since: v1.11
@@ -168,10 +152,6 @@ The default browser context is accessible via [`method: Browser.contexts`].
168
152
Connecting over the Chrome DevTools Protocol is only supported for Chromium-based browsers.
169
153
:::
170
154
171
-
:::note
172
-
This connection is significantly lower fidelity than the Playwright protocol connection via [`method: BrowserType.connect`]. If you are experiencing issues or attempting to use advanced functionality, you probably want to use [`method: BrowserType.connect`].
0 commit comments