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
Browser websocket endpoint which can be used as an argument to [browserType.connect(options)] to establish connection to the browser. Requires browser app to be launched with `browserType.launchBrowserApp({ webSocket: true, ... })`.
3438
+
- returns: <[string]> Browser websocket url.
3450
3439
3440
+
Browser websocket endpoint which can be used as an argument to [browserType.connect(options)](#browsertypeconnectoptions) to establish connection to the browser.
3451
3441
3452
3442
### class: BrowserType
3453
3443
@@ -3478,10 +3468,8 @@ const { chromium } = require('playwright'); // Or 'firefox' or 'webkit'.
3478
3468
3479
3469
#### browserType.connect(options)
3480
3470
-`options` <[Object]>
3481
-
-`browserWSEndpoint` <?[string]> A browser websocket endpoint to connect to.
3471
+
-`wsEndpoint` <?[string]> A browser websocket endpoint to connect to.
3482
3472
-`slowMo` <[number]> Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.
3483
-
-`browserURL` <?[string]> **Chromium-only** A browser url to connect to, in format `http://${host}:${port}`. Use interchangeably with `browserWSEndpoint` to let Playwright fetch it from [metadata endpoint](https://chromedevtools.github.io/devtools-protocol/#how-do-i-access-the-browser-target).
3484
-
-`transport` <[ConnectionTransport]> **Experimental** Specify a custom transport object for Playwright to use.
3485
3473
- returns: <[Promise]<[Browser]>>
3486
3474
3487
3475
This methods attaches Playwright to an existing browser instance.
@@ -3547,7 +3535,6 @@ try {
3547
3535
-`options` <[Object]> Set of configurable options to set on the browser. Can have the following fields:
3548
3536
-`headless` <[boolean]> Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Headless_mode). Defaults to `true` unless the `devtools` option is `true`.
3549
3537
-`executablePath` <[string]> Path to a browser executable to run instead of the bundled one. If `executablePath` is a relative path, then it is resolved relative to [current working directory](https://nodejs.org/api/process.html#process_process_cwd). **BEWARE**: Playwright is only [guaranteed to work](https://github.com/Microsoft/playwright/#q-why-doesnt-playwright-vxxx-work-with-chromium-vyyy) with the bundled Chromium, Firefox or WebKit, use at your own risk.
3550
-
-`slowMo` <[number]> Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on.
3551
3538
-`args` <[Array]<[string]>> Additional arguments to pass to the browser instance. The list of Chromium flags can be found [here](http://peter.sh/experiments/chromium-command-line-switches/).
3552
3539
-`ignoreDefaultArgs` <[boolean]|[Array]<[string]>> If `true`, then do not use [`browserType.defaultArgs()`](#browsertypedefaultargsoptions). If an array is given, then filter out the given default arguments. Dangerous option; use with care. Defaults to `false`.
3553
3540
-`handleSIGINT` <[boolean]> Close the browser process on Ctrl-C. Defaults to `true`.
@@ -3557,7 +3544,6 @@ try {
3557
3544
-`dumpio` <[boolean]> Whether to pipe the browser process stdout and stderr into `process.stdout` and `process.stderr`. Defaults to `false`.
3558
3545
-`userDataDir` <[string]> Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile).
3559
3546
-`env` <[Object]> Specify environment variables that will be visible to the browser. Defaults to `process.env`.
3560
-
-`webSocket` <[boolean]> Connects to the browser over a WebSocket instead of a pipe. Defaults to `false`.
3561
3547
-`devtools` <[boolean]> **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the `headless` option will be set `false`.
3562
3548
- returns: <[Promise]<[Browser]>> Promise which resolves to browser instance.
3563
3549
@@ -3591,7 +3577,6 @@ const browser = await chromium.launch({ // Or 'firefox' or 'webkit'.
3591
3577
-`dumpio` <[boolean]> Whether to pipe the browser process stdout and stderr into `process.stdout` and `process.stderr`. Defaults to `false`.
3592
3578
-`userDataDir` <[string]> Path to a User Data Directory, which stores browser session data like cookies and local storage. More details for [Chromium](https://chromium.googlesource.com/chromium/src/+/master/docs/user_data_dir.md) and [Firefox](https://developer.mozilla.org/en-US/docs/Mozilla/Command_Line_Options#User_Profile).
3593
3579
-`env` <[Object]> Specify environment variables that will be visible to the browser. Defaults to `process.env`.
3594
-
-`webSocket` <[boolean]> Connects to the browser over a WebSocket instead of a pipe. Defaults to `false`.
3595
3580
-`devtools` <[boolean]> **Chromium-only** Whether to auto-open a Developer Tools panel for each tab. If this option is `true`, the `headless` option will be set `false`.
3596
3581
- returns: <[Promise]<[BrowserApp]>> Promise which resolves to the browser app instance.
consttimeoutError=newTimeoutError(`Timed out after ${timeout} ms while trying to connect to Chromium! The only Chromium revision guaranteed to work is r${this._revision}`);
0 commit comments