From 5c245fe335bd226c6589d2e18c8c85c4fa4b8467 Mon Sep 17 00:00:00 2001
From: "microsoft-playwright-automation[bot]"
<203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
Date: Wed, 23 Sep 2026 10:24:16 +0000
Subject: [PATCH] feat(roll): roll to ToT Playwright (23-09-26)
---
dotnet/docs/api/class-apirequest.mdx | 2 +-
dotnet/docs/api/class-browser.mdx | 14 ++++--
dotnet/docs/api/class-browsertype.mdx | 7 ++-
dotnet/docs/api/class-cdpsession.mdx | 4 +-
dotnet/docs/api/class-cdpsessionevent.mdx | 2 +-
dotnet/docs/api/class-clock.mdx | 1 +
dotnet/docs/api/class-frame.mdx | 8 ++-
dotnet/docs/api/class-page.mdx | 8 ++-
dotnet/docs/api/class-screencast.mdx | 36 +++++++++++++-
dotnet/docs/clock.mdx | 1 +
dotnet/docs/getting-started-cli.mdx | 10 +---
dotnet/docs/getting-started-mcp.mdx | 12 +----
java/docs/api/class-apirequest.mdx | 2 +-
java/docs/api/class-browser.mdx | 14 ++++--
java/docs/api/class-browsertype.mdx | 7 ++-
java/docs/api/class-clock.mdx | 1 +
java/docs/api/class-frame.mdx | 7 +++
java/docs/api/class-page.mdx | 7 +++
java/docs/api/class-screencast.mdx | 36 +++++++++++++-
java/docs/clock.mdx | 1 +
java/docs/getting-started-cli.mdx | 10 +---
java/docs/getting-started-mcp.mdx | 12 +----
nodejs/docs/api/class-androiddevice.mdx | 19 ++++++-
nodejs/docs/api/class-apirequest.mdx | 2 +-
nodejs/docs/api/class-browser.mdx | 42 +++++++++++++---
nodejs/docs/api/class-browsercontext.mdx | 2 +-
nodejs/docs/api/class-browsertype.mdx | 21 ++++++--
nodejs/docs/api/class-clock.mdx | 1 +
nodejs/docs/api/class-electron.mdx | 17 ++++++-
nodejs/docs/api/class-elementhandle.mdx | 4 +-
nodejs/docs/api/class-frame.mdx | 23 +++++++--
nodejs/docs/api/class-jshandle.mdx | 10 +++-
nodejs/docs/api/class-locator.mdx | 14 ++++--
nodejs/docs/api/class-page.mdx | 25 +++++++---
nodejs/docs/api/class-screencast.mdx | 36 +++++++++++++-
nodejs/docs/api/class-test.mdx | 11 +++++
nodejs/docs/api/class-testconfig.mdx | 3 ++
nodejs/docs/api/class-testoptions.mdx | 60 +++++++++++++++++++++--
nodejs/docs/api/class-testproject.mdx | 40 +++++++++++++++
nodejs/docs/api/class-tracing.mdx | 3 ++
nodejs/docs/clock.mdx | 1 +
nodejs/docs/getting-started-cli.mdx | 10 +---
nodejs/docs/getting-started-mcp.mdx | 12 +----
nodejs/docs/test-parallel.mdx | 6 +++
nodejs/docs/test-snapshots.mdx | 14 ++++++
python/docs/api/class-apirequest.mdx | 2 +-
python/docs/api/class-browser.mdx | 14 ++++--
python/docs/api/class-browsertype.mdx | 7 ++-
python/docs/api/class-clock.mdx | 1 +
python/docs/api/class-frame.mdx | 6 +++
python/docs/api/class-page.mdx | 6 +++
python/docs/api/class-screencast.mdx | 36 +++++++++++++-
python/docs/clock.mdx | 1 +
python/docs/getting-started-cli.mdx | 10 +---
python/docs/getting-started-mcp.mdx | 12 +----
55 files changed, 525 insertions(+), 148 deletions(-)
diff --git a/dotnet/docs/api/class-apirequest.mdx b/dotnet/docs/api/class-apirequest.mdx
index 0bd48c5e86..1dfa9847cd 100644
--- a/dotnet/docs/api/class-apirequest.mdx
+++ b/dotnet/docs/api/class-apirequest.mdx
@@ -34,7 +34,7 @@ await ApiRequest.NewContextAsync(options);
* baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
* baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in `http://localhost:3000/foo/bar.html`
* baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in `http://localhost:3000/bar.html`
- - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: 1.46#
+ - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: v1.46#
- `Origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
diff --git a/dotnet/docs/api/class-browser.mdx b/dotnet/docs/api/class-browser.mdx
index 0fd75b1dd4..0f2e81aaf1 100644
--- a/dotnet/docs/api/class-browser.mdx
+++ b/dotnet/docs/api/class-browser.mdx
@@ -209,7 +209,7 @@ await browser.CloseAsync();
- `BypassCSP` [bool]? *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: 1.46#
+ - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: v1.46#
- `Origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -301,7 +301,7 @@ await browser.CloseAsync();
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `IsMobile` [bool]? *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `JavaScriptEnabled` [bool]? *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -345,6 +345,9 @@ await browser.CloseAsync();
- `RecordVideoDir` [string]? *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.CloseAsync()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+ - `RecordVideoFps` [int]? *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `RecordVideoSize` RecordVideoSize? *(optional)*#
- `Width` [int]
@@ -434,7 +437,7 @@ await Browser.NewPageAsync(options);
- `BypassCSP` [bool]? *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: 1.46#
+ - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: v1.46#
- `Origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -526,7 +529,7 @@ await Browser.NewPageAsync(options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `IsMobile` [bool]? *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `JavaScriptEnabled` [bool]? *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -570,6 +573,9 @@ await Browser.NewPageAsync(options);
- `RecordVideoDir` [string]? *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.CloseAsync()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+ - `RecordVideoFps` [int]? *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `RecordVideoSize` RecordVideoSize? *(optional)*#
- `Width` [int]
diff --git a/dotnet/docs/api/class-browsertype.mdx b/dotnet/docs/api/class-browsertype.mdx
index 7cb0119cf7..2e7f608788 100644
--- a/dotnet/docs/api/class-browsertype.mdx
+++ b/dotnet/docs/api/class-browsertype.mdx
@@ -327,7 +327,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `ChromiumSandbox` [bool]? *(optional)*#
Enable Chromium sandboxing. Defaults to `false`.
- - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: 1.46#
+ - `ClientCertificates` [IEnumerable]?<ClientCertificates> *(optional)* Added in: v1.46#
- `Origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -451,7 +451,7 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `IsMobile` [bool]? *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `JavaScriptEnabled` [bool]? *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -495,6 +495,9 @@ await BrowserType.LaunchPersistentContextAsync(userDataDir, options);
- `RecordVideoDir` [string]? *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.CloseAsync()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+ - `RecordVideoFps` [int]? *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `RecordVideoSize` RecordVideoSize? *(optional)*#
- `Width` [int]
diff --git a/dotnet/docs/api/class-cdpsession.mdx b/dotnet/docs/api/class-cdpsession.mdx
index 10de76efcf..2058914207 100644
--- a/dotnet/docs/api/class-cdpsession.mdx
+++ b/dotnet/docs/api/class-cdpsession.mdx
@@ -49,7 +49,7 @@ await CdpSession.DetachAsync();
### Event {/* #cdp-session-event */}
-Added in: v.1.30cdpSession.Event
+Added in: v1.30cdpSession.Event
Returns an event emitter for the given CDP event name.
@@ -60,7 +60,7 @@ CdpSession.Event(eventName);
```
**Arguments**
-- `eventName` [string] Added in: v1.30#
+- `eventName` [string]#
CDP event name.
diff --git a/dotnet/docs/api/class-cdpsessionevent.mdx b/dotnet/docs/api/class-cdpsessionevent.mdx
index d9c30181e3..8a319e9af6 100644
--- a/dotnet/docs/api/class-cdpsessionevent.mdx
+++ b/dotnet/docs/api/class-cdpsessionevent.mdx
@@ -18,7 +18,7 @@ Each object represents a named event and allows handling of the event when it is
### EventName {/* #cdp-session-event-event-name */}
-Added in: 1.30cdpSessionEvent.EventName
+Added in: v1.30cdpSessionEvent.EventName
**Usage**
diff --git a/dotnet/docs/api/class-clock.mdx b/dotnet/docs/api/class-clock.mdx
index 83c0f35fb6..c5e28578f4 100644
--- a/dotnet/docs/api/class-clock.mdx
+++ b/dotnet/docs/api/class-clock.mdx
@@ -45,6 +45,7 @@ await page.Clock.FastForwardAsync("30:00");
Install fake implementations for the following time-related functions:
* `Date`
+* `Temporal.Now`
* `setTimeout`
* `clearTimeout`
* `setInterval`
diff --git a/dotnet/docs/api/class-frame.mdx b/dotnet/docs/api/class-frame.mdx
index f5c30fa9b9..57949fa4c0 100644
--- a/dotnet/docs/api/class-frame.mdx
+++ b/dotnet/docs/api/class-frame.mdx
@@ -136,9 +136,15 @@ Gets the full HTML contents of the frame, including the doctype.
**Usage**
```csharp
-await Frame.ContentAsync();
+await Frame.ContentAsync(options);
```
+**Arguments**
+- `options` `FrameContentOptions?` *(optional)*
+ - `IncludeShadow` [bool]? *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [string]#
diff --git a/dotnet/docs/api/class-page.mdx b/dotnet/docs/api/class-page.mdx
index ac7d68158e..252791a203 100644
--- a/dotnet/docs/api/class-page.mdx
+++ b/dotnet/docs/api/class-page.mdx
@@ -409,9 +409,15 @@ Gets the full HTML contents of the page, including the doctype.
**Usage**
```csharp
-await Page.ContentAsync();
+await Page.ContentAsync(options);
```
+**Arguments**
+- `options` `PageContentOptions?` *(optional)*
+ - `IncludeShadow` [bool]? *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [string]#
diff --git a/dotnet/docs/api/class-screencast.mdx b/dotnet/docs/api/class-screencast.mdx
index f5c0deac37..dfdbb5af73 100644
--- a/dotnet/docs/api/class-screencast.mdx
+++ b/dotnet/docs/api/class-screencast.mdx
@@ -70,11 +70,40 @@ await Screencast.ShowActionsAsync(options);
How long each annotation is displayed in milliseconds. Defaults to `500`.
- `FontSize` [int]? *(optional)*#
+ :::warning[Deprecated]
+ Use `title` in [Style](/api/class-screencast.mdx#screencast-show-actions-option-style) instead, for example `style: { title: 'font-size: 32px' }`.
+ :::
+
+
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"`.
-
+ - `Style` Style? *(optional)* Added in: v1.64#
+ - `Point` [string]? *(optional)*
+
+ CSS declarations for the marker at the action point. The marker is positioned at the action point, has zero size and is centered on the point, so its size and look come from this style. Not shown when omitted.
+ - `Highlight` [string]? *(optional)*
+
+ CSS declarations for the box that covers the target element. The box is positioned and sized to the element bounds. Not shown when omitted.
+ - `Title` [string]? *(optional)*
+
+ CSS declarations for the action title, for example `'font-size: 32px; background: #333'`. The title is placed according to [Position](/api/class-screencast.mdx#screencast-show-actions-option-position).
+
+ Styles of the action decorations. All decorations fade out over [Duration](/api/class-screencast.mdx#screencast-show-actions-option-duration).
+
+ **Usage**
+
+ ```js
+ await page.screencast.showActions({
+ style: {
+ point: 'width: 20px; height: 20px; border-radius: 50%; background: red',
+ highlight: 'outline: 2px solid #333; background: rgba(0, 128, 255, .15)',
+ title: 'font-size: 16px',
+ },
+ });
+ ```
+
**Returns**
- [Disposable]#
@@ -162,6 +191,11 @@ Starts the screencast. When [Path](/api/class-screencast.mdx#screencast-start-op
**Arguments**
- `options` `ScreencastStartOptions?` *(optional)*
+ - `Fps` [int]? *(optional)* Added in: v1.64#
+
+ Frame rate of the video recording in frames per second. Only used together with [Path](/api/class-screencast.mdx#screencast-start-option-path). Defaults to `25`.
+
+ Higher frame rates make animations and scrolling smoother at the cost of more CPU spent on encoding. Combine with [Size](/api/class-screencast.mdx#screencast-start-option-size) to record high resolution videos. The video can only contain as many distinct frames as the browser produces; Firefox and WebKit currently capture up to 25 frames per second.
- `OnFrame` [Func]<[ScreencastFrame], [Task]> *(optional)*#
- `Data` [byte][]
diff --git a/dotnet/docs/clock.mdx b/dotnet/docs/clock.mdx
index fd3a10b7bd..7d1860a2d9 100644
--- a/dotnet/docs/clock.mdx
+++ b/dotnet/docs/clock.mdx
@@ -27,6 +27,7 @@ The recommended approach is to use `setFixedTime` to set the time to a specific
[Page.Clock](/api/class-page.mdx#page-clock) overrides native global classes and functions related to time allowing them to be manually controlled:
- `Date`
+- `Temporal.Now`
- `setTimeout`
- `clearTimeout`
- `setInterval`
diff --git a/dotnet/docs/getting-started-cli.mdx b/dotnet/docs/getting-started-cli.mdx
index a1cbe714d5..a6dfcc6d50 100644
--- a/dotnet/docs/getting-started-cli.mdx
+++ b/dotnet/docs/getting-started-cli.mdx
@@ -217,7 +217,7 @@ playwright-cli video-stop --filename=f # stop video recording
### WebMCP
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and the tools can be listed and called directly instead of driving the UI:
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools a page registers are listed at the top of the page snapshot, and they can be called directly:
```bash
playwright-cli webmcp-list # list tools registered by the page
@@ -226,14 +226,6 @@ playwright-cli webmcp-call [--params] # call one, passing a JSON obje
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Sessions
The CLI keeps the browser profile in memory by default — cookies and storage state are preserved between calls within a session but lost when the browser closes. Use `--persistent` to save the profile to disk.
diff --git a/dotnet/docs/getting-started-mcp.mdx b/dotnet/docs/getting-started-mcp.mdx
index 6df15355ba..3787211884 100644
--- a/dotnet/docs/getting-started-mcp.mdx
+++ b/dotnet/docs/getting-started-mcp.mdx
@@ -131,20 +131,10 @@ Save and restore browser state including cookies and localStorage:
### WebMCP tools
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and `browser_webmcp_list` and `browser_webmcp_call` expose them:
-- **List tools**: See the tools the page registers, with their input schemas and annotations.
-- **Call a tool**: Invoke one by name, letting the page do the work instead of driving its UI.
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools of the current tab are offered as MCP tools named `webmcp_`.
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Configuration
### Headed mode
diff --git a/java/docs/api/class-apirequest.mdx b/java/docs/api/class-apirequest.mdx
index 05754592b6..f09417608f 100644
--- a/java/docs/api/class-apirequest.mdx
+++ b/java/docs/api/class-apirequest.mdx
@@ -35,7 +35,7 @@ APIRequest.newContext(options);
* baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
* baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in `http://localhost:3000/foo/bar.html`
* baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in `http://localhost:3000/bar.html`
- - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: 1.46#
+ - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: v1.46#
- `setOrigin` [String]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
diff --git a/java/docs/api/class-browser.mdx b/java/docs/api/class-browser.mdx
index 284c7e3817..22d6ad0342 100644
--- a/java/docs/api/class-browser.mdx
+++ b/java/docs/api/class-browser.mdx
@@ -214,7 +214,7 @@ browser.close();
- `setBypassCSP` [boolean] *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: 1.46#
+ - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: v1.46#
- `setOrigin` [String]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -306,7 +306,7 @@ browser.close();
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `setIsMobile` [boolean] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `setJavaScriptEnabled` [boolean] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -350,6 +350,9 @@ browser.close();
- `setRecordVideoDir` [Path] *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.close()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+ - `setRecordVideoFps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `setRecordVideoSize` RecordVideoSize *(optional)*#
- `setWidth` [int]
@@ -440,7 +443,7 @@ Browser.newPage(options);
- `setBypassCSP` [boolean] *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: 1.46#
+ - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: v1.46#
- `setOrigin` [String]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -532,7 +535,7 @@ Browser.newPage(options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `setIsMobile` [boolean] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `setJavaScriptEnabled` [boolean] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -576,6 +579,9 @@ Browser.newPage(options);
- `setRecordVideoDir` [Path] *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.close()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+ - `setRecordVideoFps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `setRecordVideoSize` RecordVideoSize *(optional)*#
- `setWidth` [int]
diff --git a/java/docs/api/class-browsertype.mdx b/java/docs/api/class-browsertype.mdx
index f9c8906f66..0c4fbe69e3 100644
--- a/java/docs/api/class-browsertype.mdx
+++ b/java/docs/api/class-browsertype.mdx
@@ -327,7 +327,7 @@ BrowserType.launchPersistentContext(userDataDir, options);
- `setChromiumSandbox` [boolean] *(optional)*#
Enable Chromium sandboxing. Defaults to `false`.
- - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: 1.46#
+ - `setClientCertificates` [List]<ClientCertificates> *(optional)* Added in: v1.46#
- `setOrigin` [String]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -451,7 +451,7 @@ BrowserType.launchPersistentContext(userDataDir, options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `setIsMobile` [boolean] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `setJavaScriptEnabled` [boolean] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -495,6 +495,9 @@ BrowserType.launchPersistentContext(userDataDir, options);
- `setRecordVideoDir` [Path] *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [BrowserContext.close()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+ - `setRecordVideoFps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `setRecordVideoSize` RecordVideoSize *(optional)*#
- `setWidth` [int]
diff --git a/java/docs/api/class-clock.mdx b/java/docs/api/class-clock.mdx
index 172149c1ca..2558358ef2 100644
--- a/java/docs/api/class-clock.mdx
+++ b/java/docs/api/class-clock.mdx
@@ -45,6 +45,7 @@ page.clock().fastForward("30:00");
Install fake implementations for the following time-related functions:
* `Date`
+* `Temporal.Now`
* `setTimeout`
* `clearTimeout`
* `setInterval`
diff --git a/java/docs/api/class-frame.mdx b/java/docs/api/class-frame.mdx
index 1ca2e1b6db..e189dbf680 100644
--- a/java/docs/api/class-frame.mdx
+++ b/java/docs/api/class-frame.mdx
@@ -136,8 +136,15 @@ Gets the full HTML contents of the frame, including the doctype.
```java
Frame.content();
+Frame.content(options);
```
+**Arguments**
+- `options` `Frame.ContentOptions` *(optional)*
+ - `setIncludeShadow` [boolean] *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [String]#
diff --git a/java/docs/api/class-page.mdx b/java/docs/api/class-page.mdx
index 5d3451d9bc..247ab55b5d 100644
--- a/java/docs/api/class-page.mdx
+++ b/java/docs/api/class-page.mdx
@@ -416,8 +416,15 @@ Gets the full HTML contents of the page, including the doctype.
```java
Page.content();
+Page.content(options);
```
+**Arguments**
+- `options` `Page.ContentOptions` *(optional)*
+ - `setIncludeShadow` [boolean] *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [String]#
diff --git a/java/docs/api/class-screencast.mdx b/java/docs/api/class-screencast.mdx
index 28c334b809..1b7d4f6f97 100644
--- a/java/docs/api/class-screencast.mdx
+++ b/java/docs/api/class-screencast.mdx
@@ -71,11 +71,40 @@ Screencast.showActions(options);
How long each annotation is displayed in milliseconds. Defaults to `500`.
- `setFontSize` [int] *(optional)*#
+ :::warning[Deprecated]
+ Use `title` in [setStyle](/api/class-screencast.mdx#screencast-show-actions-option-style) instead, for example `style: { title: 'font-size: 32px' }`.
+ :::
+
+
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"`.
-
+ - `setStyle` Style *(optional)* Added in: v1.64#
+ - `setPoint` [String] *(optional)*
+
+ CSS declarations for the marker at the action point. The marker is positioned at the action point, has zero size and is centered on the point, so its size and look come from this style. Not shown when omitted.
+ - `setHighlight` [String] *(optional)*
+
+ CSS declarations for the box that covers the target element. The box is positioned and sized to the element bounds. Not shown when omitted.
+ - `setTitle` [String] *(optional)*
+
+ CSS declarations for the action title, for example `'font-size: 32px; background: #333'`. The title is placed according to [setPosition](/api/class-screencast.mdx#screencast-show-actions-option-position).
+
+ Styles of the action decorations. All decorations fade out over [setDuration](/api/class-screencast.mdx#screencast-show-actions-option-duration).
+
+ **Usage**
+
+ ```js
+ await page.screencast.showActions({
+ style: {
+ point: 'width: 20px; height: 20px; border-radius: 50%; background: red',
+ highlight: 'outline: 2px solid #333; background: rgba(0, 128, 255, .15)',
+ title: 'font-size: 16px',
+ },
+ });
+ ```
+
**Returns**
- [Disposable]#
@@ -165,6 +194,11 @@ Starts the screencast. When [setPath](/api/class-screencast.mdx#screencast-start
**Arguments**
- `options` `Screencast.StartOptions` *(optional)*
+ - `setFps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the video recording in frames per second. Only used together with [setPath](/api/class-screencast.mdx#screencast-start-option-path). Defaults to `25`.
+
+ Higher frame rates make animations and scrolling smoother at the cost of more CPU spent on encoding. Combine with [setSize](/api/class-screencast.mdx#screencast-start-option-size) to record high resolution videos. The video can only contain as many distinct frames as the browser produces; Firefox and WebKit currently capture up to 25 frames per second.
- `setOnFrame` [Consumer]<ScreencastFrame> *(optional)*#
- `setData` [byte[]]
diff --git a/java/docs/clock.mdx b/java/docs/clock.mdx
index ffd4f1868e..c7f76c70b5 100644
--- a/java/docs/clock.mdx
+++ b/java/docs/clock.mdx
@@ -27,6 +27,7 @@ The recommended approach is to use `setFixedTime` to set the time to a specific
[Page.clock()](/api/class-page.mdx#page-clock) overrides native global classes and functions related to time allowing them to be manually controlled:
- `Date`
+- `Temporal.Now`
- `setTimeout`
- `clearTimeout`
- `setInterval`
diff --git a/java/docs/getting-started-cli.mdx b/java/docs/getting-started-cli.mdx
index d8a3850848..9f44649eea 100644
--- a/java/docs/getting-started-cli.mdx
+++ b/java/docs/getting-started-cli.mdx
@@ -217,7 +217,7 @@ playwright-cli video-stop --filename=f # stop video recording
### WebMCP
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and the tools can be listed and called directly instead of driving the UI:
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools a page registers are listed at the top of the page snapshot, and they can be called directly:
```bash
playwright-cli webmcp-list # list tools registered by the page
@@ -226,14 +226,6 @@ playwright-cli webmcp-call [--params] # call one, passing a JSON obje
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Sessions
The CLI keeps the browser profile in memory by default — cookies and storage state are preserved between calls within a session but lost when the browser closes. Use `--persistent` to save the profile to disk.
diff --git a/java/docs/getting-started-mcp.mdx b/java/docs/getting-started-mcp.mdx
index ac2b1b1108..9e8398074e 100644
--- a/java/docs/getting-started-mcp.mdx
+++ b/java/docs/getting-started-mcp.mdx
@@ -131,20 +131,10 @@ Save and restore browser state including cookies and localStorage:
### WebMCP tools
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and `browser_webmcp_list` and `browser_webmcp_call` expose them:
-- **List tools**: See the tools the page registers, with their input schemas and annotations.
-- **Call a tool**: Invoke one by name, letting the page do the work instead of driving its UI.
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools of the current tab are offered as MCP tools named `webmcp_`.
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Configuration
### Headed mode
diff --git a/nodejs/docs/api/class-androiddevice.mdx b/nodejs/docs/api/class-androiddevice.mdx
index bb7f8adc5e..f550681bdc 100644
--- a/nodejs/docs/api/class-androiddevice.mdx
+++ b/nodejs/docs/api/class-androiddevice.mdx
@@ -266,7 +266,7 @@ await androidDevice.launchBrowser(options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `isMobile` [boolean] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `javaScriptEnabled` [boolean] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -336,6 +336,9 @@ 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.
+ - `fps` [number] *(optional)*
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
@@ -345,10 +348,22 @@ await androidDevice.launchBrowser(options);
Position of the action title overlay. Defaults to `"top-right"`.
- `fontSize` [number] *(optional)*
- Font size of the action title in pixels. Defaults to `24`.
+ Font size of the action title in pixels. Defaults to `24`. Deprecated, use `style.title` instead.
- `cursor` "none" | "pointer" *(optional)*
Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.
+ - `style` [Object] *(optional)*
+ - `point` [string] *(optional)*
+
+ CSS declarations for the zero-sized marker centered on the action point. Not shown when omitted.
+ - `highlight` [string] *(optional)*
+
+ CSS declarations for the box that covers the target element. Not shown when omitted.
+ - `title` [string] *(optional)*
+
+ CSS declarations for the action title.
+
+ Styles of the action decorations.
If specified, enables visual annotations on interacted elements during video recording.
diff --git a/nodejs/docs/api/class-apirequest.mdx b/nodejs/docs/api/class-apirequest.mdx
index d358f3eb81..46f640c379 100644
--- a/nodejs/docs/api/class-apirequest.mdx
+++ b/nodejs/docs/api/class-apirequest.mdx
@@ -35,7 +35,7 @@ await apiRequest.newContext(options);
* baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
* baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in `http://localhost:3000/foo/bar.html`
* baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in `http://localhost:3000/bar.html`
- - `clientCertificates` [Array]<[Object]> *(optional)* Added in: 1.46#
+ - `clientCertificates` [Array]<[Object]> *(optional)* Added in: v1.46#
- `origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
diff --git a/nodejs/docs/api/class-browser.mdx b/nodejs/docs/api/class-browser.mdx
index bad7384eaa..a7534dc43a 100644
--- a/nodejs/docs/api/class-browser.mdx
+++ b/nodejs/docs/api/class-browser.mdx
@@ -215,7 +215,7 @@ If directly using this method to create [BrowserContext]s, it is best practice t
- `bypassCSP` [boolean] *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- - `clientCertificates` [Array]<[Object]> *(optional)* Added in: 1.46#
+ - `clientCertificates` [Array]<[Object]> *(optional)* Added in: v1.46#
- `origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -307,7 +307,7 @@ If directly using this method to create [BrowserContext]s, it is best practice t
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `isMobile` [boolean] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `javaScriptEnabled` [boolean] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -374,6 +374,9 @@ 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.
+ - `fps` [number] *(optional)*
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
@@ -383,10 +386,22 @@ If directly using this method to create [BrowserContext]s, it is best practice t
Position of the action title overlay. Defaults to `"top-right"`.
- `fontSize` [number] *(optional)*
- Font size of the action title in pixels. Defaults to `24`.
+ Font size of the action title in pixels. Defaults to `24`. Deprecated, use `style.title` instead.
- `cursor` "none" | "pointer" *(optional)*
Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.
+ - `style` [Object] *(optional)*
+ - `point` [string] *(optional)*
+
+ CSS declarations for the zero-sized marker centered on the action point. Not shown when omitted.
+ - `highlight` [string] *(optional)*
+
+ CSS declarations for the box that covers the target element. Not shown when omitted.
+ - `title` [string] *(optional)*
+
+ CSS declarations for the action title.
+
+ Styles of the action decorations.
If specified, enables visual annotations on interacted elements during video recording.
@@ -511,7 +526,7 @@ await browser.newPage(options);
- `bypassCSP` [boolean] *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- - `clientCertificates` [Array]<[Object]> *(optional)* Added in: 1.46#
+ - `clientCertificates` [Array]<[Object]> *(optional)* Added in: v1.46#
- `origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -603,7 +618,7 @@ await browser.newPage(options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `isMobile` [boolean] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `javaScriptEnabled` [boolean] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -670,6 +685,9 @@ 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.
+ - `fps` [number] *(optional)*
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
@@ -679,10 +697,22 @@ await browser.newPage(options);
Position of the action title overlay. Defaults to `"top-right"`.
- `fontSize` [number] *(optional)*
- Font size of the action title in pixels. Defaults to `24`.
+ Font size of the action title in pixels. Defaults to `24`. Deprecated, use `style.title` instead.
- `cursor` "none" | "pointer" *(optional)*
Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.
+ - `style` [Object] *(optional)*
+ - `point` [string] *(optional)*
+
+ CSS declarations for the zero-sized marker centered on the action point. Not shown when omitted.
+ - `highlight` [string] *(optional)*
+
+ CSS declarations for the box that covers the target element. Not shown when omitted.
+ - `title` [string] *(optional)*
+
+ CSS declarations for the action title.
+
+ Styles of the action decorations.
If specified, enables visual annotations on interacted elements during video recording.
diff --git a/nodejs/docs/api/class-browsercontext.mdx b/nodejs/docs/api/class-browsercontext.mdx
index e08d13c6fc..ca443f1919 100644
--- a/nodejs/docs/api/class-browsercontext.mdx
+++ b/nodejs/docs/api/class-browsercontext.mdx
@@ -124,7 +124,7 @@ The order of evaluation of multiple scripts installed via [browserContext.addIni
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-browsercontext.mdx#browser-context-add-init-script-option-arg) are exposed in the page and can be called from the init script. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Unlike functions passed to [page.evaluate()](/api/class-page.mdx#page-evaluate), functions passed to an init script are exposed in every new document, so they survive navigations. Defaults to `false`, in which case functions are not serializable and are silently dropped.
+ When set to `true`, functions passed inside [arg](/api/class-browsercontext.mdx#browser-context-add-init-script-option-arg) are exposed in the page and can be called from the init script. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Unlike functions passed to [page.evaluate()](/api/class-page.mdx#page-evaluate), functions passed to an init script are exposed in every new document, so they survive navigations. Defaults to `false`, in which case functions are not serializable and are silently dropped.
**Returns**
- [Promise]<[Disposable]>#
diff --git a/nodejs/docs/api/class-browsertype.mdx b/nodejs/docs/api/class-browsertype.mdx
index 9af80538c8..4e94a4c0f5 100644
--- a/nodejs/docs/api/class-browsertype.mdx
+++ b/nodejs/docs/api/class-browsertype.mdx
@@ -331,7 +331,7 @@ await browserType.launchPersistentContext(userDataDir, options);
- `chromiumSandbox` [boolean] *(optional)*#
Enable Chromium sandboxing. Defaults to `false`.
- - `clientCertificates` [Array]<[Object]> *(optional)* Added in: 1.46#
+ - `clientCertificates` [Array]<[Object]> *(optional)* Added in: v1.46#
- `origin` [string]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -450,7 +450,7 @@ await browserType.launchPersistentContext(userDataDir, options);
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `isMobile` [boolean] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `javaScriptEnabled` [boolean] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -517,6 +517,9 @@ 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.
+ - `fps` [number] *(optional)*
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
@@ -526,10 +529,22 @@ await browserType.launchPersistentContext(userDataDir, options);
Position of the action title overlay. Defaults to `"top-right"`.
- `fontSize` [number] *(optional)*
- Font size of the action title in pixels. Defaults to `24`.
+ Font size of the action title in pixels. Defaults to `24`. Deprecated, use `style.title` instead.
- `cursor` "none" | "pointer" *(optional)*
Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.
+ - `style` [Object] *(optional)*
+ - `point` [string] *(optional)*
+
+ CSS declarations for the zero-sized marker centered on the action point. Not shown when omitted.
+ - `highlight` [string] *(optional)*
+
+ CSS declarations for the box that covers the target element. Not shown when omitted.
+ - `title` [string] *(optional)*
+
+ CSS declarations for the action title.
+
+ Styles of the action decorations.
If specified, enables visual annotations on interacted elements during video recording.
diff --git a/nodejs/docs/api/class-clock.mdx b/nodejs/docs/api/class-clock.mdx
index 75df769d1b..e4b701bf1d 100644
--- a/nodejs/docs/api/class-clock.mdx
+++ b/nodejs/docs/api/class-clock.mdx
@@ -45,6 +45,7 @@ await page.clock.fastForward('30:00');
Install fake implementations for the following time-related functions:
* `Date`
+* `Temporal.Now`
* `setTimeout`
* `clearTimeout`
* `setInterval`
diff --git a/nodejs/docs/api/class-electron.mdx b/nodejs/docs/api/class-electron.mdx
index 1ef6fad819..4f541d156e 100644
--- a/nodejs/docs/api/class-electron.mdx
+++ b/nodejs/docs/api/class-electron.mdx
@@ -195,6 +195,9 @@ 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.
+ - `fps` [number] *(optional)*
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `showActions` [Object] *(optional)*
- `duration` [number] *(optional)*
@@ -204,10 +207,22 @@ await electron.launch(options);
Position of the action title overlay. Defaults to `"top-right"`.
- `fontSize` [number] *(optional)*
- Font size of the action title in pixels. Defaults to `24`.
+ Font size of the action title in pixels. Defaults to `24`. Deprecated, use `style.title` instead.
- `cursor` "none" | "pointer" *(optional)*
Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.
+ - `style` [Object] *(optional)*
+ - `point` [string] *(optional)*
+
+ CSS declarations for the zero-sized marker centered on the action point. Not shown when omitted.
+ - `highlight` [string] *(optional)*
+
+ CSS declarations for the box that covers the target element. Not shown when omitted.
+ - `title` [string] *(optional)*
+
+ CSS declarations for the action title.
+
+ Styles of the action decorations.
If specified, enables visual annotations on interacted elements during video recording.
diff --git a/nodejs/docs/api/class-elementhandle.mdx b/nodejs/docs/api/class-elementhandle.mdx
index f6209053a1..45c2327c1b 100644
--- a/nodejs/docs/api/class-elementhandle.mdx
+++ b/nodejs/docs/api/class-elementhandle.mdx
@@ -257,7 +257,7 @@ expect(await tweetHandle.$eval('.retweets', node => node.innerText)).toBe('10');
- `options` [Object] *(optional)*
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
@@ -310,7 +310,7 @@ expect(await feedHandle.$$eval('.tweet', nodes =>
- `options` [Object] *(optional)*
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
diff --git a/nodejs/docs/api/class-frame.mdx b/nodejs/docs/api/class-frame.mdx
index 7647330108..604ea5fd79 100644
--- a/nodejs/docs/api/class-frame.mdx
+++ b/nodejs/docs/api/class-frame.mdx
@@ -131,8 +131,15 @@ Gets the full HTML contents of the frame, including the doctype.
```js
await frame.content();
+await frame.content(options);
```
+**Arguments**
+- `options` [Object] *(optional)*
+ - `includeShadow` [boolean] *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [Promise]<[string]>#
@@ -253,10 +260,13 @@ await bodyHandle.dispose();
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-frame.mdx#frame-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-frame.mdx#frame-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
@@ -307,7 +317,10 @@ await resultHandle.dispose();
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-frame.mdx#frame-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-frame.mdx#frame-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
**Returns**
- [Promise]<[JSHandle]>#
@@ -1240,7 +1253,7 @@ const html = await frame.$eval('.main-container', (e, suffix) => e.outerHTML + s
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
@@ -1283,7 +1296,7 @@ const divsCounts = await frame.$$eval('div', (divs, min) => divs.length >= min,
- `options` [Object] *(optional)*
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
diff --git a/nodejs/docs/api/class-jshandle.mdx b/nodejs/docs/api/class-jshandle.mdx
index 2672c8dd61..24d8234b40 100644
--- a/nodejs/docs/api/class-jshandle.mdx
+++ b/nodejs/docs/api/class-jshandle.mdx
@@ -84,7 +84,10 @@ expect(await tweetHandle.evaluate(node => node.innerText)).toBe('10 retweets');
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-jshandle.mdx#js-handle-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-jshandle.mdx#js-handle-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
**Returns**
- [Promise]<[Serializable]>#
@@ -122,7 +125,10 @@ await jsHandle.evaluateHandle(pageFunction, arg, options);
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-jshandle.mdx#js-handle-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-jshandle.mdx#js-handle-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
**Returns**
- [Promise]<[JSHandle]>#
diff --git a/nodejs/docs/api/class-locator.mdx b/nodejs/docs/api/class-locator.mdx
index 63efe1fca1..4923248558 100644
--- a/nodejs/docs/api/class-locator.mdx
+++ b/nodejs/docs/api/class-locator.mdx
@@ -897,7 +897,10 @@ console.log(result); // prints "myId text 56"
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-locator.mdx#locator-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-locator.mdx#locator-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
- `signal` [AbortSignal] *(optional)* Added in: v1.62#
Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
@@ -906,7 +909,7 @@ console.log(result); // prints "myId text 56"
Maximum time in milliseconds to wait for the locator before evaluating. Note that after locator is resolved, evaluation itself is not limited by the timeout. Defaults to `0` - no timeout.
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
@@ -944,7 +947,7 @@ const moreThanTen = await locator.evaluateAll((divs, min) => divs.length > min,
- `options` [Object] *(optional)*
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
@@ -982,7 +985,10 @@ await locator.evaluateHandle(pageFunction, arg, options);
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-locator.mdx#locator-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-locator.mdx#locator-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
- `signal` [AbortSignal] *(optional)* Added in: v1.62#
Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
diff --git a/nodejs/docs/api/class-page.mdx b/nodejs/docs/api/class-page.mdx
index 16d20d7e68..6248c9202f 100644
--- a/nodejs/docs/api/class-page.mdx
+++ b/nodejs/docs/api/class-page.mdx
@@ -98,7 +98,7 @@ The order of evaluation of multiple scripts installed via [browserContext.addIni
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-page.mdx#page-add-init-script-option-arg) are exposed in the page and can be called from the init script. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Unlike functions passed to [page.evaluate()](/api/class-page.mdx#page-evaluate), functions passed to an init script are exposed in every new document, so they survive navigations. Defaults to `false`, in which case functions are not serializable and are silently dropped.
+ When set to `true`, functions passed inside [arg](/api/class-page.mdx#page-add-init-script-option-arg) are exposed in the page and can be called from the init script. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Unlike functions passed to [page.evaluate()](/api/class-page.mdx#page-evaluate), functions passed to an init script are exposed in every new document, so they survive navigations. Defaults to `false`, in which case functions are not serializable and are silently dropped.
**Returns**
- [Promise]<[Disposable]>#
@@ -469,8 +469,15 @@ Gets the full HTML contents of the page, including the doctype.
```js
await page.content();
+await page.content(options);
```
+**Arguments**
+- `options` [Object] *(optional)*
+ - `includeShadow` [boolean] *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [Promise]<[string]>#
@@ -676,10 +683,13 @@ await bodyHandle.dispose();
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-page.mdx#page-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-page.mdx#page-evaluate-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
@@ -728,7 +738,10 @@ await resultHandle.dispose();
- `options` [Object] *(optional)*
- `exposeFunctions` [boolean] *(optional)* Added in: v1.62#
- When set to `true`, functions passed inside [arg](/api/class-page.mdx#page-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames and worlds of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ When set to `true`, functions passed inside [arg](/api/class-page.mdx#page-evaluate-handle-option-arg) are exposed in the page and can be called from the page function. Calling one returns a [Promise] of its result. Under the hood, each function is exposed via [page.exposeFunction()](/api/class-page.mdx#page-expose-function), so it is technically accessible from all frames of the page. Exposed functions are cleared upon the top-level navigation. Defaults to `false`, in which case functions are not serializable and passing one throws an error.
+ - `serialize` [Array]<"Map" | "Set"> *(optional)* Added in: v1.64#
+
+ Additional built-in types to preserve in the evaluation argument and return value, including nested collections and circular references. Supports `"Map"` and `"Set"`. For example, `serialize: ['Map', 'Set']` preserves both [Map] and [Set] instances. Defaults to an empty array, in which case these types are serialized as plain objects.
**Returns**
- [Promise]<[JSHandle]>#
@@ -3316,7 +3329,7 @@ const preloadHrefTS = await page.$eval('link[rel=preload]', (el: HTMLLinkElement
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
@@ -3357,7 +3370,7 @@ const divCounts = await page.$$eval('div', (divs, min) => divs.length >= min, 10
- `options` [Object] *(optional)*
- `world` "main" | "utility" *(optional)* Added in: v1.64#
- The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`.
+ The JavaScript world to evaluate the function in. `"main"` is the world where the page's own scripts run. `"utility"` is an isolated world that shares the DOM with the page, but has a separate JavaScript environment that the page's scripts cannot observe or tamper with. Defaults to `"main"`. Exposed functions are only available in the `"main"` world.
**Returns**
- [Promise]<[Serializable]>#
diff --git a/nodejs/docs/api/class-screencast.mdx b/nodejs/docs/api/class-screencast.mdx
index 18bf822da3..96e6c3ad41 100644
--- a/nodejs/docs/api/class-screencast.mdx
+++ b/nodejs/docs/api/class-screencast.mdx
@@ -71,11 +71,40 @@ await screencast.showActions(options);
How long each annotation is displayed in milliseconds. Defaults to `500`.
- `fontSize` [number] *(optional)*#
+ :::warning[Deprecated]
+ Use `title` in [style](/api/class-screencast.mdx#screencast-show-actions-option-style) instead, for example `style: { title: 'font-size: 32px' }`.
+ :::
+
+
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"`.
-
+ - `style` [Object] *(optional)* Added in: v1.64#
+ - `point` [string] *(optional)*
+
+ CSS declarations for the marker at the action point. The marker is positioned at the action point, has zero size and is centered on the point, so its size and look come from this style. Not shown when omitted.
+ - `highlight` [string] *(optional)*
+
+ CSS declarations for the box that covers the target element. The box is positioned and sized to the element bounds. Not shown when omitted.
+ - `title` [string] *(optional)*
+
+ CSS declarations for the action title, for example `'font-size: 32px; background: #333'`. The title is placed according to [position](/api/class-screencast.mdx#screencast-show-actions-option-position).
+
+ Styles of the action decorations. All decorations fade out over [duration](/api/class-screencast.mdx#screencast-show-actions-option-duration).
+
+ **Usage**
+
+ ```js
+ await page.screencast.showActions({
+ style: {
+ point: 'width: 20px; height: 20px; border-radius: 50%; background: red',
+ highlight: 'outline: 2px solid #333; background: rgba(0, 128, 255, .15)',
+ title: 'font-size: 16px',
+ },
+ });
+ ```
+
**Returns**
- [Promise]<[Disposable]>#
@@ -184,6 +213,11 @@ await page.screencast.stop();
**Arguments**
- `options` [Object] *(optional)*
+ - `fps` [number] *(optional)* Added in: v1.64#
+
+ Frame rate of the video recording in frames per second. Only used together with [path](/api/class-screencast.mdx#screencast-start-option-path). Defaults to `25`.
+
+ Higher frame rates make animations and scrolling smoother at the cost of more CPU spent on encoding. Combine with [size](/api/class-screencast.mdx#screencast-start-option-size) to record high resolution videos. The video can only contain as many distinct frames as the browser produces; Firefox and WebKit currently capture up to 25 frames per second.
- `onFrame` [function]\([Object]\):[Promise] *(optional)*#
- `data` [Buffer]
diff --git a/nodejs/docs/api/class-test.mdx b/nodejs/docs/api/class-test.mdx
index 691ae3da63..4b5a1640cf 100644
--- a/nodejs/docs/api/class-test.mdx
+++ b/nodejs/docs/api/class-test.mdx
@@ -564,6 +564,14 @@ Learn more about the execution modes [here](../test-parallel.mdx).
test('runs second', async ({ page }) => {});
```
+* Declaring locks for all tests in a scope.
+
+ ```js
+ test.describe.configure({ lock: 'user-settings' });
+ test('update user settings', async ({ page }) => {});
+ test('reset user settings', async ({ page }) => {});
+ ```
+
* Run multiple describes in parallel, but tests inside each describe in order.
```js
@@ -584,6 +592,9 @@ Learn more about the execution modes [here](../test-parallel.mdx).
**Arguments**
- `options` [Object] *(optional)*
+ - `lock` [string] | [Array]<[string]> *(optional)* Added in: v1.64#
+
+ Additional named locks for all tests in the enclosing scope, including nested groups. Locks are added to those declared in [test.describe()](/api/class-test.mdx#test-describe) details and previous calls to [test.describe.configure()](/api/class-test.mdx#test-describe-configure).
- `mode` "default" | "parallel" | "serial" *(optional)*#
Execution mode. Learn more about the execution modes [here](../test-parallel.mdx).
diff --git a/nodejs/docs/api/class-testconfig.mdx b/nodejs/docs/api/class-testconfig.mdx
index 7c023b89ac..54df38efd3 100644
--- a/nodejs/docs/api/class-testconfig.mdx
+++ b/nodejs/docs/api/class-testconfig.mdx
@@ -141,6 +141,9 @@ export default defineConfig({
- `threshold` [number] *(optional)*
An acceptable perceived color difference between the same pixel in compared images, ranging from `0` (strict) and `1` (lax). `"pixelmatch"` comparator computes color difference in [YIQ color space](https://en.wikipedia.org/wiki/YIQ) and defaults `threshold` value to `0.2`.
+ - `type` "png" | "webp" *(optional)*
+
+ Format of the screenshots taken when the snapshot name is omitted, defaults to `"png"`. Snapshots with an explicit name use the format matching their `.png` or `.webp` extension.
- `pathTemplate` [string] *(optional)*
A template controlling location of the screenshots. See [testConfig.snapshotPathTemplate](/api/class-testconfig.mdx#test-config-snapshot-path-template) for details.
diff --git a/nodejs/docs/api/class-testoptions.mdx b/nodejs/docs/api/class-testoptions.mdx
index 205b8cb7c4..313a60cbb5 100644
--- a/nodejs/docs/api/class-testoptions.mdx
+++ b/nodejs/docs/api/class-testoptions.mdx
@@ -200,7 +200,7 @@ export default defineConfig({
### clientCertificates {/* #test-options-client-certificates */}
-Added in: 1.46testOptions.clientCertificates
+Added in: v1.46testOptions.clientCertificates
TLS Client Authentication allows the server to request a client certificate and verify it.
@@ -589,7 +589,7 @@ export default defineConfig({
Added in: v1.10testOptions.isMobile
-Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
**Usage**
@@ -824,6 +824,36 @@ export default defineConfig({
---
+### screen {/* #test-options-screen */}
+
+Added in: v1.64testOptions.screen
+
+Emulates consistent window screen size available inside web page via `window.screen`. Is only used when the [testOptions.viewport](/api/class-testoptions.mdx#test-options-viewport) is set.
+
+**Usage**
+
+```js title="playwright.config.ts"
+import { defineConfig } from '@playwright/test';
+
+export default defineConfig({
+ use: {
+ viewport: { width: 390, height: 664 },
+ screen: { width: 390, height: 844 },
+ },
+});
+```
+
+**Type**
+- [Object]
+ - `width` [number]
+
+ page width in pixels.
+ - `height` [number]
+
+ page height in pixels.
+
+---
+
### screenshot {/* #test-options-screenshot */}
Added in: v1.10testOptions.screenshot
@@ -1076,6 +1106,9 @@ Learn more about [recording trace](../test-use-options.mdx#recording-options).
Capture a screenshot of the page on every action. Optional.
Which snapshots to capture on every action. Passing `true` is a shortcut for `{ dom: true }`. Defaults to true. Optional.
+ - `coverage` [boolean] *(optional)*
+
+ Whether to collect coverage from istanbul-instrumented application code into the trace. Defaults to false. Optional.
- `sources` [boolean] *(optional)*
Whether to include source files for trace actions. Defaults to true. Optional.
@@ -1122,7 +1155,9 @@ See [video modes](../test-use-options.mdx#video-modes) for a side-by-side compar
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 `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.
+To record smoother video of animations and scrolling, pass `fps`, for example `{ mode: 'on', size: { width: 1920, height: 1080 }, fps: 60 }`. Higher frame rates and sizes use more CPU for encoding. Firefox and WebKit currently capture up to 25 frames per second.
+
+To annotate actions in the video, pass `show` with `actions` and/or `test` sub-options. The `actions` option controls visual highlights on interacted elements, each shown for an optional `duration` in milliseconds (defaults to `500`). The `test` option controls which test information is displayed as a status overlay.
**Usage**
@@ -1151,6 +1186,9 @@ Learn more about [recording video](../test-use-options.mdx#recording-options).
Size of the recorded video. Optional.
+ - `fps` [number] *(optional)*
+
+ Frame rate of the recorded video in frames per second. Defaults to `25`.
- `show` [Object] *(optional)*
- `actions` [Object] *(optional)*
- `duration` [number] *(optional)*
@@ -1161,14 +1199,26 @@ Learn more about [recording video](../test-use-options.mdx#recording-options).
Position of the action title overlay. Defaults to `"top-right"`.
- `fontSize` [number] *(optional)*
- Font size of the action title in pixels. Defaults to `24`.
+ Font size of the action title in pixels. Defaults to `24`. Deprecated, use `style.title` instead.
- `cursor` "none" | "pointer" *(optional)*
Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from the previous action point to the next one. `"none"` disables the cursor decoration.
+ - `style` [Object] *(optional)*
+ - `point` [string] *(optional)*
+
+ CSS declarations for the zero-sized marker centered on the action point. Not shown when omitted.
+ - `highlight` [string] *(optional)*
+
+ CSS declarations for the box that covers the target element. Not shown when omitted.
+ - `title` [string] *(optional)*
+
+ CSS declarations for the action title.
+
+ Styles of the action decorations.
Controls visual annotations on interacted elements.
- `test` [Object] *(optional)*
- - `level` "file" | "test" | "step" *(optional)*
+ - `level` "file" | "title" | "step" *(optional)*
Level of the detail to include about the current test.
- `position` "top-left" | "top" | "top-right" | "bottom-left" | "bottom" | "bottom-right" *(optional)*
diff --git a/nodejs/docs/api/class-testproject.mdx b/nodejs/docs/api/class-testproject.mdx
index 8ab4446e6d..50209587a2 100644
--- a/nodejs/docs/api/class-testproject.mdx
+++ b/nodejs/docs/api/class-testproject.mdx
@@ -54,6 +54,43 @@ export default defineConfig({
## Properties
+### default {/* #test-project-default */}
+
+Added in: v1.64testProject.default
+
+Whether the project runs when no `--project` command line option is passed. Defaults to `true`.
+
+To run a project with `default: false`, select it with the `--project` command line option.
+
+A project with `default: false` still runs when another running project lists it in [testProject.dependencies](/api/class-testproject.mdx#test-project-dependencies) or [testProject.teardown](/api/class-testproject.mdx#test-project-teardown).
+
+**Usage**
+
+```js title="playwright.config.ts"
+import { defineConfig } from '@playwright/test';
+
+export default defineConfig({
+ projects: [
+ {
+ name: 'chromium',
+ use: devices['Desktop Chrome'],
+ },
+ {
+ name: 'slow',
+ testDir: './slow-tests',
+ default: false,
+ },
+ ],
+});
+```
+
+Now `npx playwright test` only runs `chromium`, while `npx playwright test --project=slow` runs `slow`.
+
+**Type**
+- [boolean]
+
+---
+
### dependencies {/* #test-project-dependencies */}
Added in: v1.31testProject.dependencies
@@ -138,6 +175,9 @@ testProject.expect
- `stylePath` [string] | [Array]<[string]> *(optional)*
See [style](/api/class-page.mdx#page-screenshot-option-style) in [page.screenshot()](/api/class-page.mdx#page-screenshot).
+ - `type` "png" | "webp" *(optional)*
+
+ Format of the screenshots taken when the snapshot name is omitted, defaults to `"png"`. Snapshots with an explicit name use the format matching their `.png` or `.webp` extension.
- `pathTemplate` [string] *(optional)*
A template controlling location of the screenshots. See [testProject.snapshotPathTemplate](/api/class-testproject.mdx#test-project-snapshot-path-template) for details.
diff --git a/nodejs/docs/api/class-tracing.mdx b/nodejs/docs/api/class-tracing.mdx
index 0e8b503404..7293313baa 100644
--- a/nodejs/docs/api/class-tracing.mdx
+++ b/nodejs/docs/api/class-tracing.mdx
@@ -117,6 +117,9 @@ await context.tracing.stop({ path: 'trace.zip' });
**Arguments**
- `options` [Object] *(optional)*
+ - `coverage` [boolean] *(optional)* Added in: v1.64#
+
+ Whether to collect code coverage from istanbul-instrumented application code. Build the application with an istanbul instrumentation plugin, for example [`vite-plugin-istanbul`](https://www.npmjs.com/package/vite-plugin-istanbul) or [`babel-plugin-istanbul`](https://www.npmjs.com/package/babel-plugin-istanbul), so that pages expose the `window.__coverage__` object. Playwright collects accumulated counters from all pages and frames, including right before navigations and page closes, and stores them in istanbul format inside the trace file.
- `live` [boolean] *(optional)* Added in: v1.59#
When enabled, the trace is written to an unarchived file that is updated in real time as actions occur, instead of caching changes and archiving them into a zip file at the end. This is useful for live trace viewing during test execution.
diff --git a/nodejs/docs/clock.mdx b/nodejs/docs/clock.mdx
index c7c43a4f9d..76e6dbdfd7 100644
--- a/nodejs/docs/clock.mdx
+++ b/nodejs/docs/clock.mdx
@@ -27,6 +27,7 @@ The recommended approach is to use `setFixedTime` to set the time to a specific
[page.clock](/api/class-page.mdx#page-clock) overrides native global classes and functions related to time allowing them to be manually controlled:
- `Date`
+- `Temporal.Now`
- `setTimeout`
- `clearTimeout`
- `setInterval`
diff --git a/nodejs/docs/getting-started-cli.mdx b/nodejs/docs/getting-started-cli.mdx
index ef67c3710d..0b5d8d1b15 100644
--- a/nodejs/docs/getting-started-cli.mdx
+++ b/nodejs/docs/getting-started-cli.mdx
@@ -217,7 +217,7 @@ playwright-cli video-stop --filename=f # stop video recording
### WebMCP
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and the tools can be listed and called directly instead of driving the UI:
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools a page registers are listed at the top of the page snapshot, and they can be called directly:
```bash
playwright-cli webmcp-list # list tools registered by the page
@@ -226,14 +226,6 @@ playwright-cli webmcp-call [--params] # call one, passing a JSON obje
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Sessions
The CLI keeps the browser profile in memory by default — cookies and storage state are preserved between calls within a session but lost when the browser closes. Use `--persistent` to save the profile to disk.
diff --git a/nodejs/docs/getting-started-mcp.mdx b/nodejs/docs/getting-started-mcp.mdx
index 77d5a918fb..3b455c1d00 100644
--- a/nodejs/docs/getting-started-mcp.mdx
+++ b/nodejs/docs/getting-started-mcp.mdx
@@ -131,20 +131,10 @@ Save and restore browser state including cookies and localStorage:
### WebMCP tools
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and `browser_webmcp_list` and `browser_webmcp_call` expose them:
-- **List tools**: See the tools the page registers, with their input schemas and annotations.
-- **Call a tool**: Invoke one by name, letting the page do the work instead of driving its UI.
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools of the current tab are offered as MCP tools named `webmcp_`.
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Configuration
### Headed mode
diff --git a/nodejs/docs/test-parallel.mdx b/nodejs/docs/test-parallel.mdx
index a6590410df..47fbea603c 100644
--- a/nodejs/docs/test-parallel.mdx
+++ b/nodejs/docs/test-parallel.mdx
@@ -158,6 +158,12 @@ test('reset the database', { lock: ['database', 'external-api'] }, async () => {
});
```
+You can also add locks to the enclosing file or describe group with [test.describe.configure()](/api/class-test.mdx#test-describe-configure). Repeated calls add locks without removing existing ones.
+
+```js
+test.describe.configure({ lock: 'user-settings' });
+```
+
Playwright acquires all the locks of a test before the test starts and releases them when it finishes.
:::note
diff --git a/nodejs/docs/test-snapshots.mdx b/nodejs/docs/test-snapshots.mdx
index 37bb0c9600..48eb8dfa77 100644
--- a/nodejs/docs/test-snapshots.mdx
+++ b/nodejs/docs/test-snapshots.mdx
@@ -59,6 +59,20 @@ Snapshots are stored as PNG by default. Give the snapshot a name with the `.webp
await expect(page).toHaveScreenshot('landing.webp');
```
+To store all unnamed snapshots as WebP, set the `type` option in the [testConfig.expect](/api/class-testconfig.mdx#test-config-expect) configuration:
+
+```js title="playwright.config.ts"
+import { defineConfig } from '@playwright/test';
+
+export default defineConfig({
+ expect: {
+ toHaveScreenshot: {
+ type: 'webp',
+ },
+ },
+});
+```
+
> Note that `toHaveScreenshot()` also accepts an array of path segments to the snapshot file such as `expect().toHaveScreenshot(['relative', 'path', 'to', 'snapshot.png'])`.
> However, this path must stay within the snapshots directory for each test file (i.e. `a.spec.js-snapshots`), otherwise it will throw.
diff --git a/python/docs/api/class-apirequest.mdx b/python/docs/api/class-apirequest.mdx
index 93cd2e10f5..b7f7eb14c6 100644
--- a/python/docs/api/class-apirequest.mdx
+++ b/python/docs/api/class-apirequest.mdx
@@ -34,7 +34,7 @@ api_request.new_context(**kwargs)
* baseURL: `http://localhost:3000` and sending request to `/bar.html` results in `http://localhost:3000/bar.html`
* baseURL: `http://localhost:3000/foo/` and sending request to `./bar.html` results in `http://localhost:3000/foo/bar.html`
* baseURL: `http://localhost:3000/foo` (without trailing slash) and navigating to `./bar.html` results in `http://localhost:3000/bar.html`
-- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: 1.46#
+- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: v1.46#
- `origin` [str]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
diff --git a/python/docs/api/class-browser.mdx b/python/docs/api/class-browser.mdx
index 55ce5335b2..b391da442f 100644
--- a/python/docs/api/class-browser.mdx
+++ b/python/docs/api/class-browser.mdx
@@ -217,7 +217,7 @@ await browser.close()
- `bypass_csp` [bool] *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
-- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: 1.46#
+- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: v1.46#
- `origin` [str]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -309,7 +309,7 @@ await browser.close()
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `is_mobile` [bool] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `java_script_enabled` [bool] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -356,6 +356,9 @@ await browser.close()
- `record_video_dir` [Union]\[[str], [pathlib.Path]\] *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [browser_context.close()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+- `record_video_fps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `record_video_size` [Dict] *(optional)*#
- `width` [int]
@@ -479,7 +482,7 @@ browser.new_page(**kwargs)
- `bypass_csp` [bool] *(optional)*#
Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
-- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: 1.46#
+- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: v1.46#
- `origin` [str]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -571,7 +574,7 @@ browser.new_page(**kwargs)
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `is_mobile` [bool] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `java_script_enabled` [bool] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -618,6 +621,9 @@ browser.new_page(**kwargs)
- `record_video_dir` [Union]\[[str], [pathlib.Path]\] *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [browser_context.close()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+- `record_video_fps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `record_video_size` [Dict] *(optional)*#
- `width` [int]
diff --git a/python/docs/api/class-browsertype.mdx b/python/docs/api/class-browsertype.mdx
index e6d7b6ed4e..82d07fe509 100644
--- a/python/docs/api/class-browsertype.mdx
+++ b/python/docs/api/class-browsertype.mdx
@@ -379,7 +379,7 @@ browser_type.launch_persistent_context(user_data_dir, **kwargs)
- `chromium_sandbox` [bool] *(optional)*#
Enable Chromium sandboxing. Defaults to `false`.
-- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: 1.46#
+- `client_certificates` [List]\[[Dict]\] *(optional)* Added in: v1.46#
- `origin` [str]
Exact origin that the certificate is valid for. Origin includes `https` protocol, a hostname and optionally a port.
@@ -500,7 +500,7 @@ browser_type.launch_persistent_context(user_data_dir, **kwargs)
Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- `is_mobile` [bool] *(optional)*#
- Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false` and is not supported in Firefox. Learn more about [mobile emulation](../emulation.mdx#ismobile).
+ Whether the `meta viewport` tag is taken into account and touch events are enabled. isMobile is a part of device, so you don't actually need to set it manually. Defaults to `false`. Learn more about [mobile emulation](../emulation.mdx#ismobile).
- `java_script_enabled` [bool] *(optional)*#
Whether or not to enable JavaScript in the context. Defaults to `true`. Learn more about [disabling JavaScript](../emulation.mdx#javascript-enabled).
@@ -547,6 +547,9 @@ browser_type.launch_persistent_context(user_data_dir, **kwargs)
- `record_video_dir` [Union]\[[str], [pathlib.Path]\] *(optional)*#
Enables video recording for all pages into the specified directory. If not specified videos are not recorded. Make sure to call [browser_context.close()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
+- `record_video_fps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the recorded videos in frames per second. Defaults to `25`. Firefox and WebKit currently capture up to 25 frames per second.
- `record_video_size` [Dict] *(optional)*#
- `width` [int]
diff --git a/python/docs/api/class-clock.mdx b/python/docs/api/class-clock.mdx
index 0080354a1a..e7921ace83 100644
--- a/python/docs/api/class-clock.mdx
+++ b/python/docs/api/class-clock.mdx
@@ -66,6 +66,7 @@ await page.clock.fast_forward("30:00")
Install fake implementations for the following time-related functions:
* `Date`
+* `Temporal.Now`
* `setTimeout`
* `clearTimeout`
* `setInterval`
diff --git a/python/docs/api/class-frame.mdx b/python/docs/api/class-frame.mdx
index bbe21fb2c2..54e79117cd 100644
--- a/python/docs/api/class-frame.mdx
+++ b/python/docs/api/class-frame.mdx
@@ -155,8 +155,14 @@ Gets the full HTML contents of the frame, including the doctype.
```python
frame.content()
+frame.content(**kwargs)
```
+**Arguments**
+- `include_shadow` [bool] *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [str]#
diff --git a/python/docs/api/class-page.mdx b/python/docs/api/class-page.mdx
index 2dbc091350..fca9ba2b4f 100644
--- a/python/docs/api/class-page.mdx
+++ b/python/docs/api/class-page.mdx
@@ -570,8 +570,14 @@ Gets the full HTML contents of the page, including the doctype.
```python
page.content()
+page.content(**kwargs)
```
+**Arguments**
+- `include_shadow` [bool] *(optional)* Added in: v1.64#
+
+ When true, contents of open shadow roots are included as [declarative shadow DOM](https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM#declaratively_with_html), i.e. `` elements nested inside their host elements. Closed shadow roots are never included. Defaults to `false`.
+
**Returns**
- [str]#
diff --git a/python/docs/api/class-screencast.mdx b/python/docs/api/class-screencast.mdx
index f95ed42a81..c5b3fb4ce1 100644
--- a/python/docs/api/class-screencast.mdx
+++ b/python/docs/api/class-screencast.mdx
@@ -70,11 +70,40 @@ screencast.show_actions(**kwargs)
How long each annotation is displayed in milliseconds. Defaults to `500`.
- `font_size` [int] *(optional)*#
+ :::warning[Deprecated]
+ Use `title` in [style](/api/class-screencast.mdx#screencast-show-actions-option-style) instead, for example `style: { title: 'font-size: 32px' }`.
+ :::
+
+
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"`.
-
+- `style` [Dict] *(optional)* Added in: v1.64#
+ - `point` [str] *(optional)*
+
+ CSS declarations for the marker at the action point. The marker is positioned at the action point, has zero size and is centered on the point, so its size and look come from this style. Not shown when omitted.
+ - `highlight` [str] *(optional)*
+
+ CSS declarations for the box that covers the target element. The box is positioned and sized to the element bounds. Not shown when omitted.
+ - `title` [str] *(optional)*
+
+ CSS declarations for the action title, for example `'font-size: 32px; background: #333'`. The title is placed according to [position](/api/class-screencast.mdx#screencast-show-actions-option-position).
+
+ Styles of the action decorations. All decorations fade out over [duration](/api/class-screencast.mdx#screencast-show-actions-option-duration).
+
+ **Usage**
+
+ ```js
+ await page.screencast.showActions({
+ style: {
+ point: 'width: 20px; height: 20px; border-radius: 50%; background: red',
+ highlight: 'outline: 2px solid #333; background: rgba(0, 128, 255, .15)',
+ title: 'font-size: 16px',
+ },
+ });
+ ```
+
**Returns**
- [Disposable]#
@@ -161,6 +190,11 @@ Starts the screencast. When [path](/api/class-screencast.mdx#screencast-start-op
**Usage**
**Arguments**
+- `fps` [int] *(optional)* Added in: v1.64#
+
+ Frame rate of the video recording in frames per second. Only used together with [path](/api/class-screencast.mdx#screencast-start-option-path). Defaults to `25`.
+
+ Higher frame rates make animations and scrolling smoother at the cost of more CPU spent on encoding. Combine with [size](/api/class-screencast.mdx#screencast-start-option-size) to record high resolution videos. The video can only contain as many distinct frames as the browser produces; Firefox and WebKit currently capture up to 25 frames per second.
- `on_frame` [Callable]\[[Dict]\]:[Promise] *(optional)*#
- `data` [bytes]
diff --git a/python/docs/clock.mdx b/python/docs/clock.mdx
index e69f17b0d7..f49d380bcb 100644
--- a/python/docs/clock.mdx
+++ b/python/docs/clock.mdx
@@ -27,6 +27,7 @@ The recommended approach is to use `setFixedTime` to set the time to a specific
[page.clock](/api/class-page.mdx#page-clock) overrides native global classes and functions related to time allowing them to be manually controlled:
- `Date`
+- `Temporal.Now`
- `setTimeout`
- `clearTimeout`
- `setInterval`
diff --git a/python/docs/getting-started-cli.mdx b/python/docs/getting-started-cli.mdx
index 5e87f48ea2..2e94771d9e 100644
--- a/python/docs/getting-started-cli.mdx
+++ b/python/docs/getting-started-cli.mdx
@@ -217,7 +217,7 @@ playwright-cli video-stop --filename=f # stop video recording
### WebMCP
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and the tools can be listed and called directly instead of driving the UI:
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools a page registers are listed at the top of the page snapshot, and they can be called directly:
```bash
playwright-cli webmcp-list # list tools registered by the page
@@ -226,14 +226,6 @@ playwright-cli webmcp-call [--params] # call one, passing a JSON obje
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Sessions
The CLI keeps the browser profile in memory by default — cookies and storage state are preserved between calls within a session but lost when the browser closes. Use `--persistent` to save the profile to disk.
diff --git a/python/docs/getting-started-mcp.mdx b/python/docs/getting-started-mcp.mdx
index 63d3c3d563..6bbafa19c9 100644
--- a/python/docs/getting-started-mcp.mdx
+++ b/python/docs/getting-started-mcp.mdx
@@ -131,20 +131,10 @@ Save and restore browser state including cookies and localStorage:
### WebMCP tools
-Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. When a page has them, the page status after a navigation reports how many, and `browser_webmcp_list` and `browser_webmcp_call` expose them:
-- **List tools**: See the tools the page registers, with their input schemas and annotations.
-- **Call a tool**: Invoke one by name, letting the page do the work instead of driving its UI.
+Pages can register their own tools for agents through the experimental [WebMCP](https://webmachinelearning.github.io/webmcp/) API. The tools of the current tab are offered as MCP tools named `webmcp_`.
Tool names, descriptions, schemas and results are provided by the page, so treat them as untrusted input.
-WebMCP is experimental and only available in Chromium and Firefox behind a browser flag, passed through the [configuration file](#configuration-file):
-
-```json
-{
- "browser": { "launchOptions": { "args": ["--enable-features=WebMCP"] } }
-}
-```
-
## Configuration
### Headed mode