Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions docs/src/api/class-browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,44 @@ testing frameworks should explicitly create [`method: Browser.newContext`] follo
### option: Browser.newPage.storageStatePath = %%-csharp-java-context-option-storage-state-path-%%
* since: v1.9

## async method: Browser.bind
* since: v1.59
- returns: <[Object]>
- `endpoint` <[string]>

Binds the browser to a named pipe or web socket, making it available for other clients to connect to.

### param: Browser.bind.title
* since: v1.59
- `title` <[string]>

Title of the browser server, used for identification.

### option: Browser.bind.workspaceDir
* since: v1.59
- `workspaceDir` <[string]>

Working directory associated with this browser server.

### option: Browser.bind.metadata
* since: v1.59
* langs: js
- `metadata` <[Object]<[string], [any]>>

Additional metadata to associate with the browser server.

### option: Browser.bind.host
* since: v1.59
- `host` <[string]>

Host to bind the web socket server to. When specified, a web socket server is created instead of a named pipe.

### option: Browser.bind.port
* since: v1.59
- `port` <[int]>

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.

## async method: Browser.removeAllListeners
* since: v1.47
* langs: js
Expand Down Expand Up @@ -382,6 +420,11 @@ This API controls [Chromium Tracing](https://www.chromium.org/developers/how-tos

Returns the buffer with trace data.

## async method: Browser.unbind
* since: v1.59

Unbinds the browser server previously bound with [`method: Browser.bind`].

## method: Browser.version
* since: v1.8
- returns: <[string]>
Expand Down
Binary file added docs/src/images/release-notes-1.59-dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 59 additions & 3 deletions docs/src/release-notes-csharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import LiteYouTube from '@site/src/components/LiteYouTube';

### 🎬 Screencast

New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-screencast-demo.gif" alt="Demo" width="500" height="313" />
</center>

**Video recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideoDir`] option:

**Screencast recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideoDir`] option:

```csharp
await page.Screencast.StartAsync(new() { Path = "video.webm" });
Expand Down Expand Up @@ -103,10 +106,63 @@ The resulting video serves as a receipt: chapter titles provide context, action
- Method [`method: BrowserContext.isClosed`].
- Method [`method: Request.existingResponse`] returns the response without waiting.
- Method [`method: Response.httpVersion`] returns the HTTP version used by the response.
- Event [`event: CDPSession.close`] for CDP sessions.
- Option `Live` in [`method: Tracing.start`] for real-time trace updates.
- Option `ArtifactsDir` in [`method: BrowserType.launch`] to configure the artifacts directory.

### 🔗 Interoperability

New [`method: 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:

```csharp
var browser = await chromium.LaunchAsync();
var serverInfo = await browser.BindAsync("my-session", new() {
WorkspaceDir = "/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**

```csharp
var browser = await chromium.ConnectAsync(serverInfo.Endpoint);
```

Pass `Host` and `Port` options to bind over WebSocket instead of a named pipe:

```csharp
var serverInfo = await browser.BindAsync("my-session", new() {
Host = "localhost",
Port = 0,
});
// serverInfo.Endpoint is a ws:// URL
```

Call [`method: 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.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-dashboard.gif" alt="Demo" width="1169" height="835" />
</center>

- `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.
Expand Down
59 changes: 56 additions & 3 deletions docs/src/release-notes-java.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import LiteYouTube from '@site/src/components/LiteYouTube';

### 🎬 Screencast

New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-screencast-demo.gif" alt="Demo" width="500" height="313" />
</center>

**Video recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideoDir`] option:

**Screencast recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideoDir`] option:

```java
page.screencast().start(new Screencast.StartOptions().setPath(Paths.get("video.webm")));
Expand Down Expand Up @@ -103,10 +106,60 @@ The resulting video serves as a receipt: chapter titles provide context, action
- Method [`method: BrowserContext.isClosed`].
- Method [`method: Request.existingResponse`] returns the response without waiting.
- Method [`method: Response.httpVersion`] returns the HTTP version used by the response.
- Event [`event: CDPSession.close`] for CDP sessions.
- Option `live` in [`method: Tracing.start`] for real-time trace updates.
- Option `artifactsDir` in [`method: BrowserType.launch`] to configure the artifacts directory.

### 🔗 Interoperability

New [`method: 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 [`method: 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.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-dashboard.gif" alt="Demo" width="1169" height="835" />
</center>

- `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.
Expand Down
66 changes: 61 additions & 5 deletions docs/src/release-notes-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import LiteYouTube from '@site/src/components/LiteYouTube';

### 🎬 Screencast

New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-screencast-demo.gif" alt="Demo" width="500" height="313" />
</center>

**Video recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideo`] option:

**Screencast recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideo`] option:

```js
await page.screencast.start({ path: 'video.webm' });
Expand Down Expand Up @@ -91,9 +94,62 @@ 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 [`method: 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:

```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 [`method: 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.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-dashboard.gif" alt="Demo" width="1169" height="835" />
</center>

- `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
### 🐛 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:

Expand All @@ -116,7 +172,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.md) and understand failing or flaky tests from the command line:

Expand Down
62 changes: 59 additions & 3 deletions docs/src/release-notes-python.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@ import LiteYouTube from '@site/src/components/LiteYouTube';

### 🎬 Screencast

New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings and as real-time frame streams.
New [`property: Page.screencast`] API provides a unified interface for capturing page content — both as video recordings, annotations, overlays, and a real-time frame stream.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-screencast-demo.gif" alt="Demo" width="500" height="313" />
</center>

**Video recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideoDir`] option:

**Screencast recording** — record video with precise start/stop control, as an alternative to the [`option: Browser.newContext.recordVideoDir`] option:

```python
page.screencast.start(path="video.webm")
Expand Down Expand Up @@ -103,10 +106,63 @@ The resulting video serves as a receipt: chapter titles provide context, action
- Method [`method: BrowserContext.isClosed`].
- Method [`method: Request.existingResponse`] returns the response without waiting.
- Method [`method: Response.httpVersion`] returns the HTTP version used by the response.
- Event [`event: CDPSession.close`] for CDP sessions.
- Option `live` in [`method: Tracing.start`] for real-time trace updates.
- Option `artifacts_dir` in [`method: BrowserType.launch`] to configure the artifacts directory.

### 🔗 Interoperability

New [`method: 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 [`method: 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.

<center>
<img src="https://raw.githubusercontent.com/microsoft/playwright/main/docs/src/images/release-notes-1.59-dashboard.gif" alt="Demo" width="1169" height="835" />
</center>

- `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.
Expand Down
2 changes: 1 addition & 1 deletion packages/dashboard/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Playwright Monitor</title>
<title>Playwright Dashboard</title>
</head>
<body>
<div id="root"></div>
Expand Down
Loading
Loading