diff --git a/dotnet/docs/api/class-browser.mdx b/dotnet/docs/api/class-browser.mdx
index c510bda33c..1950342de2 100644
--- a/dotnet/docs/api/class-browser.mdx
+++ b/dotnet/docs/api/class-browser.mdx
@@ -25,6 +25,40 @@ await browser.CloseAsync();
## Methods
+### BindAsync {#browser-bind}
+
+Added in: v1.59browser.BindAsync
+
+Binds the browser to a named pipe or web socket, making it available for other clients to connect to.
+
+**Usage**
+
+```csharp
+await Browser.BindAsync(title, options);
+```
+
+**Arguments**
+- `title` [string]#
+
+ Title of the browser server, used for identification.
+- `options` `BrowserBindOptions?` *(optional)*
+ - `Host` [string]? *(optional)*#
+
+ Host to bind the web socket server to. When specified, a web socket server is created instead of a named pipe.
+ - `Port` [int]? *(optional)*#
+
+ Port to bind the web socket server to. When specified, a web socket server is created instead of a named pipe. Use `0` to let the OS pick an available port.
+ - `WorkspaceDir` [string]? *(optional)*#
+
+ Working directory associated with this browser server.
+
+**Returns**
+- Bind#
+ - `endpoint` [string]
+
+
+---
+
### BrowserType {#browser-browser-type}
Added in: v1.23browser.BrowserType
@@ -587,6 +621,23 @@ await Browser.NewPageAsync(options);
---
+### UnbindAsync {#browser-unbind}
+
+Added in: v1.59browser.UnbindAsync
+
+Unbinds the browser server previously bound with [Browser.BindAsync()](/api/class-browser.mdx#browser-bind).
+
+**Usage**
+
+```csharp
+await Browser.UnbindAsync();
+```
+
+**Returns**
+- [void]#
+
+---
+
### Version {#browser-version}
Added before v1.9browser.Version
diff --git a/dotnet/docs/api/class-screencast.mdx b/dotnet/docs/api/class-screencast.mdx
index 0c36ef6a18..cf9bdbaa1d 100644
--- a/dotnet/docs/api/class-screencast.mdx
+++ b/dotnet/docs/api/class-screencast.mdx
@@ -14,6 +14,23 @@ Interface for capturing screencast frames from a page.
## Methods
+### HideActionsAsync {#screencast-hide-actions}
+
+Added in: v1.59screencast.HideActionsAsync
+
+Removes action decorations.
+
+**Usage**
+
+```csharp
+await Screencast.HideActionsAsync();
+```
+
+**Returns**
+- [void]#
+
+---
+
### HideOverlaysAsync {#screencast-hide-overlays}
Added in: v1.59screencast.HideOverlaysAsync
@@ -31,6 +48,35 @@ await Screencast.HideOverlaysAsync();
---
+### ShowActionsAsync {#screencast-show-actions}
+
+Added in: v1.59screencast.ShowActionsAsync
+
+Enables visual annotations on interacted elements. Returns a disposable that stops showing actions when disposed.
+
+**Usage**
+
+```csharp
+await Screencast.ShowActionsAsync(options);
+```
+
+**Arguments**
+- `options` `ScreencastShowActionsOptions?` *(optional)*
+ - `Duration` [float]? *(optional)*#
+
+ How long each annotation is displayed in milliseconds. Defaults to `500`.
+ - `FontSize` [int]? *(optional)*#
+
+ Font size of the action title in pixels. Defaults to `24`.
+ - `Position` `enum AnnotatePosition { TopLeft, Top, TopRight, BottomLeft, Bottom, BottomRight }?` *(optional)*#
+
+ Position of the action title overlay. Defaults to `"top-right"`.
+
+**Returns**
+- [Disposable]#
+
+---
+
### ShowChapterAsync {#screencast-show-chapter}
Added in: v1.59screencast.ShowChapterAsync
diff --git a/dotnet/docs/release-notes.mdx b/dotnet/docs/release-notes.mdx
index 1976eae20e..5f2c7092d2 100644
--- a/dotnet/docs/release-notes.mdx
+++ b/dotnet/docs/release-notes.mdx
@@ -13,11 +13,15 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
### 🎬 Screencast
-New [Page.Screencast](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
+New [Page.Screencast](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.
+
+
-**Video recording** — record video with precise start/stop control, as an alternative to the [RecordVideoDir](/api/class-browser.mdx#browser-new-context-option-record-video-dir) option:
+
+
+**Screencast recording** — record video with precise start/stop control, as an alternative to the [RecordVideoDir](/api/class-browser.mdx#browser-new-context-option-record-video-dir) option:
```csharp
await page.Screencast.StartAsync(new() { Path = "video.webm" });
@@ -36,13 +40,10 @@ await page.Screencast.StartAsync(new() {
**Action annotations** — enable built-in visual annotations that highlight interacted elements and display action titles during recording:
```csharp
-await page.Screencast.StartAsync(new() {
- Path = "video.webm",
- Annotate = new() { Position = "top-right" },
-});
+await page.Screencast.ShowActionsAsync(new() { Position = "top-right" });
```
-The `Annotate` option accepts `Position` (`"top-left"`, `"top"`, `"top-right"`, `"bottom-left"`, `"bottom"`, `"bottom-right"`), `Duration` (ms per annotation), and `FontSize` (px).
+`ShowActionsAsync` accepts `Position` (`"top-left"`, `"top"`, `"top-right"`, `"bottom-left"`, `"bottom"`, `"bottom-right"`), `Duration` (ms per annotation), and `FontSize` (px). Returns a disposable to stop showing actions.
**Visual overlays** — add chapter titles and custom HTML overlays on top of the page for richer narration:
@@ -58,10 +59,8 @@ await page.Screencast.ShowOverlayAsync("Recording
+
+
+
+
+- `playwright-cli` binds all of its browsers automatically, so you can see what your agents are doing.
+- Pass `PLAYWRIGHT_DASHBOARD=1` env variable to see all `@playwright/test` browsers in the dashboard.
+
### Breaking Changes ⚠️
- Removed macOS 14 support for WebKit. We recommend upgrading your macOS version, or keeping an older Playwright version.
### Browser Versions
- Chromium 147.0.7727.15
- Mozilla Firefox 148.0.2
-- WebKit 26.0
+- WebKit 26.4
This version was also tested against the following stable channels:
- Google Chrome 146
diff --git a/images/release-notes-1.59-dashboard.png b/images/release-notes-1.59-dashboard.png
new file mode 100644
index 0000000000..b951a63c4e
Binary files /dev/null and b/images/release-notes-1.59-dashboard.png differ
diff --git a/java/docs/api/class-browser.mdx b/java/docs/api/class-browser.mdx
index fb91bf178f..d94670ce01 100644
--- a/java/docs/api/class-browser.mdx
+++ b/java/docs/api/class-browser.mdx
@@ -30,6 +30,41 @@ public class Example {
## Methods
+### bind {#browser-bind}
+
+Added in: v1.59browser.bind
+
+Binds the browser to a named pipe or web socket, making it available for other clients to connect to.
+
+**Usage**
+
+```java
+Browser.bind(title);
+Browser.bind(title, options);
+```
+
+**Arguments**
+- `title` [String]#
+
+ Title of the browser server, used for identification.
+- `options` `Browser.BindOptions` *(optional)*
+ - `setHost` [String] *(optional)*#
+
+ Host to bind the web socket server to. When specified, a web socket server is created instead of a named pipe.
+ - `setPort` [int] *(optional)*#
+
+ Port to bind the web socket server to. When specified, a web socket server is created instead of a named pipe. Use `0` to let the OS pick an available port.
+ - `setWorkspaceDir` [String] *(optional)*#
+
+ Working directory associated with this browser server.
+
+**Returns**
+- Bind#
+ - `endpoint` [String]
+
+
+---
+
### browserType {#browser-browser-type}
Added in: v1.23browser.browserType
@@ -654,6 +689,23 @@ Browser.stopTracing();
---
+### unbind {#browser-unbind}
+
+Added in: v1.59browser.unbind
+
+Unbinds the browser server previously bound with [Browser.bind()](/api/class-browser.mdx#browser-bind).
+
+**Usage**
+
+```java
+Browser.unbind();
+```
+
+**Returns**
+- [void]#
+
+---
+
### version {#browser-version}
Added before v1.9browser.version
diff --git a/java/docs/api/class-screencast.mdx b/java/docs/api/class-screencast.mdx
index b89aca4c7c..72396a2ae5 100644
--- a/java/docs/api/class-screencast.mdx
+++ b/java/docs/api/class-screencast.mdx
@@ -14,6 +14,23 @@ Interface for capturing screencast frames from a page.
## Methods
+### hideActions {#screencast-hide-actions}
+
+Added in: v1.59screencast.hideActions
+
+Removes action decorations.
+
+**Usage**
+
+```java
+Screencast.hideActions();
+```
+
+**Returns**
+- [void]#
+
+---
+
### hideOverlays {#screencast-hide-overlays}
Added in: v1.59screencast.hideOverlays
@@ -31,6 +48,36 @@ Screencast.hideOverlays();
---
+### showActions {#screencast-show-actions}
+
+Added in: v1.59screencast.showActions
+
+Enables visual annotations on interacted elements. Returns a disposable that stops showing actions when disposed.
+
+**Usage**
+
+```java
+Screencast.showActions();
+Screencast.showActions(options);
+```
+
+**Arguments**
+- `options` `Screencast.ShowActionsOptions` *(optional)*
+ - `setDuration` [double] *(optional)*#
+
+ How long each annotation is displayed in milliseconds. Defaults to `500`.
+ - `setFontSize` [int] *(optional)*#
+
+ Font size of the action title in pixels. Defaults to `24`.
+ - `setPosition` `enum AnnotatePosition { TOP_LEFT, TOP, TOP_RIGHT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT }` *(optional)*#
+
+ Position of the action title overlay. Defaults to `"top-right"`.
+
+**Returns**
+- [Disposable]#
+
+---
+
### showChapter {#screencast-show-chapter}
Added in: v1.59screencast.showChapter
diff --git a/java/docs/release-notes.mdx b/java/docs/release-notes.mdx
index d878a007c4..193b0c504b 100644
--- a/java/docs/release-notes.mdx
+++ b/java/docs/release-notes.mdx
@@ -13,11 +13,15 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
### 🎬 Screencast
-New [Page.screencast()](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
+New [Page.screencast()](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.
+
+
-**Video recording** — record video with precise start/stop control, as an alternative to the [setRecordVideoDir](/api/class-browser.mdx#browser-new-context-option-record-video-dir) option:
+
+
+**Screencast recording** — record video with precise start/stop control, as an alternative to the [setRecordVideoDir](/api/class-browser.mdx#browser-new-context-option-record-video-dir) option:
```java
page.screencast().start(new Screencast.StartOptions().setPath(Paths.get("video.webm")));
@@ -35,12 +39,10 @@ page.screencast().start(new Screencast.StartOptions()
**Action annotations** — enable built-in visual annotations that highlight interacted elements and display action titles during recording:
```java
-page.screencast().start(new Screencast.StartOptions()
- .setPath(Paths.get("video.webm"))
- .setAnnotate(new Screencast.Annotate().setPosition("top-right")));
+page.screencast().showActions(new Screencast.ShowActionsOptions().setPosition("top-right"));
```
-The `annotate` option accepts `position` (`"top-left"`, `"top"`, `"top-right"`, `"bottom-left"`, `"bottom"`, `"bottom-right"`), `duration` (ms per annotation), and `fontSize` (px).
+[Screencast.showActions()](/api/class-screencast.mdx#screencast-show-actions) accepts `position` (`"top-left"`, `"top"`, `"top-right"`, `"bottom-left"`, `"bottom"`, `"bottom-right"`), `duration` (ms per annotation), and `fontSize` (px). Returns a disposable to stop showing actions.
**Visual overlays** — add chapter titles and custom HTML overlays on top of the page for richer narration:
@@ -57,8 +59,8 @@ page.screencast().showOverlay("Recording
");
```java
page.screencast().start(new Screencast.StartOptions()
- .setPath(Paths.get("receipt.webm"))
- .setAnnotate(new Screencast.Annotate().setPosition("top-right")));
+ .setPath(Paths.get("receipt.webm")));
+page.screencast().showActions(new Screencast.ShowActionsOptions().setPosition("top-right"));
page.screencast().showChapter("Verifying checkout flow",
new Screencast.ShowChapterOptions()
@@ -89,7 +91,8 @@ The resulting video serves as a receipt: chapter titles provide context, action
#### Screencast
- [Page.screencast()](/api/class-page.mdx#page-screencast) provides video recording, real-time frame streaming, and overlay management.
- Methods [Screencast.start()](/api/class-screencast.mdx#screencast-start) and [Screencast.stop()](/api/class-screencast.mdx#screencast-stop) for recording and frame capture.
-- Methods [Screencast.showChapter()](/api/class-screencast.mdx#screencast-show-chapter) and [Screencast.showOverlay()](/api/class-screencast.mdx#screencast-show-overlay) for visual annotations.
+- Methods [Screencast.showActions()](/api/class-screencast.mdx#screencast-show-actions) and [Screencast.hideActions()](/api/class-screencast.mdx#screencast-hide-actions) for action annotations.
+- Methods [Screencast.showChapter()](/api/class-screencast.mdx#screencast-show-chapter) and [Screencast.showOverlay()](/api/class-screencast.mdx#screencast-show-overlay) for visual overlays.
- Methods [Screencast.showOverlays()](/api/class-screencast.mdx#screencast-show-overlays) and [Screencast.hideOverlays()](/api/class-screencast.mdx#screencast-hide-overlays) for overlay visibility control.
#### Storage, Console and Errors
@@ -103,17 +106,68 @@ The resulting video serves as a receipt: chapter titles provide context, action
- Method [BrowserContext.isClosed()](/api/class-browsercontext.mdx#browser-context-is-closed).
- Method [Request.existingResponse()](/api/class-request.mdx#request-existing-response) returns the response without waiting.
- Method [Response.httpVersion()](/api/class-response.mdx#response-http-version) returns the HTTP version used by the response.
-- Event [CDPSession.onClose(handler)](/api/class-cdpsession.mdx#cdp-session-event-close) for CDP sessions.
- Option `live` in [Tracing.start()](/api/class-tracing.mdx#tracing-start) for real-time trace updates.
- Option `artifactsDir` in [BrowserType.launch()](/api/class-browsertype.mdx#browser-type-launch) to configure the artifacts directory.
+### 🔗 Interoperability
+
+New [Browser.bind()](/api/class-browser.mdx#browser-bind) API makes a launched browser available for `playwright-cli`, `@playwright/mcp`, and other clients to connect to.
+
+**Bind a browser** — start a browser and bind it so others can connect:
+
+```java
+Browser browser = chromium.launch();
+Browser.BindResult serverInfo = browser.bind("my-session",
+ new Browser.BindOptions().setWorkspaceDir("/my/project"));
+```
+
+**Connect from playwright-cli**
+
+```bash
+playwright-cli attach my-session
+```
+
+**Connect from playwright/mcp**
+
+```bash
+@playwright/mcp --endpoint=my-session
+```
+
+**Connect from another client**
+
+```java
+Browser browser = chromium.connect(serverInfo.endpoint);
+```
+
+Pass `host` and `port` options to bind over WebSocket instead of a named pipe:
+
+```java
+Browser.BindResult serverInfo = browser.bind("my-session",
+ new Browser.BindOptions().setHost("localhost").setPort(0));
+// serverInfo.endpoint is a ws:// URL
+```
+
+Call [Browser.unbind()](/api/class-browser.mdx#browser-unbind) to stop accepting new connections.
+
+### 📊 Observability
+
+Run `playwright-cli show` to open the Dashboard that lists all bound browsers, their status, and workspace.
+
+
+
+
+
+
+- `playwright-cli` binds all of its browsers automatically, so you can see what your agents are doing.
+- Pass `PLAYWRIGHT_DASHBOARD=1` env variable to see all `@playwright/test` browsers in the dashboard.
+
### Breaking Changes ⚠️
- Removed macOS 14 support for WebKit. We recommend upgrading your macOS version, or keeping an older Playwright version.
### Browser Versions
- Chromium 147.0.7727.15
- Mozilla Firefox 148.0.2
-- WebKit 26.0
+- WebKit 26.4
This version was also tested against the following stable channels:
- Google Chrome 146
diff --git a/nodejs/docs/api/class-androiddevice.mdx b/nodejs/docs/api/class-androiddevice.mdx
index 09dac4d135..00fc63052c 100644
--- a/nodejs/docs/api/class-androiddevice.mdx
+++ b/nodejs/docs/api/class-androiddevice.mdx
@@ -334,7 +334,7 @@ await androidDevice.launchBrowser(options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
- - `annotate` [Object] *(optional)*
+ - `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
How long each annotation is displayed in milliseconds. Defaults to `500`.
diff --git a/nodejs/docs/api/class-browser.mdx b/nodejs/docs/api/class-browser.mdx
index 7f60d0ec67..9e35ed9804 100644
--- a/nodejs/docs/api/class-browser.mdx
+++ b/nodejs/docs/api/class-browser.mdx
@@ -25,6 +25,44 @@ const { firefox } = require('playwright'); // Or 'chromium' or 'webkit'.
## Methods
+### bind {#browser-bind}
+
+Added in: v1.59browser.bind
+
+Binds the browser to a named pipe or web socket, making it available for other clients to connect to.
+
+**Usage**
+
+```js
+await browser.bind(title);
+await browser.bind(title, options);
+```
+
+**Arguments**
+- `title` [string]#
+
+ Title of the browser server, used for identification.
+- `options` [Object] *(optional)*
+ - `host` [string] *(optional)*#
+
+ Host to bind the web socket server to. When specified, a web socket server is created instead of a named pipe.
+ - `metadata` [Object]<[string], [Object]> *(optional)*#
+
+ Additional metadata to associate with the browser server.
+ - `port` [number] *(optional)*#
+
+ Port to bind the web socket server to. When specified, a web socket server is created instead of a named pipe. Use `0` to let the OS pick an available port.
+ - `workspaceDir` [string] *(optional)*#
+
+ Working directory associated with this browser server.
+
+**Returns**
+- [Promise]<[Object]>#
+ - `endpoint` [string]
+
+
+---
+
### browserType {#browser-browser-type}
Added in: v1.23browser.browserType
@@ -331,7 +369,7 @@ If directly using this method to create [BrowserContext]s, it is best practice t
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
- - `annotate` [Object] *(optional)*
+ - `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
How long each annotation is displayed in milliseconds. Defaults to `500`.
@@ -637,7 +675,7 @@ await browser.newPage(options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
- - `annotate` [Object] *(optional)*
+ - `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
How long each annotation is displayed in milliseconds. Defaults to `500`.
@@ -849,6 +887,23 @@ await browser.stopTracing();
---
+### unbind {#browser-unbind}
+
+Added in: v1.59browser.unbind
+
+Unbinds the browser server previously bound with [browser.bind()](/api/class-browser.mdx#browser-bind).
+
+**Usage**
+
+```js
+await browser.unbind();
+```
+
+**Returns**
+- [Promise]<[void]>#
+
+---
+
### version {#browser-version}
Added before v1.9browser.version
diff --git a/nodejs/docs/api/class-browsertype.mdx b/nodejs/docs/api/class-browsertype.mdx
index 5952b48562..4dca4f3938 100644
--- a/nodejs/docs/api/class-browsertype.mdx
+++ b/nodejs/docs/api/class-browsertype.mdx
@@ -518,7 +518,7 @@ await browserType.launchPersistentContext(userDataDir, options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
- - `annotate` [Object] *(optional)*
+ - `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
How long each annotation is displayed in milliseconds. Defaults to `500`.
diff --git a/nodejs/docs/api/class-electron.mdx b/nodejs/docs/api/class-electron.mdx
index 0ffb83b19d..6d3432abae 100644
--- a/nodejs/docs/api/class-electron.mdx
+++ b/nodejs/docs/api/class-electron.mdx
@@ -170,7 +170,7 @@ await electron.launch(options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
- - `annotate` [Object] *(optional)*
+ - `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
How long each annotation is displayed in milliseconds. Defaults to `500`.
diff --git a/nodejs/docs/api/class-screencast.mdx b/nodejs/docs/api/class-screencast.mdx
index b09c64f212..5a811d9674 100644
--- a/nodejs/docs/api/class-screencast.mdx
+++ b/nodejs/docs/api/class-screencast.mdx
@@ -14,6 +14,23 @@ Interface for capturing screencast frames from a page.
## Methods
+### hideActions {#screencast-hide-actions}
+
+Added in: v1.59screencast.hideActions
+
+Removes action decorations.
+
+**Usage**
+
+```js
+await screencast.hideActions();
+```
+
+**Returns**
+- [Promise]<[void]>#
+
+---
+
### hideOverlays {#screencast-hide-overlays}
Added in: v1.59screencast.hideOverlays
@@ -31,6 +48,36 @@ await screencast.hideOverlays();
---
+### showActions {#screencast-show-actions}
+
+Added in: v1.59screencast.showActions
+
+Enables visual annotations on interacted elements. Returns a disposable that stops showing actions when disposed.
+
+**Usage**
+
+```js
+await screencast.showActions();
+await screencast.showActions(options);
+```
+
+**Arguments**
+- `options` [Object] *(optional)*
+ - `duration` [number] *(optional)*#
+
+ How long each annotation is displayed in milliseconds. Defaults to `500`.
+ - `fontSize` [number] *(optional)*#
+
+ Font size of the action title in pixels. Defaults to `24`.
+ - `position` "top-left" | "top" | "top-right" | "bottom-left" | "bottom" | "bottom-right" *(optional)*#
+
+ Position of the action title overlay. Defaults to `"top-right"`.
+
+**Returns**
+- [Promise]<[Disposable]>#
+
+---
+
### showChapter {#screencast-show-chapter}
Added in: v1.59screencast.showChapter
diff --git a/nodejs/docs/api/class-testoptions.mdx b/nodejs/docs/api/class-testoptions.mdx
index b7de365def..34a31d1eb8 100644
--- a/nodejs/docs/api/class-testoptions.mdx
+++ b/nodejs/docs/api/class-testoptions.mdx
@@ -1020,7 +1020,7 @@ Whether to record video for each test. Defaults to `'off'`.
To control video size, pass an object with `mode` and `size` properties. If video size is not specified, it will be equal to [testOptions.viewport](/api/class-testoptions.mdx#test-options-viewport) scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
-To annotate actions in the video, pass `annotate` with `action` and/or `test` sub-options. The `action` option controls visual highlights on interacted elements with an optional `delay` in milliseconds (defaults to `500`). The `test` option controls which test information is displayed as a status overlay.
+To annotate actions in the video, pass `show` with `action` and/or `test` sub-options. The `action` option controls visual highlights on interacted elements with an optional `delay` in milliseconds (defaults to `500`). The `test` option controls which test information is displayed as a status overlay.
**Usage**
@@ -1049,8 +1049,8 @@ Learn more about [recording video](../test-use-options.mdx#recording-options).
Size of the recorded video. Optional.
- - `annotate` [Object] *(optional)*
- - `action` [Object] *(optional)*
+ - `show` [Object] *(optional)*
+ - `actions` [Object] *(optional)*
- `duration` [number] *(optional)*
How long each annotation is displayed in milliseconds. Defaults to `500`.
diff --git a/nodejs/docs/release-notes.mdx b/nodejs/docs/release-notes.mdx
index c86e09fce4..077723057f 100644
--- a/nodejs/docs/release-notes.mdx
+++ b/nodejs/docs/release-notes.mdx
@@ -13,11 +13,15 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
### 🎬 Screencast
-New [page.screencast](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
+New [page.screencast](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.
+
+
-**Video recording** — record video with precise start/stop control, as an alternative to the [recordVideo](/api/class-browser.mdx#browser-new-context-option-record-video) option:
+
+
+**Screencast recording** — record video with precise start/stop control, as an alternative to the [recordVideo](/api/class-browser.mdx#browser-new-context-option-record-video) option:
```js
await page.screencast.start({ path: 'video.webm' });
@@ -37,13 +41,27 @@ await page.screencast.start({
**Action annotations** — enable built-in visual annotations that highlight interacted elements and display action titles during recording:
```js
-await page.screencast.start({
- path: 'video.webm',
- annotate: { position: 'top-right' },
-});
+await page.screencast.showActions({ position: 'top-right' });
```
-The `annotate` option accepts `position` (`'top-left'`, `'top'`, `'top-right'`, `'bottom-left'`, `'bottom'`, `'bottom-right'`), `duration` (ms per annotation), and `fontSize` (px).
+[screencast.showActions()](/api/class-screencast.mdx#screencast-show-actions) accepts `position` (`'top-left'`, `'top'`, `'top-right'`, `'bottom-left'`, `'bottom'`, `'bottom-right'`), `duration` (ms per annotation), and `fontSize` (px). Returns a disposable to stop showing actions.
+
+Action annotations can also be enabled in test fixtures via the `video` option:
+
+```js
+// playwright.config.ts
+export default defineConfig({
+ use: {
+ video: {
+ mode: 'on',
+ show: {
+ actions: { position: 'top-left' },
+ test: { position: 'top-right' },
+ },
+ },
+ },
+});
+```
**Visual overlays** — add chapter titles and custom HTML overlays on top of the page for richer narration:
@@ -59,10 +77,8 @@ await page.screencast.showOverlay('Recording
');
**Agentic video receipts** — coding agents can produce video evidence of their work. After completing a task, an agent can record a walkthrough video with rich annotations for human review:
```js
-await page.screencast.start({
- path: 'receipt.webm',
- annotate: { position: 'top-right' },
-});
+await page.screencast.start({ path: 'receipt.webm' });
+await page.screencast.showActions({ position: 'top-right' });
await page.screencast.showChapter('Verifying checkout flow', {
description: 'Added coupon code support per ticket #1234',
@@ -82,9 +98,63 @@ await page.screencast.stop();
The resulting video serves as a receipt: chapter titles provide context, action annotations highlight each interaction, and the visual walkthrough is faster to review than text logs.
-### 🤖 Agentic Tools
+### 🔗 Interoperability
+
+New [browser.bind()](/api/class-browser.mdx#browser-bind) API makes a launched browser available for `playwright-cli`, `@playwright/mcp`, and other clients to connect to.
+
+**Bind a browser** — start a browser and bind it so others can connect:
-#### CLI debugger
+```js
+const browser = await chromium.launch();
+const { endpoint } = await browser.bind('my-session', {
+ workspaceDir: '/my/project',
+});
+```
+
+**Connect from playwright-cli**
+
+```bash
+playwright-cli attach my-session
+playwright-cli -s my-session snapshot
+```
+
+**Connect from playwright/mcp**
+
+```bash
+@playwright/mcp --endpoint=my-session
+```
+
+**Connect from another client**
+
+```js
+const browser = await chromium.connect(endpoint);
+```
+
+Pass `host` and `port` options to bind over WebSocket instead of a named pipe:
+
+```js
+const { endpoint } = await browser.bind('my-session', {
+ host: 'localhost',
+ port: 0,
+});
+// endpoint is a ws:// URL
+```
+
+Call [browser.unbind()](/api/class-browser.mdx#browser-unbind) to stop accepting new connections.
+
+### 📊 Observability
+
+Run `playwright-cli show` to open the Dashboard that lists all bound browsers, their status, and workspace.
+
+
+
+
+
+
+- `playwright-cli` binds all of its browsers automatically, so you can see what your agents are doing.
+- Pass `PLAYWRIGHT_DASHBOARD=1` env variable to see all `@playwright/test` browsers in the dashboard.
+
+### 🐛 CLI debugger for agents
Coding agents can now run `npx playwright test --debug=cli` to attach and debug tests over `playwright-cli` — perfect for automatically fixing tests in agentic workflows:
@@ -107,7 +177,7 @@ $ playwright-cli --session tw-87b59e step-over
- Expect "toHaveTitle" at output/tests/example.spec.ts:7
```
-#### CLI trace analysis
+### 📋 CLI trace analysis for agents
Coding agents can run `npx playwright trace` to explore [Playwright Trace](./trace-viewer.mdx) and understand failing or flaky tests from the command line:
@@ -163,7 +233,8 @@ await using page = await context.newPage();
#### Screencast
- [page.screencast](/api/class-page.mdx#page-screencast) provides video recording, real-time frame streaming, and overlay management.
- Methods [screencast.start()](/api/class-screencast.mdx#screencast-start) and [screencast.stop()](/api/class-screencast.mdx#screencast-stop) for recording and frame capture.
-- Methods [screencast.showChapter()](/api/class-screencast.mdx#screencast-show-chapter) and [screencast.showOverlay()](/api/class-screencast.mdx#screencast-show-overlay) for visual annotations.
+- Methods [screencast.showActions()](/api/class-screencast.mdx#screencast-show-actions) and [screencast.hideActions()](/api/class-screencast.mdx#screencast-hide-actions) for action annotations.
+- Methods [screencast.showChapter()](/api/class-screencast.mdx#screencast-show-chapter) and [screencast.showOverlay()](/api/class-screencast.mdx#screencast-show-overlay) for visual overlays.
- Methods [screencast.showOverlays()](/api/class-screencast.mdx#screencast-show-overlays) and [screencast.hideOverlays()](/api/class-screencast.mdx#screencast-hide-overlays) for overlay visibility control.
#### Storage, Console and Errors
@@ -195,7 +266,7 @@ await using page = await context.newPage();
### Browser Versions
- Chromium 147.0.7727.15
- Mozilla Firefox 148.0.2
-- WebKit 26.0
+- WebKit 26.4
This version was also tested against the following stable channels:
- Google Chrome 146
diff --git a/nodejs/docs/videos.mdx b/nodejs/docs/videos.mdx
index dc5af286a0..3b8ca14b28 100644
--- a/nodejs/docs/videos.mdx
+++ b/nodejs/docs/videos.mdx
@@ -55,7 +55,9 @@ await context.close();
You can also specify video size and annotation. The video size defaults to the viewport size scaled down to fit 800x800. The video of the viewport is placed in the top-left corner of the output video, scaled down to fit if necessary. You may need to set the viewport size to match your desired video size.
-When `annotate` is specified, each action will be visually highlighted in the video with the element outline and action title subtitle. The optional `duration` property controls how long each annotation is displayed (defaults to `500`ms).
+When `show: { actions }` is specified, each action will be visually highlighted in the video with the element outline and action title subtitle. The optional `duration` property controls how long each annotation is displayed (defaults to `500`ms).
+
+When `show: { test }` is specified, video will be annotated with the current test information with configurable `level`.
```js title="playwright.config.ts"
import { defineConfig } from '@playwright/test';
@@ -64,8 +66,8 @@ export default defineConfig({
video: {
mode: 'on-first-retry',
size: { width: 640, height: 480 },
- annotate: {
- action: {
+ show: {
+ actions: {
duration: 500,
position: 'top-right',
fontSize: 14,
diff --git a/python/docs/api/class-browser.mdx b/python/docs/api/class-browser.mdx
index 3c5bbc79f5..78e84b16d9 100644
--- a/python/docs/api/class-browser.mdx
+++ b/python/docs/api/class-browser.mdx
@@ -61,6 +61,40 @@ asyncio.run(main())
## Methods
+### bind {#browser-bind}
+
+Added in: v1.59browser.bind
+
+Binds the browser to a named pipe or web socket, making it available for other clients to connect to.
+
+**Usage**
+
+```python
+browser.bind(title)
+browser.bind(title, **kwargs)
+```
+
+**Arguments**
+- `title` [str]#
+
+ Title of the browser server, used for identification.
+- `host` [str] *(optional)*#
+
+ Host to bind the web socket server to. When specified, a web socket server is created instead of a named pipe.
+- `port` [int] *(optional)*#
+
+ Port to bind the web socket server to. When specified, a web socket server is created instead of a named pipe. Use `0` to let the OS pick an available port.
+- `workspace_dir` [str] *(optional)*#
+
+ Working directory associated with this browser server.
+
+**Returns**
+- [Dict]#
+ - `endpoint` [str]
+
+
+---
+
### close {#browser-close}
Added before v1.9browser.close
@@ -751,6 +785,23 @@ browser.stop_tracing()
---
+### unbind {#browser-unbind}
+
+Added in: v1.59browser.unbind
+
+Unbinds the browser server previously bound with [browser.bind()](/api/class-browser.mdx#browser-bind).
+
+**Usage**
+
+```python
+browser.unbind()
+```
+
+**Returns**
+- [NoneType]#
+
+---
+
## Properties
### browser_type {#browser-browser-type}
diff --git a/python/docs/api/class-screencast.mdx b/python/docs/api/class-screencast.mdx
index 2b3c60c32e..aa78fc2eb7 100644
--- a/python/docs/api/class-screencast.mdx
+++ b/python/docs/api/class-screencast.mdx
@@ -14,6 +14,23 @@ Interface for capturing screencast frames from a page.
## Methods
+### hide_actions {#screencast-hide-actions}
+
+Added in: v1.59screencast.hide_actions
+
+Removes action decorations.
+
+**Usage**
+
+```python
+screencast.hide_actions()
+```
+
+**Returns**
+- [NoneType]#
+
+---
+
### hide_overlays {#screencast-hide-overlays}
Added in: v1.59screencast.hide_overlays
@@ -31,6 +48,35 @@ screencast.hide_overlays()
---
+### show_actions {#screencast-show-actions}
+
+Added in: v1.59screencast.show_actions
+
+Enables visual annotations on interacted elements. Returns a disposable that stops showing actions when disposed.
+
+**Usage**
+
+```python
+screencast.show_actions()
+screencast.show_actions(**kwargs)
+```
+
+**Arguments**
+- `duration` [float] *(optional)*#
+
+ How long each annotation is displayed in milliseconds. Defaults to `500`.
+- `font_size` [int] *(optional)*#
+
+ Font size of the action title in pixels. Defaults to `24`.
+- `position` "top-left" | "top" | "top-right" | "bottom-left" | "bottom" | "bottom-right" *(optional)*#
+
+ Position of the action title overlay. Defaults to `"top-right"`.
+
+**Returns**
+- [Disposable]#
+
+---
+
### show_chapter {#screencast-show-chapter}
Added in: v1.59screencast.show_chapter
diff --git a/python/docs/release-notes.mdx b/python/docs/release-notes.mdx
index 8c8f8f25dd..9c0124c7ee 100644
--- a/python/docs/release-notes.mdx
+++ b/python/docs/release-notes.mdx
@@ -13,11 +13,15 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
### 🎬 Screencast
-New [page.screencast](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
+New [page.screencast](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.
+
+
-**Video recording** — record video with precise start/stop control, as an alternative to the [record_video_dir](/api/class-browser.mdx#browser-new-context-option-record-video-dir) option:
+
+
+**Screencast recording** — record video with precise start/stop control, as an alternative to the [record_video_dir](/api/class-browser.mdx#browser-new-context-option-record-video-dir) option:
```python
page.screencast.start(path="video.webm")
@@ -36,13 +40,10 @@ page.screencast.start(
**Action annotations** — enable built-in visual annotations that highlight interacted elements and display action titles during recording:
```python
-page.screencast.start(
- path="video.webm",
- annotate={"position": "top-right"},
-)
+page.screencast.show_actions(position="top-right")
```
-The `annotate` option accepts `position` (`'top-left'`, `'top'`, `'top-right'`, `'bottom-left'`, `'bottom'`, `'bottom-right'`), `duration` (ms per annotation), and `font_size` (px).
+[screencast.show_actions()](/api/class-screencast.mdx#screencast-show-actions) accepts `position` (`'top-left'`, `'top'`, `'top-right'`, `'bottom-left'`, `'bottom'`, `'bottom-right'`), `duration` (ms per annotation), and `font_size` (px). Returns a disposable to stop showing actions.
**Visual overlays** — add chapter titles and custom HTML overlays on top of the page for richer narration:
@@ -58,10 +59,8 @@ page.screencast.show_overlay('Recording
')
**Agentic video receipts** — coding agents can produce video evidence of their work. After completing a task, an agent can record a walkthrough video with rich annotations for human review:
```python
-page.screencast.start(
- path="receipt.webm",
- annotate={"position": "top-right"},
-)
+page.screencast.start(path="receipt.webm")
+page.screencast.show_actions(position="top-right")
page.screencast.show_chapter("Verifying checkout flow",
description="Added coupon code support per ticket #1234",
@@ -92,7 +91,8 @@ The resulting video serves as a receipt: chapter titles provide context, action
#### Screencast
- [page.screencast](/api/class-page.mdx#page-screencast) provides video recording, real-time frame streaming, and overlay management.
- Methods [screencast.start()](/api/class-screencast.mdx#screencast-start) and [screencast.stop()](/api/class-screencast.mdx#screencast-stop) for recording and frame capture.
-- Methods [screencast.show_chapter()](/api/class-screencast.mdx#screencast-show-chapter) and [screencast.show_overlay()](/api/class-screencast.mdx#screencast-show-overlay) for visual annotations.
+- Methods [screencast.show_actions()](/api/class-screencast.mdx#screencast-show-actions) and [screencast.hide_actions()](/api/class-screencast.mdx#screencast-hide-actions) for action annotations.
+- Methods [screencast.show_chapter()](/api/class-screencast.mdx#screencast-show-chapter) and [screencast.show_overlay()](/api/class-screencast.mdx#screencast-show-overlay) for visual overlays.
- Methods [screencast.show_overlays()](/api/class-screencast.mdx#screencast-show-overlays) and [screencast.hide_overlays()](/api/class-screencast.mdx#screencast-hide-overlays) for overlay visibility control.
#### Storage, Console and Errors
@@ -106,17 +106,71 @@ The resulting video serves as a receipt: chapter titles provide context, action
- Method [browser_context.is_closed()](/api/class-browsercontext.mdx#browser-context-is-closed).
- Method [request.existing_response](/api/class-request.mdx#request-existing-response) returns the response without waiting.
- Method [response.http_version()](/api/class-response.mdx#response-http-version) returns the HTTP version used by the response.
-- Event [cdp_session.on("close")](/api/class-cdpsession.mdx#cdp-session-event-close) for CDP sessions.
- Option `live` in [tracing.start()](/api/class-tracing.mdx#tracing-start) for real-time trace updates.
- Option `artifacts_dir` in [browser_type.launch()](/api/class-browsertype.mdx#browser-type-launch) to configure the artifacts directory.
+### 🔗 Interoperability
+
+New [browser.bind()](/api/class-browser.mdx#browser-bind) API makes a launched browser available for `playwright-cli`, `@playwright/mcp`, and other clients to connect to.
+
+**Bind a browser** — start a browser and bind it so others can connect:
+
+```python
+browser = await chromium.launch()
+server_info = await browser.bind("my-session",
+ workspace_dir="/my/project",
+)
+```
+
+**Connect from playwright-cli**
+
+```bash
+playwright-cli attach my-session
+```
+
+**Connect from playwright/mcp**
+
+```bash
+@playwright/mcp --endpoint=my-session
+```
+
+**Connect from another client**
+
+```python
+browser = await chromium.connect(server_info["endpoint"])
+```
+
+Pass `host` and `port` options to bind over WebSocket instead of a named pipe:
+
+```python
+server_info = await browser.bind("my-session",
+ host="localhost",
+ port=0,
+)
+# server_info["endpoint"] is a ws:// URL
+```
+
+Call [browser.unbind()](/api/class-browser.mdx#browser-unbind) to stop accepting new connections.
+
+### 📊 Observability
+
+Run `playwright-cli show` to open the Dashboard that lists all bound browsers, their status, and workspace.
+
+
+
+
+
+
+- `playwright-cli` binds all of its browsers automatically, so you can see what your agents are doing.
+- Pass `PLAYWRIGHT_DASHBOARD=1` env variable to see all `@playwright/test` browsers in the dashboard.
+
### Breaking Changes ⚠️
- Removed macOS 14 support for WebKit. We recommend upgrading your macOS version, or keeping an older Playwright version.
### Browser Versions
- Chromium 147.0.7727.15
- Mozilla Firefox 148.0.2
-- WebKit 26.0
+- WebKit 26.4
This version was also tested against the following stable channels:
- Google Chrome 146