diff --git a/dotnet/docs/api/class-apirequestcontext.mdx b/dotnet/docs/api/class-apirequestcontext.mdx
index 2472f5c480..c796f0c33d 100644
--- a/dotnet/docs/api/class-apirequestcontext.mdx
+++ b/dotnet/docs/api/class-apirequestcontext.mdx
@@ -9,13 +9,17 @@ import HTMLCard from '@site/src/components/HTMLCard';
This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare environment or the service to your e2e test.
-Each Playwright browser context has associated with it [APIRequestContext] instance which shares cookie storage with the browser context and can be accessed via [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) or [Page.APIRequest](/api/class-page.mdx#page-request). It is also possible to create a new APIRequestContext instance manually by calling [ApiRequest.NewContextAsync()](/api/class-apirequest.mdx#api-request-new-context).
+Each Playwright browser context has an associated [APIRequestContext], accessible via [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) or [Page.APIRequest](/api/class-page.mdx#page-request) (these return the
+
+**same instance** — `page.request` is a shortcut for `page.context().request`). You can also create a standalone, isolated instance with [ApiRequest.NewContextAsync()](/api/class-apirequest.mdx#api-request-new-context).
**Cookie management**
-[APIRequestContext] returned by [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) and [Page.APIRequest](/api/class-page.mdx#page-request) shares cookie storage with the corresponding [BrowserContext]. Each API request will have `Cookie` header populated with the values from the browser context. If the API response contains `Set-Cookie` header it will automatically update [BrowserContext] cookies and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will be logged in and vice versa.
+The [APIRequestContext] returned by [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) and
+
+[Page.APIRequest](/api/class-page.mdx#page-request) uses the same cookie jar as its [BrowserContext]:
-If you want API requests to not interfere with the browser cookies you should create a new [APIRequestContext] by calling [ApiRequest.NewContextAsync()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
+If you want API requests that do **not** share cookies with the browser, create an isolated context via [ApiRequest.NewContextAsync()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
---
diff --git a/dotnet/docs/api/class-browser.mdx b/dotnet/docs/api/class-browser.mdx
index 1950342de2..3f3df12d13 100644
--- a/dotnet/docs/api/class-browser.mdx
+++ b/dotnet/docs/api/class-browser.mdx
@@ -657,6 +657,23 @@ Browser.Version
## Events
+### event Context {#browser-event-context}
+
+Added in: v1.60browser.event Context
+
+Emitted when a new browser context is created.
+
+**Usage**
+
+```csharp
+Browser.Context += async (_, browserContext) => {};
+```
+
+**Event data**
+- [BrowserContext]
+
+---
+
### event Disconnected {#browser-event-disconnected}
Added before v1.9browser.event Disconnected
diff --git a/dotnet/docs/api/class-browsercontext.mdx b/dotnet/docs/api/class-browsercontext.mdx
index 561adf8fc1..fbfa060530 100644
--- a/dotnet/docs/api/class-browsercontext.mdx
+++ b/dotnet/docs/api/class-browsercontext.mdx
@@ -1138,6 +1138,74 @@ When no [Page.Dialog](/api/class-page.mdx#page-event-dialog) or [BrowserContext.
---
+### event Download {#browser-context-event-download}
+
+Added in: v1.60browserContext.event Download
+
+Emitted when attachment download started in any page belonging to this context. User can access basic file operations on downloaded content via the passed [Download] instance. See also [Page.Download](/api/class-page.mdx#page-event-download) to receive events about a specific page.
+
+**Usage**
+
+```csharp
+BrowserContext.Download += async (_, download) => {};
+```
+
+**Event data**
+- [Download]
+
+---
+
+### event FrameAttached {#browser-context-event-frame-attached}
+
+Added in: v1.60browserContext.event FrameAttached
+
+Emitted when a frame is attached in any page belonging to this context. See also [Page.FrameAttached](/api/class-page.mdx#page-event-frame-attached) to receive events about a specific page.
+
+**Usage**
+
+```csharp
+BrowserContext.FrameAttached += async (_, frame) => {};
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### event FrameDetached {#browser-context-event-frame-detached}
+
+Added in: v1.60browserContext.event FrameDetached
+
+Emitted when a frame is detached in any page belonging to this context. See also [Page.FrameDetached](/api/class-page.mdx#page-event-frame-detached) to receive events about a specific page.
+
+**Usage**
+
+```csharp
+BrowserContext.FrameDetached += async (_, frame) => {};
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### event FrameNavigated {#browser-context-event-frame-navigated}
+
+Added in: v1.60browserContext.event FrameNavigated
+
+Emitted when a frame is navigated to a new url in any page belonging to this context. See also [Page.FrameNavigated](/api/class-page.mdx#page-event-frame-navigated) to receive events about navigations in a specific page.
+
+**Usage**
+
+```csharp
+BrowserContext.FrameNavigated += async (_, frame) => {};
+```
+
+**Event data**
+- [Frame]
+
+---
+
### event Page {#browser-context-event-page}
Added before v1.9browserContext.event Page
@@ -1169,6 +1237,40 @@ BrowserContext.Page += async (_, page) => {};
---
+### event PageClose {#browser-context-event-page-close}
+
+Added in: v1.60browserContext.event PageClose
+
+Emitted when a page in this context is closed. See also [Page.Close](/api/class-page.mdx#page-event-close) to receive events about a specific page.
+
+**Usage**
+
+```csharp
+BrowserContext.PageClose += async (_, page) => {};
+```
+
+**Event data**
+- [Page]
+
+---
+
+### event PageLoad {#browser-context-event-page-load}
+
+Added in: v1.60browserContext.event PageLoad
+
+Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched in any page belonging to this context. See also [Page.Load](/api/class-page.mdx#page-event-load) to receive events about a specific page.
+
+**Usage**
+
+```csharp
+BrowserContext.PageLoad += async (_, page) => {};
+```
+
+**Event data**
+- [Page]
+
+---
+
### event Request {#browser-context-event-request}
Added in: v1.12browserContext.event Request
diff --git a/dotnet/docs/api/class-browsertype.mdx b/dotnet/docs/api/class-browsertype.mdx
index c17c9ca119..5c0dccba56 100644
--- a/dotnet/docs/api/class-browsertype.mdx
+++ b/dotnet/docs/api/class-browsertype.mdx
@@ -119,6 +119,9 @@ var page = defaultContext.Pages[0];
- `IsLocal` [bool]? *(optional)* Added in: v1.58#
Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely upon the file system being the same between Playwright and the Browser.
+ - `NoDefaults` [bool]? *(optional)* Added in: v1.53#
+
+ When true, Playwright will not send default overrides to the browser on the default context. This includes `Browser.setDownloadBehavior`, `Emulation.setFocusEmulationEnabled`, and `Emulation.setEmulatedMedia`. Useful when attaching to a user's daily-driver browser where these overrides would interfere with existing browser state. New contexts created via [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) are not affected. Defaults to `false`.
- `SlowMo` [float]? *(optional)* Added in: v1.11#
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
diff --git a/dotnet/docs/api/class-frame.mdx b/dotnet/docs/api/class-frame.mdx
index 25c39b3e46..e4e9da284b 100644
--- a/dotnet/docs/api/class-frame.mdx
+++ b/dotnet/docs/api/class-frame.mdx
@@ -494,6 +494,11 @@ await page
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `Description|DescriptionRegex` [string]? | [Regex]? *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [Exact](/api/class-frame.mdx#frame-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `Disabled` [bool]? *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -505,7 +510,7 @@ await page
- `Exact` [bool]? *(optional)* Added in: v1.28#
- Whether [Name|NameRegex](/api/class-frame.mdx#frame-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [Name|NameRegex](/api/class-frame.mdx#frame-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [Name|NameRegex](/api/class-frame.mdx#frame-get-by-role-option-name) and [Description|DescriptionRegex](/api/class-frame.mdx#frame-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `Expanded` [bool]? *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/dotnet/docs/api/class-framelocator.mdx b/dotnet/docs/api/class-framelocator.mdx
index 28a61d113e..7ee279cbb3 100644
--- a/dotnet/docs/api/class-framelocator.mdx
+++ b/dotnet/docs/api/class-framelocator.mdx
@@ -211,6 +211,11 @@ await page
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `Description|DescriptionRegex` [string]? | [Regex]? *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [Exact](/api/class-framelocator.mdx#frame-locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `Disabled` [bool]? *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -222,7 +227,7 @@ await page
- `Exact` [bool]? *(optional)* Added in: v1.28#
- Whether [Name|NameRegex](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [Name|NameRegex](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [Name|NameRegex](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) and [Description|DescriptionRegex](/api/class-framelocator.mdx#frame-locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `Expanded` [bool]? *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/dotnet/docs/api/class-locator.mdx b/dotnet/docs/api/class-locator.mdx
index 3cdda3e6e3..dd8974e91c 100644
--- a/dotnet/docs/api/class-locator.mdx
+++ b/dotnet/docs/api/class-locator.mdx
@@ -125,6 +125,9 @@ await page.GetByRole(AriaRole.Link).AriaSnapshotAsync();
**Arguments**
- `options` `LocatorAriaSnapshotOptions?` *(optional)*
+ - `Boxes` [bool]? *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `Depth` [int]? *(optional)* Added in: v1.59#
When specified, limits the depth of the snapshot.
@@ -710,6 +713,60 @@ This method drags the locator to another target locator or target position. It w
---
+### DropAsync {#locator-drop}
+
+Added in: v1.60locator.DropAsync
+
+Simulate an external drag-and-drop of files or clipboard-like data onto this locator.
+
+**Usage**
+
+Drop a file buffer onto an upload area:
+
+Drop plain text and a URL together:
+
+**Arguments**
+- `payload` Payload#
+ - `Files` [string]? | [IEnumerable]?<[string]> | Files? | [IEnumerable]?<Files> *(optional)*
+ - `Name` [string]
+
+ File name
+ - `MimeType` [string]
+
+ File type
+ - `Buffer` [byte][]
+
+ File content
+
+
+ - `Data` [IDictionary]?<[string], [string]> *(optional)*
+
+
+ Data to drop onto the target. Provide `files` (file paths or in-memory buffers), `data` (a mime-type → string map for clipboard-like content such as `text/plain`, `text/html`, `text/uri-list`), or both.
+- `options` `LocatorDropOptions?` *(optional)*
+ - `Position` Position? *(optional)*#
+ - `X` [float]
+
+
+ - `Y` [float]
+
+
+ A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element.
+ - `Timeout` [float]? *(optional)*#
+
+ Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.SetDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.SetDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
+
+**Returns**
+- [void]#
+
+**Details**
+
+Dispatches the native `dragenter`, `dragover`, and `drop` events at the center of the target element with a synthetic [DataTransfer] carrying the provided files and/or data entries. Works cross-browser by constructing the [DataTransfer] in the page context.
+
+If the target element's `dragover` listener does not call `preventDefault()`, the target is considered to have rejected the drop: Playwright dispatches `dragleave` and this method throws.
+
+---
+
### EvaluateAsync {#locator-evaluate}
Added in: v1.14locator.EvaluateAsync
@@ -1162,6 +1219,11 @@ await page
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `Description|DescriptionRegex` [string]? | [Regex]? *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [Exact](/api/class-locator.mdx#locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `Disabled` [bool]? *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1173,7 +1235,7 @@ await page
- `Exact` [bool]? *(optional)* Added in: v1.28#
- Whether [Name|NameRegex](/api/class-locator.mdx#locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [Name|NameRegex](/api/class-locator.mdx#locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [Name|NameRegex](/api/class-locator.mdx#locator-get-by-role-option-name) and [Description|DescriptionRegex](/api/class-locator.mdx#locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `Expanded` [bool]? *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/dotnet/docs/api/class-page.mdx b/dotnet/docs/api/class-page.mdx
index ecb4dee3cf..8b457a61de 100644
--- a/dotnet/docs/api/class-page.mdx
+++ b/dotnet/docs/api/class-page.mdx
@@ -258,6 +258,9 @@ await Page.AriaSnapshotAsync(options);
**Arguments**
- `options` `PageAriaSnapshotOptions?` *(optional)*
+ - `Boxes` [bool]? *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `Depth` [int]? *(optional)*#
When specified, limits the depth of the snapshot.
@@ -1017,6 +1020,11 @@ await page
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `Description|DescriptionRegex` [string]? | [Regex]? *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [Exact](/api/class-page.mdx#page-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `Disabled` [bool]? *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1028,7 +1036,7 @@ await page
- `Exact` [bool]? *(optional)* Added in: v1.28#
- Whether [Name|NameRegex](/api/class-page.mdx#page-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [Name|NameRegex](/api/class-page.mdx#page-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [Name|NameRegex](/api/class-page.mdx#page-get-by-role-option-name) and [Description|DescriptionRegex](/api/class-page.mdx#page-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `Expanded` [bool]? *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/dotnet/docs/api/class-weberror.mdx b/dotnet/docs/api/class-weberror.mdx
index 96006a30d2..fb50b3897b 100644
--- a/dotnet/docs/api/class-weberror.mdx
+++ b/dotnet/docs/api/class-weberror.mdx
@@ -39,6 +39,23 @@ WebError.Error
---
+### Location {#web-error-location}
+
+Added in: v1.60webError.Location
+
+URL of the resource followed by 0-based line and column numbers in the resource formatted as `URL:line:column`.
+
+**Usage**
+
+```csharp
+WebError.Location
+```
+
+**Returns**
+- [string]#
+
+---
+
### Page {#web-error-page}
Added in: v1.38webError.Page
diff --git a/dotnet/docs/api/class-websocketroute.mdx b/dotnet/docs/api/class-websocketroute.mdx
index e01b277db7..95663db1a0 100644
--- a/dotnet/docs/api/class-websocketroute.mdx
+++ b/dotnet/docs/api/class-websocketroute.mdx
@@ -181,6 +181,30 @@ WebSocketRoute.OnMessage(handler);
---
+### Protocols {#web-socket-route-protocols}
+
+Added in: v1.60webSocketRoute.Protocols
+
+The list of WebSocket subprotocols requested by the page, as passed via the second argument to the [`WebSocket` constructor](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket). Corresponds to the `Sec-WebSocket-Protocol` request header.
+
+Returns an empty array if no protocols were specified.
+
+**Usage**
+
+```csharp
+await page.RouteWebSocketAsync("wss://example.com/ws", ws => {
+ if (ws.Protocols.Contains("chat.v2"))
+ ws.OnMessage(frame => ws.Send($"v2:{frame.Text}"));
+ else
+ ws.CloseAsync(new() { Code = 1002, Reason = "Unsupported protocol" });
+});
+```
+
+**Returns**
+- [IReadOnlyList]<[string]>#
+
+---
+
### Send {#web-socket-route-send}
Added in: v1.48webSocketRoute.Send
diff --git a/dotnet/docs/getting-started-cli.mdx b/dotnet/docs/getting-started-cli.mdx
index 3a730006ab..5fa86be55a 100644
--- a/dotnet/docs/getting-started-cli.mdx
+++ b/dotnet/docs/getting-started-cli.mdx
@@ -166,7 +166,8 @@ playwright-cli tab-close [index] # close a tab
### Network
```bash
-playwright-cli network # list network requests since page load
+playwright-cli requests # list network requests since page load
+playwright-cli request # show full details of a single request
playwright-cli route [opts] # mock network requests
playwright-cli route-list # list active routes
playwright-cli unroute [pattern] # remove routes
@@ -284,7 +285,7 @@ Connect to your existing browser tabs instead of launching a new browser:
playwright-cli attach --extension
```
-This requires the [Playwright MCP Bridge browser extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md) to be installed.
+This requires the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md) to be installed.
## Quick Reference
diff --git a/dotnet/docs/getting-started-mcp.mdx b/dotnet/docs/getting-started-mcp.mdx
index e6c39d3f99..1eb6afbde3 100644
--- a/dotnet/docs/getting-started-mcp.mdx
+++ b/dotnet/docs/getting-started-mcp.mdx
@@ -105,7 +105,7 @@ Playwright MCP provides tools for all common browser interactions:
### Running Playwright code
-For complex interactions that go beyond individual tool calls, use the `browser_run_code` tool to execute Playwright scripts directly:
+For complex interactions that go beyond individual tool calls, use the `browser_run_code_unsafe` tool to execute Playwright scripts directly. This tool runs arbitrary JavaScript in the Playwright server process and is RCE-equivalent — only enable it for trusted MCP clients:
```txt
Run this Playwright code to verify the todo count:
@@ -174,7 +174,7 @@ Supported values: `chrome`, `firefox`, `webkit`, `msedge`.
Playwright MCP supports three profile modes:
- **Persistent (default)**: Login state and cookies are preserved between sessions. The profile is stored in `ms-playwright/mcp-{channel}-{workspace-hash}` in your platform's cache directory, so different projects get separate profiles automatically. Override with `--user-data-dir`.
- **Isolated**: Each session starts fresh. Pass `--isolated` to enable. You can load initial state with `--storage-state`.
-- **Browser extension**: Connect to your existing browser tabs with the [Playwright MCP Bridge extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md). Pass `--extension` to enable.
+- **Browser extension**: Connect to your existing browser tabs with the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md). Pass `--extension` to enable.
### Configuration file
@@ -184,7 +184,7 @@ For advanced configuration, use a JSON config file:
npx @playwright/mcp@latest --config path/to/config.json
```
-The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/packages/playwright-mcp/config.d.ts) for the full schema.
+The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/config.d.ts) for the full schema.
### Standalone server
diff --git a/dotnet/docs/test-assertions.mdx b/dotnet/docs/test-assertions.mdx
index 00f16f1153..3f1ba60730 100644
--- a/dotnet/docs/test-assertions.mdx
+++ b/dotnet/docs/test-assertions.mdx
@@ -39,6 +39,25 @@ import HTMLCard from '@site/src/components/HTMLCard';
| [Expect(Page).ToHaveURLAsync()](/api/class-pageassertions.mdx#page-assertions-to-have-url) | Page has a URL |
| [Expect(Response).ToBeOKAsync()](/api/class-apiresponseassertions.mdx#api-response-assertions-to-be-ok) | Response has an OK status |
+## Custom Expect Message
+
+You can specify a custom expect message as a second argument to the `expect` function, for example:
+
+```csharp
+await Expect(Page.GetByText("Name"), "should be logged in").ToBeVisibleAsync();
+```
+
+When expect fails, the error would look like this:
+
+```bash
+Microsoft.Playwright.PlaywrightException : should be logged in
+
+Locator expected to be visible
+Call log:
+- Expect "ToBeVisibleAsync" with timeout 5000ms
+- waiting for GetByText("Name")
+```
+
## Setting a custom timeout
You can specify a custom timeout for assertions either globally or per assertion. The default timeout is 5 seconds.
diff --git a/java/docs/api/class-apirequestcontext.mdx b/java/docs/api/class-apirequestcontext.mdx
index 4e11fe1a63..412105b015 100644
--- a/java/docs/api/class-apirequestcontext.mdx
+++ b/java/docs/api/class-apirequestcontext.mdx
@@ -9,13 +9,17 @@ import HTMLCard from '@site/src/components/HTMLCard';
This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare environment or the service to your e2e test.
-Each Playwright browser context has associated with it [APIRequestContext] instance which shares cookie storage with the browser context and can be accessed via [BrowserContext.request()](/api/class-browsercontext.mdx#browser-context-request) or [Page.request()](/api/class-page.mdx#page-request). It is also possible to create a new APIRequestContext instance manually by calling [APIRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context).
+Each Playwright browser context has an associated [APIRequestContext], accessible via [BrowserContext.request()](/api/class-browsercontext.mdx#browser-context-request) or [Page.request()](/api/class-page.mdx#page-request) (these return the
+
+**same instance** — `page.request` is a shortcut for `page.context().request`). You can also create a standalone, isolated instance with [APIRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context).
**Cookie management**
-[APIRequestContext] returned by [BrowserContext.request()](/api/class-browsercontext.mdx#browser-context-request) and [Page.request()](/api/class-page.mdx#page-request) shares cookie storage with the corresponding [BrowserContext]. Each API request will have `Cookie` header populated with the values from the browser context. If the API response contains `Set-Cookie` header it will automatically update [BrowserContext] cookies and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will be logged in and vice versa.
+The [APIRequestContext] returned by [BrowserContext.request()](/api/class-browsercontext.mdx#browser-context-request) and
+
+[Page.request()](/api/class-page.mdx#page-request) uses the same cookie jar as its [BrowserContext]:
-If you want API requests to not interfere with the browser cookies you should create a new [APIRequestContext] by calling [APIRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
+If you want API requests that do **not** share cookies with the browser, create an isolated context via [APIRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
---
diff --git a/java/docs/api/class-browser.mdx b/java/docs/api/class-browser.mdx
index d94670ce01..0d5870cc3f 100644
--- a/java/docs/api/class-browser.mdx
+++ b/java/docs/api/class-browser.mdx
@@ -725,6 +725,23 @@ Browser.version();
## Events
+### onContext(handler) {#browser-event-context}
+
+Added in: v1.60browser.onContext(handler)
+
+Emitted when a new browser context is created.
+
+**Usage**
+
+```java
+Browser.onContext(handler)
+```
+
+**Event data**
+- [BrowserContext]
+
+---
+
### onDisconnected(handler) {#browser-event-disconnected}
Added before v1.9browser.onDisconnected(handler)
diff --git a/java/docs/api/class-browsercontext.mdx b/java/docs/api/class-browsercontext.mdx
index b208f5fad3..fef529a63b 100644
--- a/java/docs/api/class-browsercontext.mdx
+++ b/java/docs/api/class-browsercontext.mdx
@@ -1121,6 +1121,74 @@ When no [Page.onDialog(handler)](/api/class-page.mdx#page-event-dialog) or [Brow
---
+### onDownload(handler) {#browser-context-event-download}
+
+Added in: v1.60browserContext.onDownload(handler)
+
+Emitted when attachment download started in any page belonging to this context. User can access basic file operations on downloaded content via the passed [Download] instance. See also [Page.onDownload(handler)](/api/class-page.mdx#page-event-download) to receive events about a specific page.
+
+**Usage**
+
+```java
+BrowserContext.onDownload(handler)
+```
+
+**Event data**
+- [Download]
+
+---
+
+### onFrameAttached(handler) {#browser-context-event-frame-attached}
+
+Added in: v1.60browserContext.onFrameAttached(handler)
+
+Emitted when a frame is attached in any page belonging to this context. See also [Page.onFrameAttached(handler)](/api/class-page.mdx#page-event-frame-attached) to receive events about a specific page.
+
+**Usage**
+
+```java
+BrowserContext.onFrameAttached(handler)
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### onFrameDetached(handler) {#browser-context-event-frame-detached}
+
+Added in: v1.60browserContext.onFrameDetached(handler)
+
+Emitted when a frame is detached in any page belonging to this context. See also [Page.onFrameDetached(handler)](/api/class-page.mdx#page-event-frame-detached) to receive events about a specific page.
+
+**Usage**
+
+```java
+BrowserContext.onFrameDetached(handler)
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### onFrameNavigated(handler) {#browser-context-event-frame-navigated}
+
+Added in: v1.60browserContext.onFrameNavigated(handler)
+
+Emitted when a frame is navigated to a new url in any page belonging to this context. See also [Page.onFrameNavigated(handler)](/api/class-page.mdx#page-event-frame-navigated) to receive events about navigations in a specific page.
+
+**Usage**
+
+```java
+BrowserContext.onFrameNavigated(handler)
+```
+
+**Event data**
+- [Frame]
+
+---
+
### onPage(handler) {#browser-context-event-page}
Added before v1.9browserContext.onPage(handler)
@@ -1151,6 +1219,40 @@ BrowserContext.onPage(handler)
---
+### onPageClose(handler) {#browser-context-event-page-close}
+
+Added in: v1.60browserContext.onPageClose(handler)
+
+Emitted when a page in this context is closed. See also [Page.onClose(handler)](/api/class-page.mdx#page-event-close) to receive events about a specific page.
+
+**Usage**
+
+```java
+BrowserContext.onPageClose(handler)
+```
+
+**Event data**
+- [Page]
+
+---
+
+### onPageLoad(handler) {#browser-context-event-page-load}
+
+Added in: v1.60browserContext.onPageLoad(handler)
+
+Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched in any page belonging to this context. See also [Page.onLoad(handler)](/api/class-page.mdx#page-event-load) to receive events about a specific page.
+
+**Usage**
+
+```java
+BrowserContext.onPageLoad(handler)
+```
+
+**Event data**
+- [Page]
+
+---
+
### onRequest(handler) {#browser-context-event-request}
Added in: v1.12browserContext.onRequest(handler)
diff --git a/java/docs/api/class-browsertype.mdx b/java/docs/api/class-browsertype.mdx
index b0ec032e54..347c4a0212 100644
--- a/java/docs/api/class-browsertype.mdx
+++ b/java/docs/api/class-browsertype.mdx
@@ -118,6 +118,9 @@ Page page = defaultContext.pages().get(0);
- `setIsLocal` [boolean] *(optional)* Added in: v1.58#
Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely upon the file system being the same between Playwright and the Browser.
+ - `setNoDefaults` [boolean] *(optional)* Added in: v1.53#
+
+ When true, Playwright will not send default overrides to the browser on the default context. This includes `Browser.setDownloadBehavior`, `Emulation.setFocusEmulationEnabled`, and `Emulation.setEmulatedMedia`. Useful when attaching to a user's daily-driver browser where these overrides would interfere with existing browser state. New contexts created via [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) are not affected. Defaults to `false`.
- `setSlowMo` [double] *(optional)* Added in: v1.11#
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
diff --git a/java/docs/api/class-frame.mdx b/java/docs/api/class-frame.mdx
index 1417eae455..b211e48472 100644
--- a/java/docs/api/class-frame.mdx
+++ b/java/docs/api/class-frame.mdx
@@ -494,6 +494,11 @@ page.getByRole(AriaRole.BUTTON,
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `setDescription` [String] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [setExact](/api/class-frame.mdx#frame-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `setDisabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -505,7 +510,7 @@ page.getByRole(AriaRole.BUTTON,
- `setExact` [boolean] *(optional)* Added in: v1.28#
- Whether [setName](/api/class-frame.mdx#frame-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [setName](/api/class-frame.mdx#frame-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [setName](/api/class-frame.mdx#frame-get-by-role-option-name) and [setDescription](/api/class-frame.mdx#frame-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `setExpanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/java/docs/api/class-framelocator.mdx b/java/docs/api/class-framelocator.mdx
index e1c5d06ffc..ebf1f38fd4 100644
--- a/java/docs/api/class-framelocator.mdx
+++ b/java/docs/api/class-framelocator.mdx
@@ -209,6 +209,11 @@ page.getByRole(AriaRole.BUTTON,
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `setDescription` [String] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [setExact](/api/class-framelocator.mdx#frame-locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `setDisabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -220,7 +225,7 @@ page.getByRole(AriaRole.BUTTON,
- `setExact` [boolean] *(optional)* Added in: v1.28#
- Whether [setName](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [setName](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [setName](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) and [setDescription](/api/class-framelocator.mdx#frame-locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `setExpanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/java/docs/api/class-locator.mdx b/java/docs/api/class-locator.mdx
index ecd9c40722..74beb8057c 100644
--- a/java/docs/api/class-locator.mdx
+++ b/java/docs/api/class-locator.mdx
@@ -125,6 +125,9 @@ page.getByRole(AriaRole.LINK).ariaSnapshot();
**Arguments**
- `options` `Locator.AriaSnapshotOptions` *(optional)*
+ - `setBoxes` [boolean] *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `setDepth` [int] *(optional)* Added in: v1.59#
When specified, limits the depth of the snapshot.
@@ -707,6 +710,60 @@ This method drags the locator to another target locator or target position. It w
---
+### drop {#locator-drop}
+
+Added in: v1.60locator.drop
+
+Simulate an external drag-and-drop of files or clipboard-like data onto this locator.
+
+**Usage**
+
+Drop a file buffer onto an upload area:
+
+Drop plain text and a URL together:
+
+**Arguments**
+- `payload` Payload#
+ - `setFiles` [Path] | [Path][] | Files | Files[] *(optional)*
+ - `setName` [String]
+
+ File name
+ - `setMimeType` [String]
+
+ File type
+ - `setBuffer` [byte[]]
+
+ File content
+
+
+ - `setData` [Map]<[String], [String]> *(optional)*
+
+
+ Data to drop onto the target. Provide `files` (file paths or in-memory buffers), `data` (a mime-type → string map for clipboard-like content such as `text/plain`, `text/html`, `text/uri-list`), or both.
+- `options` `Locator.DropOptions` *(optional)*
+ - `setPosition` Position *(optional)*#
+ - `setX` [double]
+
+
+ - `setY` [double]
+
+
+ A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element.
+ - `setTimeout` [double] *(optional)*#
+
+ Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [BrowserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [Page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
+
+**Returns**
+- [void]#
+
+**Details**
+
+Dispatches the native `dragenter`, `dragover`, and `drop` events at the center of the target element with a synthetic [DataTransfer] carrying the provided files and/or data entries. Works cross-browser by constructing the [DataTransfer] in the page context.
+
+If the target element's `dragover` listener does not call `preventDefault()`, the target is considered to have rejected the drop: Playwright dispatches `dragleave` and this method throws.
+
+---
+
### evaluate {#locator-evaluate}
Added in: v1.14locator.evaluate
@@ -1162,6 +1219,11 @@ page.getByRole(AriaRole.BUTTON,
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `setDescription` [String] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [setExact](/api/class-locator.mdx#locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `setDisabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1173,7 +1235,7 @@ page.getByRole(AriaRole.BUTTON,
- `setExact` [boolean] *(optional)* Added in: v1.28#
- Whether [setName](/api/class-locator.mdx#locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [setName](/api/class-locator.mdx#locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [setName](/api/class-locator.mdx#locator-get-by-role-option-name) and [setDescription](/api/class-locator.mdx#locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `setExpanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/java/docs/api/class-page.mdx b/java/docs/api/class-page.mdx
index df6091ba86..977e3bb0a1 100644
--- a/java/docs/api/class-page.mdx
+++ b/java/docs/api/class-page.mdx
@@ -262,6 +262,9 @@ Page.ariaSnapshot(options);
**Arguments**
- `options` `Page.AriaSnapshotOptions` *(optional)*
+ - `setBoxes` [boolean] *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `setDepth` [int] *(optional)*#
When specified, limits the depth of the snapshot.
@@ -1021,6 +1024,11 @@ page.getByRole(AriaRole.BUTTON,
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `setDescription` [String] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [setExact](/api/class-page.mdx#page-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `setDisabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1032,7 +1040,7 @@ page.getByRole(AriaRole.BUTTON,
- `setExact` [boolean] *(optional)* Added in: v1.28#
- Whether [setName](/api/class-page.mdx#page-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [setName](/api/class-page.mdx#page-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [setName](/api/class-page.mdx#page-get-by-role-option-name) and [setDescription](/api/class-page.mdx#page-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `setExpanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
diff --git a/java/docs/api/class-weberror.mdx b/java/docs/api/class-weberror.mdx
index 0364bbda61..da2fc83deb 100644
--- a/java/docs/api/class-weberror.mdx
+++ b/java/docs/api/class-weberror.mdx
@@ -41,6 +41,23 @@ WebError.error();
---
+### location {#web-error-location}
+
+Added in: v1.60webError.location
+
+URL of the resource followed by 0-based line and column numbers in the resource formatted as `URL:line:column`.
+
+**Usage**
+
+```java
+WebError.location();
+```
+
+**Returns**
+- [String]#
+
+---
+
### page {#web-error-page}
Added in: v1.38webError.page
diff --git a/java/docs/api/class-websocketroute.mdx b/java/docs/api/class-websocketroute.mdx
index 19e441275d..714143dbeb 100644
--- a/java/docs/api/class-websocketroute.mdx
+++ b/java/docs/api/class-websocketroute.mdx
@@ -180,6 +180,31 @@ WebSocketRoute.onMessage(handler);
---
+### protocols {#web-socket-route-protocols}
+
+Added in: v1.60webSocketRoute.protocols
+
+The list of WebSocket subprotocols requested by the page, as passed via the second argument to the [`WebSocket` constructor](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket). Corresponds to the `Sec-WebSocket-Protocol` request header.
+
+Returns an empty array if no protocols were specified.
+
+**Usage**
+
+```java
+page.routeWebSocket("wss://example.com/ws", ws -> {
+ if (ws.protocols().contains("chat.v2")) {
+ ws.onMessage(frame -> ws.send("v2:" + frame.text()));
+ } else {
+ ws.close(1002, "Unsupported protocol");
+ }
+});
+```
+
+**Returns**
+- [List]<[String]>#
+
+---
+
### send {#web-socket-route-send}
Added in: v1.48webSocketRoute.send
diff --git a/java/docs/getting-started-cli.mdx b/java/docs/getting-started-cli.mdx
index db67c7d6f5..d111e62480 100644
--- a/java/docs/getting-started-cli.mdx
+++ b/java/docs/getting-started-cli.mdx
@@ -166,7 +166,8 @@ playwright-cli tab-close [index] # close a tab
### Network
```bash
-playwright-cli network # list network requests since page load
+playwright-cli requests # list network requests since page load
+playwright-cli request # show full details of a single request
playwright-cli route [opts] # mock network requests
playwright-cli route-list # list active routes
playwright-cli unroute [pattern] # remove routes
@@ -284,7 +285,7 @@ Connect to your existing browser tabs instead of launching a new browser:
playwright-cli attach --extension
```
-This requires the [Playwright MCP Bridge browser extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md) to be installed.
+This requires the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md) to be installed.
## Quick Reference
diff --git a/java/docs/getting-started-mcp.mdx b/java/docs/getting-started-mcp.mdx
index 80f7e57982..337b94958c 100644
--- a/java/docs/getting-started-mcp.mdx
+++ b/java/docs/getting-started-mcp.mdx
@@ -105,7 +105,7 @@ Playwright MCP provides tools for all common browser interactions:
### Running Playwright code
-For complex interactions that go beyond individual tool calls, use the `browser_run_code` tool to execute Playwright scripts directly:
+For complex interactions that go beyond individual tool calls, use the `browser_run_code_unsafe` tool to execute Playwright scripts directly. This tool runs arbitrary JavaScript in the Playwright server process and is RCE-equivalent — only enable it for trusted MCP clients:
```txt
Run this Playwright code to verify the todo count:
@@ -174,7 +174,7 @@ Supported values: `chrome`, `firefox`, `webkit`, `msedge`.
Playwright MCP supports three profile modes:
- **Persistent (default)**: Login state and cookies are preserved between sessions. The profile is stored in `ms-playwright/mcp-{channel}-{workspace-hash}` in your platform's cache directory, so different projects get separate profiles automatically. Override with `--user-data-dir`.
- **Isolated**: Each session starts fresh. Pass `--isolated` to enable. You can load initial state with `--storage-state`.
-- **Browser extension**: Connect to your existing browser tabs with the [Playwright MCP Bridge extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md). Pass `--extension` to enable.
+- **Browser extension**: Connect to your existing browser tabs with the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md). Pass `--extension` to enable.
### Configuration file
@@ -184,7 +184,7 @@ For advanced configuration, use a JSON config file:
npx @playwright/mcp@latest --config path/to/config.json
```
-The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/packages/playwright-mcp/config.d.ts) for the full schema.
+The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/config.d.ts) for the full schema.
### Standalone server
diff --git a/nodejs/docs/accessibility-testing.mdx b/nodejs/docs/accessibility-testing.mdx
index b3dbee5104..0228742c22 100644
--- a/nodejs/docs/accessibility-testing.mdx
+++ b/nodejs/docs/accessibility-testing.mdx
@@ -354,8 +354,6 @@ test('example using custom fixture', async ({ page, makeAxeBuilder }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -385,6 +383,8 @@ test('example using custom fixture', async ({ page, makeAxeBuilder }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/actionability.mdx b/nodejs/docs/actionability.mdx
index aa5e7b4ca7..119e21b5f7 100644
--- a/nodejs/docs/actionability.mdx
+++ b/nodejs/docs/actionability.mdx
@@ -144,8 +144,6 @@ For example, consider a scenario where Playwright will click `Sign Up` button re
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -175,6 +173,8 @@ For example, consider a scenario where Playwright will click `Sign Up` button re
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api-testing.mdx b/nodejs/docs/api-testing.mdx
index d49a7170cd..1ff5582a4f 100644
--- a/nodejs/docs/api-testing.mdx
+++ b/nodejs/docs/api-testing.mdx
@@ -395,8 +395,6 @@ test('global context request has isolated cookie storage', async ({
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -426,6 +424,8 @@ test('global context request has isolated cookie storage', async ({
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-android.mdx b/nodejs/docs/api/class-android.mdx
index 9c8043213d..6aa316f555 100644
--- a/nodejs/docs/api/class-android.mdx
+++ b/nodejs/docs/api/class-android.mdx
@@ -205,7 +205,7 @@ const { _android } = require('playwright');
Optional device serial number to launch the browser on. If not specified, it will throw if multiple devices are connected.
- `host` [string] *(optional)* Added in: v1.45#
- Host to use for the web socket. It is optional and if it is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. Consider hardening it with picking a specific interface.
+ Host to use for the web socket. It is optional and defaults to `localhost`, accepting connections only from the loopback interface. Pass an explicit address (e.g. `0.0.0.0`) to accept connections from the network — be aware this exposes the device RPC to anything that can reach the listening port.
- `omitDriverInstall` [boolean] *(optional)*#
Prevents automatic playwright driver installation on attach. Assumes that the drivers have been installed already.
@@ -265,8 +265,6 @@ android.setDefaultTimeout(timeout);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -296,6 +294,8 @@ android.setDefaultTimeout(timeout);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-androiddevice.mdx b/nodejs/docs/api/class-androiddevice.mdx
index eb46249928..f4d5212c9a 100644
--- a/nodejs/docs/api/class-androiddevice.mdx
+++ b/nodejs/docs/api/class-androiddevice.mdx
@@ -955,8 +955,6 @@ androidDevice.on('webview', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -986,6 +984,8 @@ androidDevice.on('webview', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-androidinput.mdx b/nodejs/docs/api/class-androidinput.mdx
index 681ccf6187..5e8a6cb044 100644
--- a/nodejs/docs/api/class-androidinput.mdx
+++ b/nodejs/docs/api/class-androidinput.mdx
@@ -179,8 +179,6 @@ await androidInput.type(text);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -210,6 +208,8 @@ await androidInput.type(text);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-androidsocket.mdx b/nodejs/docs/api/class-androidsocket.mdx
index 56374bd8e6..6fac6af0ed 100644
--- a/nodejs/docs/api/class-androidsocket.mdx
+++ b/nodejs/docs/api/class-androidsocket.mdx
@@ -106,8 +106,6 @@ androidSocket.on('data', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -137,6 +135,8 @@ androidSocket.on('data', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-androidwebview.mdx b/nodejs/docs/api/class-androidwebview.mdx
index 9d6f7d1482..b63f66ca56 100644
--- a/nodejs/docs/api/class-androidwebview.mdx
+++ b/nodejs/docs/api/class-androidwebview.mdx
@@ -101,8 +101,6 @@ androidWebView.on('close', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -132,6 +130,8 @@ androidWebView.on('close', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-apirequest.mdx b/nodejs/docs/api/class-apirequest.mdx
index f874d845e9..fdccac86d6 100644
--- a/nodejs/docs/api/class-apirequest.mdx
+++ b/nodejs/docs/api/class-apirequest.mdx
@@ -189,8 +189,6 @@ await apiRequest.newContext(options);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -220,6 +218,8 @@ await apiRequest.newContext(options);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-apirequestcontext.mdx b/nodejs/docs/api/class-apirequestcontext.mdx
index 44af02a849..4b609a64c4 100644
--- a/nodejs/docs/api/class-apirequestcontext.mdx
+++ b/nodejs/docs/api/class-apirequestcontext.mdx
@@ -9,13 +9,17 @@ import HTMLCard from '@site/src/components/HTMLCard';
This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare environment or the service to your e2e test.
-Each Playwright browser context has associated with it [APIRequestContext] instance which shares cookie storage with the browser context and can be accessed via [browserContext.request](/api/class-browsercontext.mdx#browser-context-request) or [page.request](/api/class-page.mdx#page-request). It is also possible to create a new APIRequestContext instance manually by calling [apiRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context).
+Each Playwright browser context has an associated [APIRequestContext], accessible via [browserContext.request](/api/class-browsercontext.mdx#browser-context-request) or [page.request](/api/class-page.mdx#page-request) (these return the
+
+**same instance** — `page.request` is a shortcut for `page.context().request`). You can also create a standalone, isolated instance with [apiRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context).
**Cookie management**
-[APIRequestContext] returned by [browserContext.request](/api/class-browsercontext.mdx#browser-context-request) and [page.request](/api/class-page.mdx#page-request) shares cookie storage with the corresponding [BrowserContext]. Each API request will have `Cookie` header populated with the values from the browser context. If the API response contains `Set-Cookie` header it will automatically update [BrowserContext] cookies and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will be logged in and vice versa.
+The [APIRequestContext] returned by [browserContext.request](/api/class-browsercontext.mdx#browser-context-request) and
+
+[page.request](/api/class-page.mdx#page-request) uses the same cookie jar as its [BrowserContext]:
-If you want API requests to not interfere with the browser cookies you should create a new [APIRequestContext] by calling [apiRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
+If you want API requests that do **not** share cookies with the browser, create an isolated context via [apiRequest.newContext()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
---
@@ -662,8 +666,6 @@ apiRequestContext.tracing
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -693,6 +695,8 @@ apiRequestContext.tracing
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-apiresponse.mdx b/nodejs/docs/api/class-apiresponse.mdx
index 177ac3b2b5..f9ef7147c6 100644
--- a/nodejs/docs/api/class-apiresponse.mdx
+++ b/nodejs/docs/api/class-apiresponse.mdx
@@ -212,8 +212,6 @@ apiResponse.url();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -243,6 +241,8 @@ apiResponse.url();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-apiresponseassertions.mdx b/nodejs/docs/api/class-apiresponseassertions.mdx
index bebc63bdbb..43b47519ef 100644
--- a/nodejs/docs/api/class-apiresponseassertions.mdx
+++ b/nodejs/docs/api/class-apiresponseassertions.mdx
@@ -82,8 +82,6 @@ await expect(response).not.toBeOK();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -113,6 +111,8 @@ await expect(response).not.toBeOK();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-browser.mdx b/nodejs/docs/api/class-browser.mdx
index c7b82022da..6acdfcda7f 100644
--- a/nodejs/docs/api/class-browser.mdx
+++ b/nodejs/docs/api/class-browser.mdx
@@ -887,6 +887,23 @@ browser.version();
## Events
+### on('context') {#browser-event-context}
+
+Added in: v1.60browser.on('context')
+
+Emitted when a new browser context is created.
+
+**Usage**
+
+```js
+browser.on('context', data => {});
+```
+
+**Event data**
+- [BrowserContext]
+
+---
+
### on('disconnected') {#browser-event-disconnected}
Added before v1.9browser.on('disconnected')
@@ -926,8 +943,6 @@ browser.on('disconnected', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -957,6 +972,8 @@ browser.on('disconnected', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-browsercontext.mdx b/nodejs/docs/api/class-browsercontext.mdx
index c6c5112c37..a99689ab45 100644
--- a/nodejs/docs/api/class-browsercontext.mdx
+++ b/nodejs/docs/api/class-browsercontext.mdx
@@ -1196,6 +1196,74 @@ When no [page.on('dialog')](/api/class-page.mdx#page-event-dialog) or [browserCo
---
+### on('download') {#browser-context-event-download}
+
+Added in: v1.60browserContext.on('download')
+
+Emitted when attachment download started in any page belonging to this context. User can access basic file operations on downloaded content via the passed [Download] instance. See also [page.on('download')](/api/class-page.mdx#page-event-download) to receive events about a specific page.
+
+**Usage**
+
+```js
+browserContext.on('download', data => {});
+```
+
+**Event data**
+- [Download]
+
+---
+
+### on('frameattached') {#browser-context-event-frame-attached}
+
+Added in: v1.60browserContext.on('frameattached')
+
+Emitted when a frame is attached in any page belonging to this context. See also [page.on('frameattached')](/api/class-page.mdx#page-event-frame-attached) to receive events about a specific page.
+
+**Usage**
+
+```js
+browserContext.on('frameattached', data => {});
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### on('framedetached') {#browser-context-event-frame-detached}
+
+Added in: v1.60browserContext.on('framedetached')
+
+Emitted when a frame is detached in any page belonging to this context. See also [page.on('framedetached')](/api/class-page.mdx#page-event-frame-detached) to receive events about a specific page.
+
+**Usage**
+
+```js
+browserContext.on('framedetached', data => {});
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### on('framenavigated') {#browser-context-event-frame-navigated}
+
+Added in: v1.60browserContext.on('framenavigated')
+
+Emitted when a frame is navigated to a new url in any page belonging to this context. See also [page.on('framenavigated')](/api/class-page.mdx#page-event-frame-navigated) to receive events about navigations in a specific page.
+
+**Usage**
+
+```js
+browserContext.on('framenavigated', data => {});
+```
+
+**Event data**
+- [Frame]
+
+---
+
### on('page') {#browser-context-event-page}
Added before v1.9browserContext.on('page')
@@ -1226,6 +1294,40 @@ browserContext.on('page', data => {});
---
+### on('pageclose') {#browser-context-event-page-close}
+
+Added in: v1.60browserContext.on('pageclose')
+
+Emitted when a page in this context is closed. See also [page.on('close')](/api/class-page.mdx#page-event-close) to receive events about a specific page.
+
+**Usage**
+
+```js
+browserContext.on('pageclose', data => {});
+```
+
+**Event data**
+- [Page]
+
+---
+
+### on('pageload') {#browser-context-event-page-load}
+
+Added in: v1.60browserContext.on('pageload')
+
+Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched in any page belonging to this context. See also [page.on('load')](/api/class-page.mdx#page-event-load) to receive events about a specific page.
+
+**Usage**
+
+```js
+browserContext.on('pageload', data => {});
+```
+
+**Event data**
+- [Page]
+
+---
+
### on('request') {#browser-context-event-request}
Added in: v1.12browserContext.on('request')
@@ -1440,8 +1542,6 @@ await browserContext.setHTTPCredentials(httpCredentials);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -1471,6 +1571,8 @@ await browserContext.setHTTPCredentials(httpCredentials);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-browserserver.mdx b/nodejs/docs/api/class-browserserver.mdx
index a015b13e4c..cc0d901afd 100644
--- a/nodejs/docs/api/class-browserserver.mdx
+++ b/nodejs/docs/api/class-browserserver.mdx
@@ -71,8 +71,6 @@ Browser websocket url.
Browser websocket endpoint which can be used as an argument to [browserType.connect()](/api/class-browsertype.mdx#browser-type-connect) to establish connection to the browser.
-Note that if the listen `host` option in `launchServer` options is not specified, localhost will be output anyway, even if the actual listening address is an unspecified address.
-
**Usage**
```js
@@ -120,8 +118,6 @@ browserServer.on('close', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -151,6 +147,8 @@ browserServer.on('close', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-browsertype.mdx b/nodejs/docs/api/class-browsertype.mdx
index 97a333dae9..e16925685b 100644
--- a/nodejs/docs/api/class-browsertype.mdx
+++ b/nodejs/docs/api/class-browsertype.mdx
@@ -119,6 +119,9 @@ const page = defaultContext.pages()[0];
- `isLocal` [boolean] *(optional)* Added in: v1.58#
Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely upon the file system being the same between Playwright and the Browser.
+ - `noDefaults` [boolean] *(optional)* Added in: v1.53#
+
+ When true, Playwright will not send default overrides to the browser on the default context. This includes `Browser.setDownloadBehavior`, `Emulation.setFocusEmulationEnabled`, and `Emulation.setEmulatedMedia`. Useful when attaching to a user's daily-driver browser where these overrides would interfere with existing browser state. New contexts created via [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) are not affected. Defaults to `false`.
- `slowMo` [number] *(optional)* Added in: v1.11#
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
@@ -131,38 +134,6 @@ const page = defaultContext.pages()[0];
---
-### connectToWorker {#browser-type-connect-to-worker}
-
-Added in: v1.60browserType.connectToWorker
-
-This method attaches Playwright to an existing JavaScript engine exposing Chrome DevTools Protocol, for example to a Node.js process or an Electron application.
-
-:::note
-
-This is only supported on `chromium`.
-:::
-
-**Usage**
-
-```js
-const worker = await playwright.chromium.connectToWorker('http://localhost:9229');
-const global = await worker.evaluate(() => globalThis);
-```
-
-**Arguments**
-- `endpoint` [string]#
-
- A CDP websocket endpoint or http url to connect to. For example `http://localhost:9229/` or `ws://127.0.0.1:9229/something`.
-- `options` [Object] *(optional)*
- - `timeout` [number] *(optional)*#
-
- Maximum time in milliseconds to wait for the connection to be established. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
-
-**Returns**
-- [Promise]<[Worker]>#
-
----
-
### executablePath {#browser-type-executable-path}
Added before v1.9browserType.executablePath
@@ -628,6 +599,19 @@ const { chromium } = require('playwright'); // Or 'webkit' or 'firefox'.
**Arguments**
- `options` [Object] *(optional)*
+ - `allowClientNetwork` [string] *(optional)* Added in: v1.60#
+
+ This option allows the connecting client to expose its local network to the browser via [exposeNetwork](/api/class-browsertype.mdx#browser-type-connect-option-expose-network). The value is the maximum set of network rules the server will accept; the client must request a subset of these rules through `exposeNetwork`, otherwise its requests will be served directly from the server. Consists of a list of rules separated by comma.
+
+ Available rules:
+ 1. Hostname pattern, for example: `example.com`, `*.org:99`, `x.*.y.com`, `*foo.org`.
+ 1. IP literal, for example: `127.0.0.1`, `0.0.0.0:99`, `[::1]`, `[0:0::1]:99`.
+ 1. `` that matches local loopback interfaces: `localhost`, `*.localhost`, `127.0.0.1`, `[::1]`.
+
+ Some common examples:
+ 1. `"*"` to allow exposing any network.
+ 1. `""` to allow exposing localhost network.
+ 1. `"*.test.internal-domain,*.staging.internal-domain,"` to allow exposing test/staging deployments and localhost.
- `args` [Array]<[string]> *(optional)*#
:::warning
@@ -675,7 +659,7 @@ const { chromium } = require('playwright'); // Or 'webkit' or 'firefox'.
Whether to run browser in headless mode. More details for [Chromium](https://developers.google.com/web/updates/2017/04/headless-chrome) and [Firefox](https://hacks.mozilla.org/2017/12/using-headless-mode-in-firefox/). Defaults to `true`.
- `host` [string] *(optional)* Added in: v1.45#
- Host to use for the web socket. It is optional and if it is omitted, the server will accept connections on the unspecified IPv6 address (::) when IPv6 is available, or the unspecified IPv4 address (0.0.0.0) otherwise. Consider hardening it with picking a specific interface.
+ Host to use for the web socket. It is optional and defaults to `localhost`, accepting connections only from the loopback interface. Pass an explicit address (e.g. `0.0.0.0`) to accept connections from the network — be aware this exposes the browser RPC to anything that can reach the listening port.
- `ignoreDefaultArgs` [boolean] | [Array]<[string]> *(optional)*#
If `true`, Playwright does not pass its own configurations args and only uses the ones from [args](/api/class-browsertype.mdx#browser-type-launch-server-option-args). If an array is given, then filters out the given default arguments. Dangerous option; use with care. Defaults to `false`.
@@ -762,8 +746,6 @@ browserType.name();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -793,6 +775,8 @@ browserType.name();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-cdpsession.mdx b/nodejs/docs/api/class-cdpsession.mdx
index 97eb8610cb..6b940a00db 100644
--- a/nodejs/docs/api/class-cdpsession.mdx
+++ b/nodejs/docs/api/class-cdpsession.mdx
@@ -136,8 +136,6 @@ session.on('event', ({ name, params }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -167,6 +165,8 @@ session.on('event', ({ name, params }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-clock.mdx b/nodejs/docs/api/class-clock.mdx
index 5726baa164..62dde19bbd 100644
--- a/nodejs/docs/api/class-clock.mdx
+++ b/nodejs/docs/api/class-clock.mdx
@@ -220,8 +220,6 @@ await page.clock.setSystemTime('2020-02-02');
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -251,6 +249,8 @@ await page.clock.setSystemTime('2020-02-02');
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-consolemessage.mdx b/nodejs/docs/api/class-consolemessage.mdx
index b92106e53b..f2a8c8d014 100644
--- a/nodejs/docs/api/class-consolemessage.mdx
+++ b/nodejs/docs/api/class-consolemessage.mdx
@@ -180,8 +180,6 @@ consoleMessage.worker();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -211,6 +209,8 @@ consoleMessage.worker();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-coverage.mdx b/nodejs/docs/api/class-coverage.mdx
index 051d378667..32060bf2c3 100644
--- a/nodejs/docs/api/class-coverage.mdx
+++ b/nodejs/docs/api/class-coverage.mdx
@@ -204,8 +204,6 @@ await coverage.stopJSCoverage();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -235,6 +233,8 @@ await coverage.stopJSCoverage();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-debugger.mdx b/nodejs/docs/api/class-debugger.mdx
index 750141f073..97e4be811f 100644
--- a/nodejs/docs/api/class-debugger.mdx
+++ b/nodejs/docs/api/class-debugger.mdx
@@ -165,8 +165,6 @@ debugger.on('pausedstatechanged', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -196,6 +194,8 @@ debugger.on('pausedstatechanged', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-dialog.mdx b/nodejs/docs/api/class-dialog.mdx
index a4bdfcafe4..378a06e0de 100644
--- a/nodejs/docs/api/class-dialog.mdx
+++ b/nodejs/docs/api/class-dialog.mdx
@@ -163,8 +163,6 @@ dialog.type();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -194,6 +192,8 @@ dialog.type();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-disposable.mdx b/nodejs/docs/api/class-disposable.mdx
index 08eda2aa41..3ce8a28d2c 100644
--- a/nodejs/docs/api/class-disposable.mdx
+++ b/nodejs/docs/api/class-disposable.mdx
@@ -51,8 +51,6 @@ await disposable.dispose();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -82,6 +80,8 @@ await disposable.dispose();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-download.mdx b/nodejs/docs/api/class-download.mdx
index 53b3a63f6a..a113d25561 100644
--- a/nodejs/docs/api/class-download.mdx
+++ b/nodejs/docs/api/class-download.mdx
@@ -213,8 +213,6 @@ download.url();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -244,6 +242,8 @@ download.url();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-electron.mdx b/nodejs/docs/api/class-electron.mdx
index 6d3432abae..4acba26032 100644
--- a/nodejs/docs/api/class-electron.mdx
+++ b/nodejs/docs/api/class-electron.mdx
@@ -7,16 +7,10 @@ import TabItem from '@theme/TabItem';
import HTMLCard from '@site/src/components/HTMLCard';
-Playwright has **experimental** support for Electron automation. You can access electron namespace via:
+Playwright has **experimental** support for Electron automation, exposed as `_electron`. An example of the Electron automation script would be:
```js
-const { _electron } = require('playwright');
-```
-
-An example of the Electron automation script would be:
-
-```js
-const { _electron: electron } = require('playwright');
+import { _electron as electron } from 'playwright';
(async () => {
// Launch Electron app.
@@ -55,6 +49,113 @@ const { _electron: electron } = require('playwright');
If you are not able to launch Electron and it will end up in timeouts during launch, try the following:
* Ensure that `nodeCliInspect` ([FuseV1Options.EnableNodeCliInspectArguments](https://www.electronjs.org/docs/latest/tutorial/fuses#nodecliinspect)) fuse is **not** set to `false`.
+**Migrating from v1.59**
+
+A number of launch options have been removed after v1.59. See below for alternatives.
+* `recordHar` - use [tracing.startHar()](/api/class-tracing.mdx#tracing-start-har).
+
+ ```js
+ const electronApp = await electron.launch({ args: ['main.js'] });
+ await electronApp.context().tracing.startHar('network.har');
+ // ... drive the app ...
+ await electronApp.context().tracing.stopHar();
+ await electronApp.close();
+ ```
+
+* `recordVideo` - use [screencast.start()](/api/class-screencast.mdx#screencast-start) on each window.
+
+ ```js
+ const electronApp = await electron.launch({ args: ['main.js'] });
+ const window = await electronApp.firstWindow();
+ await window.screencast.start({ path: 'video.webm' });
+ // ... drive the window ...
+ await window.screencast.stop();
+ await electronApp.close();
+ ```
+
+* `colorScheme` - use [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) on each window.
+
+ ```js
+ const window = await electronApp.firstWindow();
+ await window.emulateMedia({ colorScheme: 'dark' });
+ ```
+
+* `extraHTTPHeaders` - use [browserContext.setExtraHTTPHeaders()](/api/class-browsercontext.mdx#browser-context-set-extra-http-headers).
+
+ ```js
+ await electronApp.context().setExtraHTTPHeaders({ 'X-My-Header': 'value' });
+ ```
+
+* `geolocation` - use [browserContext.setGeolocation()](/api/class-browsercontext.mdx#browser-context-set-geolocation).
+
+ ```js
+ await electronApp.context().setGeolocation({ latitude: 48.858455, longitude: 2.294474 });
+ ```
+
+* `httpCredentials` - use [browserContext.setHTTPCredentials()](/api/class-browsercontext.mdx#browser-context-set-http-credentials).
+
+ ```js
+ await electronApp.context().setHTTPCredentials({ username: 'user', password: 'pass' });
+ ```
+
+* `offline` - use [browserContext.setOffline()](/api/class-browsercontext.mdx#browser-context-set-offline).
+
+ ```js
+ await electronApp.context().setOffline(true);
+ ```
+
+* `bypassCSP` - disable CSP at the `BrowserWindow` level via Electron's [web preferences](https://www.electronjs.org/docs/latest/api/structures/web-preferences). Note that `webSecurity: false` also disables CORS and the Same-Origin Policy.
+
+ ```js
+ const win = new BrowserWindow({
+ webPreferences: {
+ webSecurity: false,
+ },
+ });
+ ```
+
+* `ignoreHTTPSErrors`
+
+ There are several ways to relax HTTPS checks in Electron. Pick the one that matches the scope you need.
+
+ Per-window, allow mixed content through [web preferences](https://www.electronjs.org/docs/latest/api/structures/web-preferences):
+
+ ```js
+ const win = new BrowserWindow({
+ webPreferences: {
+ allowRunningInsecureContent: true,
+ },
+ });
+ ```
+
+ Process-wide, ignore certificate errors via Chromium command-line switches (must run before the `ready` event):
+
+ ```js
+ const { app } = require('electron');
+ app.commandLine.appendSwitch('ignore-certificate-errors');
+ // Optional: also ignore localhost certificate errors when testing on an IP.
+ app.commandLine.appendSwitch('allow-insecure-localhost', 'true');
+ ```
+
+ Per-request, accept the certificate manually via the [`certificate-error`](https://www.electronjs.org/docs/latest/api/app#event-certificate-error) event:
+
+ ```js
+ app.on('certificate-error', (event, webContents, url, error, certificate, callback) => {
+ event.preventDefault();
+ callback(true);
+ });
+ ```
+
+* `timezoneId` - set an environment variable at the very top of the main file, before any other logic or Chromium windows are initialized.
+
+ ```js
+ // main.js
+ process.env.TZ = 'Europe/London';
+
+ const { app } = require('electron');
+ // ... rest of your app logic
+ ```
+
---
@@ -75,24 +176,12 @@ await electron.launch(options);
**Arguments**
- `options` [Object] *(optional)*
- - `acceptDownloads` [boolean] *(optional)* Added in: v1.12#
-
- Whether to automatically download all the attachments. Defaults to `true` where all the downloads are accepted.
- `args` [Array]<[string]> *(optional)*#
Additional arguments to pass to the application when launching. You typically pass the main script name here.
- - `artifactsDir` [string] *(optional)* Added in: v1.59#
-
- If specified, artifacts (traces, videos, downloads, HAR files, etc.) are saved into this directory. The directory is not cleaned up when the browser closes. If not specified, a temporary directory is used and cleaned up when the browser closes.
- - `bypassCSP` [boolean] *(optional)* Added in: v1.12#
-
- Toggles bypassing page's Content-Security-Policy. Defaults to `false`.
- `chromiumSandbox` [boolean] *(optional)* Added in: v1.59#
Enable Chromium sandboxing. Defaults to `false`.
- - `colorScheme` [null] | "light" | "dark" | "no-preference" *(optional)* Added in: v1.12#
-
- Emulates [prefers-colors-scheme](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme) media feature, supported values are `'light'` and `'dark'`. See [page.emulateMedia()](/api/class-page.mdx#page-emulate-media) for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
- `cwd` [string] *(optional)*#
Current working directory to launch application from.
@@ -102,97 +191,9 @@ await electron.launch(options);
- `executablePath` [string] *(optional)*#
Launches given Electron application. If not specified, launches the default Electron executable installed in this package, located at `node_modules/.bin/electron`.
- - `extraHTTPHeaders` [Object]<[string], [string]> *(optional)* Added in: v1.12#
-
- An object containing additional HTTP headers to be sent with every request. Defaults to none.
- - `geolocation` [Object] *(optional)* Added in: v1.12#
- - `latitude` [number]
-
- Latitude between -90 and 90.
- - `longitude` [number]
-
- Longitude between -180 and 180.
- - `accuracy` [number] *(optional)*
-
- Non-negative accuracy value. Defaults to `0`.
- - `httpCredentials` [Object] *(optional)* Added in: v1.12#
- - `username` [string]
-
-
- - `password` [string]
-
-
- - `origin` [string] *(optional)*
-
- Restrain sending http credentials on specific origin (scheme://host:port).
- - `send` "unauthorized" | "always" *(optional)*
-
- This option only applies to the requests sent from corresponding [APIRequestContext] and does not affect requests sent from the browser. `'always'` - `Authorization` header with basic authentication credentials will be sent with the each API request. `'unauthorized` - the credentials are only sent when 401 (Unauthorized) response with `WWW-Authenticate` header is received. Defaults to `'unauthorized'`.
-
- Credentials for [HTTP authentication](https://developer.mozilla.org/en-US/docs/Web/HTTP/Authentication). If no origin is specified, the username and password are sent to any servers upon unauthorized responses.
- - `ignoreHTTPSErrors` [boolean] *(optional)* Added in: v1.12#
-
- Whether to ignore HTTPS errors when sending network requests. Defaults to `false`.
- - `locale` [string] *(optional)* Added in: v1.12#
-
- Specify user locale, for example `en-GB`, `de-DE`, etc. Locale will affect `navigator.language` value, `Accept-Language` request header value as well as number and date formatting rules. Defaults to the system default locale. Learn more about emulation in our [emulation guide](../emulation.mdx#locale--timezone).
- - `offline` [boolean] *(optional)* Added in: v1.12#
-
- Whether to emulate network being offline. Defaults to `false`. Learn more about [network emulation](../emulation.mdx#offline).
- - `recordHar` [Object] *(optional)* Added in: v1.12#
- - `omitContent` [boolean] *(optional)*
-
- Optional setting to control whether to omit request content from the HAR. Defaults to `false`. Deprecated, use `content` policy instead.
- - `content` "omit" | "embed" | "attach" *(optional)*
-
- Optional setting to control resource content management. If `omit` is specified, content is not persisted. If `attach` is specified, resources are persisted as separate files or entries in the ZIP archive. If `embed` is specified, content is stored inline the HAR file as per HAR specification. Defaults to `attach` for `.zip` output files and to `embed` for all other file extensions.
- - `path` [string]
-
- Path on the filesystem to write the HAR file to. If the file name ends with `.zip`, `content: 'attach'` is used by default.
- - `mode` "full" | "minimal" *(optional)*
-
- When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
- - `urlFilter` [string] | [RegExp] *(optional)*
-
- A glob or regex pattern to filter requests that are stored in the HAR. When a [baseURL](/api/class-browser.mdx#browser-new-context-option-base-url) via the context options was provided and the passed URL is a path, it gets merged via the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor. Defaults to none.
-
- Enables [HAR](http://www.softwareishard.com/blog/har-12-spec) recording for all pages into `recordHar.path` file. If not specified, the HAR is not recorded. Make sure to await [browserContext.close()](/api/class-browsercontext.mdx#browser-context-close) for the HAR to be saved.
- - `recordVideo` [Object] *(optional)* Added in: v1.12#
- - `dir` [string] *(optional)*
-
- Path to the directory to put videos into. If not specified, the videos will be stored in `artifactsDir` (see [browserType.launch()](/api/class-browsertype.mdx#browser-type-launch) options).
- - `size` [Object] *(optional)*
- - `width` [number]
-
- Video frame width.
- - `height` [number]
-
- 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.
- - `showActions` [Object] *(optional)*
- - `duration` [number] *(optional)*
-
- How long each annotation is displayed in milliseconds. Defaults to `500`.
- - `position` "top-left" | "top" | "top-right" | "bottom-left" | "bottom" | "bottom-right" *(optional)*
-
- Position of the action title overlay. Defaults to `"top-right"`.
- - `fontSize` [number] *(optional)*
-
- Font size of the action title in pixels. Defaults to `24`.
-
- If specified, enables visual annotations on interacted elements during video recording.
-
- Enables video recording for all pages into `recordVideo.dir` directory. If not specified videos are not recorded. Make sure to await [browserContext.close()](/api/class-browsercontext.mdx#browser-context-close) for videos to be saved.
- `timeout` [number] *(optional)* Added in: v1.15#
Maximum time in milliseconds to wait for the application to start. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
- - `timezoneId` [string] *(optional)* Added in: v1.12#
-
- Changes the timezone of the context. See [ICU's metaZones.txt](https://cs.chromium.org/chromium/src/third_party/icu/source/data/misc/metaZones.txt?rcl=faee8bc70570192d82d2978a71e2a615788597d1) for a list of supported timezone IDs. Defaults to the system timezone.
- - `tracesDir` [string] *(optional)* Added in: v1.36#
-
- If specified, traces are saved into this directory.
**Returns**
- [Promise]<[ElectronApplication]>#
@@ -219,8 +220,6 @@ await electron.launch(options);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -250,6 +249,8 @@ await electron.launch(options);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-electronapplication.mdx b/nodejs/docs/api/class-electronapplication.mdx
index faf5b15364..d19ff77d5a 100644
--- a/nodejs/docs/api/class-electronapplication.mdx
+++ b/nodejs/docs/api/class-electronapplication.mdx
@@ -10,7 +10,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
Electron application representation. You can use [electron.launch()](/api/class-electron.mdx#electron-launch) to obtain the application instance. This instance you can control main electron process as well as work with Electron windows:
```js
-const { _electron: electron } = require('playwright');
+import { _electron as electron } from 'playwright';
(async () => {
// Launch Electron app.
@@ -332,8 +332,6 @@ electronApplication.on('window', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -363,6 +361,8 @@ electronApplication.on('window', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-elementhandle.mdx b/nodejs/docs/api/class-elementhandle.mdx
index 0c515a8929..c383096769 100644
--- a/nodejs/docs/api/class-elementhandle.mdx
+++ b/nodejs/docs/api/class-elementhandle.mdx
@@ -1613,8 +1613,6 @@ This method does not work across navigations, use [page.waitForSelector()](/api/
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -1644,6 +1642,8 @@ This method does not work across navigations, use [page.waitForSelector()](/api/
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-filechooser.mdx b/nodejs/docs/api/class-filechooser.mdx
index 79af166527..33f7181051 100644
--- a/nodejs/docs/api/class-filechooser.mdx
+++ b/nodejs/docs/api/class-filechooser.mdx
@@ -135,8 +135,6 @@ await fileChooser.setFiles(files, options);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -166,6 +164,8 @@ await fileChooser.setFiles(files, options);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-fixtures.mdx b/nodejs/docs/api/class-fixtures.mdx
index c16839120e..88c6f7fbb3 100644
--- a/nodejs/docs/api/class-fixtures.mdx
+++ b/nodejs/docs/api/class-fixtures.mdx
@@ -168,8 +168,6 @@ test('basic test', async ({ request }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -199,6 +197,8 @@ test('basic test', async ({ request }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-frame.mdx b/nodejs/docs/api/class-frame.mdx
index eeb9c6ea4d..5106b19db7 100644
--- a/nodejs/docs/api/class-frame.mdx
+++ b/nodejs/docs/api/class-frame.mdx
@@ -487,6 +487,11 @@ await page.getByRole('button', { name: /submit/i }).click();
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `description` [string] | [RegExp] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-frame.mdx#frame-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -498,7 +503,7 @@ await page.getByRole('button', { name: /submit/i }).click();
- `exact` [boolean] *(optional)* Added in: v1.28#
- Whether [name](/api/class-frame.mdx#frame-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-frame.mdx#frame-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-frame.mdx#frame-get-by-role-option-name) and [description](/api/class-frame.mdx#frame-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -2675,8 +2680,6 @@ await frame.waitForTimeout(timeout);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -2706,6 +2709,8 @@ await frame.waitForTimeout(timeout);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-framelocator.mdx b/nodejs/docs/api/class-framelocator.mdx
index b46f39750d..cb0d9c6b98 100644
--- a/nodejs/docs/api/class-framelocator.mdx
+++ b/nodejs/docs/api/class-framelocator.mdx
@@ -203,6 +203,11 @@ await page.getByRole('button', { name: /submit/i }).click();
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `description` [string] | [RegExp] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-framelocator.mdx#frame-locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -214,7 +219,7 @@ await page.getByRole('button', { name: /submit/i }).click();
- `exact` [boolean] *(optional)* Added in: v1.28#
- Whether [name](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) and [description](/api/class-framelocator.mdx#frame-locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -557,8 +562,6 @@ frameLocator.nth(index);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -588,6 +591,8 @@ frameLocator.nth(index);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-fullconfig.mdx b/nodejs/docs/api/class-fullconfig.mdx
index 45003f6938..3ef3a1b3e5 100644
--- a/nodejs/docs/api/class-fullconfig.mdx
+++ b/nodejs/docs/api/class-fullconfig.mdx
@@ -443,8 +443,6 @@ fullConfig.workers
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -474,6 +472,8 @@ fullConfig.workers
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-fullproject.mdx b/nodejs/docs/api/class-fullproject.mdx
index 52665c95fc..1dacc7017d 100644
--- a/nodejs/docs/api/class-fullproject.mdx
+++ b/nodejs/docs/api/class-fullproject.mdx
@@ -306,8 +306,6 @@ fullProject.use
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -337,6 +335,8 @@ fullProject.use
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-genericassertions.mdx b/nodejs/docs/api/class-genericassertions.mdx
index bc477f1439..9ce6d1dae6 100644
--- a/nodejs/docs/api/class-genericassertions.mdx
+++ b/nodejs/docs/api/class-genericassertions.mdx
@@ -854,8 +854,6 @@ expect(value).resolves
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -885,6 +883,8 @@ expect(value).resolves
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-jshandle.mdx b/nodejs/docs/api/class-jshandle.mdx
index da7a0976e5..e5951d3152 100644
--- a/nodejs/docs/api/class-jshandle.mdx
+++ b/nodejs/docs/api/class-jshandle.mdx
@@ -206,8 +206,6 @@ await jsHandle.jsonValue();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -237,6 +235,8 @@ await jsHandle.jsonValue();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-keyboard.mdx b/nodejs/docs/api/class-keyboard.mdx
index cc70b2c4d7..c86cfb1771 100644
--- a/nodejs/docs/api/class-keyboard.mdx
+++ b/nodejs/docs/api/class-keyboard.mdx
@@ -247,8 +247,6 @@ await keyboard.up(key);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -278,6 +276,8 @@ await keyboard.up(key);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-location.mdx b/nodejs/docs/api/class-location.mdx
index 0450285e4a..d9f89a7295 100644
--- a/nodejs/docs/api/class-location.mdx
+++ b/nodejs/docs/api/class-location.mdx
@@ -85,8 +85,6 @@ location.line
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -116,6 +114,8 @@ location.line
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-locator.mdx b/nodejs/docs/api/class-locator.mdx
index 9a820312e2..1af9ee7b36 100644
--- a/nodejs/docs/api/class-locator.mdx
+++ b/nodejs/docs/api/class-locator.mdx
@@ -149,6 +149,9 @@ await page.getByRole('link').ariaSnapshot();
**Arguments**
- `options` [Object] *(optional)*
+ - `boxes` [boolean] *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `depth` [number] *(optional)* Added in: v1.59#
When specified, limits the depth of the snapshot.
@@ -732,6 +735,75 @@ This method drags the locator to another target locator or target position. It w
---
+### drop {#locator-drop}
+
+Added in: v1.60locator.drop
+
+Simulate an external drag-and-drop of files or clipboard-like data onto this locator.
+
+**Usage**
+
+Drop a file buffer onto an upload area:
+
+```js
+await page.locator('#dropzone').drop({
+ files: { name: 'note.txt', mimeType: 'text/plain', buffer: Buffer.from('hello') },
+});
+```
+
+Drop plain text and a URL together:
+
+```js
+await page.locator('#dropzone').drop({
+ data: {
+ 'text/plain': 'hello world',
+ 'text/uri-list': 'https://example.com',
+ },
+});
+```
+
+**Arguments**
+- `payload` [Object]#
+ - `files` [string] | [Array]<[string]> | [Object] | [Array]<[Object]> *(optional)*
+ - `name` [string]
+
+ File name
+ - `mimeType` [string]
+
+ File type
+ - `buffer` [Buffer]
+
+ File content
+
+
+ - `data` [Object]<[string], [string]> *(optional)*
+
+
+ Data to drop onto the target. Provide `files` (file paths or in-memory buffers), `data` (a mime-type → string map for clipboard-like content such as `text/plain`, `text/html`, `text/uri-list`), or both.
+- `options` [Object] *(optional)*
+ - `position` [Object] *(optional)*#
+ - `x` [number]
+
+
+ - `y` [number]
+
+
+ A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element.
+ - `timeout` [number] *(optional)*#
+
+ Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout` option in the config, or by using the [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
+
+**Returns**
+- [Promise]<[void]>#
+
+**Details**
+
+Dispatches the native `dragenter`, `dragover`, and `drop` events at the center of the target element with a synthetic [DataTransfer] carrying the provided files and/or data entries. Works cross-browser by constructing the [DataTransfer] in the page context.
+
+If the target element's `dragover` listener does not call `preventDefault()`, the target is considered to have rejected the drop: Playwright dispatches `dragleave` and this method throws.
+
+---
+
### evaluate {#locator-evaluate}
Added in: v1.14locator.evaluate
@@ -1179,6 +1251,11 @@ await page.getByRole('button', { name: /submit/i }).click();
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `description` [string] | [RegExp] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-locator.mdx#locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1190,7 +1267,7 @@ await page.getByRole('button', { name: /submit/i }).click();
- `exact` [boolean] *(optional)* Added in: v1.28#
- Whether [name](/api/class-locator.mdx#locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-locator.mdx#locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-locator.mdx#locator-get-by-role-option-name) and [description](/api/class-locator.mdx#locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -2636,8 +2713,6 @@ To press a special key, like `Control` or `ArrowDown`, use [locator.press()](/ap
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -2667,6 +2742,8 @@ To press a special key, like `Control` or `ArrowDown`, use [locator.press()](/ap
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-locatorassertions.mdx b/nodejs/docs/api/class-locatorassertions.mdx
index e7954b67ac..fd988c64d1 100644
--- a/nodejs/docs/api/class-locatorassertions.mdx
+++ b/nodejs/docs/api/class-locatorassertions.mdx
@@ -1112,8 +1112,6 @@ await expect(locator).not.toContainText('error');
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -1143,6 +1141,8 @@ await expect(locator).not.toContainText('error');
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-logger.mdx b/nodejs/docs/api/class-logger.mdx
index b452c7ad99..e7472ba96d 100644
--- a/nodejs/docs/api/class-logger.mdx
+++ b/nodejs/docs/api/class-logger.mdx
@@ -106,8 +106,6 @@ logger.log(name, severity, message, args, hints);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -137,6 +135,8 @@ logger.log(name, severity, message, args, hints);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-mouse.mdx b/nodejs/docs/api/class-mouse.mdx
index e7dee23d7c..b9e8952005 100644
--- a/nodejs/docs/api/class-mouse.mdx
+++ b/nodejs/docs/api/class-mouse.mdx
@@ -235,8 +235,6 @@ await mouse.wheel(deltaX, deltaY);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -266,6 +264,8 @@ await mouse.wheel(deltaX, deltaY);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-page.mdx b/nodejs/docs/api/class-page.mdx
index 2a663f0a9a..4feac40b0f 100644
--- a/nodejs/docs/api/class-page.mdx
+++ b/nodejs/docs/api/class-page.mdx
@@ -272,6 +272,9 @@ await page.ariaSnapshot(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `boxes` [boolean] *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `depth` [number] *(optional)*#
When specified, limits the depth of the snapshot.
@@ -996,6 +999,11 @@ await page.getByRole('button', { name: /submit/i }).click();
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+ - `description` [string] | [RegExp] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-page.mdx#page-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [boolean] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1007,7 +1015,7 @@ await page.getByRole('button', { name: /submit/i }).click();
- `exact` [boolean] *(optional)* Added in: v1.28#
- Whether [name](/api/class-page.mdx#page-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-page.mdx#page-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-page.mdx#page-get-by-role-option-name) and [description](/api/class-page.mdx#page-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [boolean] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -4662,8 +4670,6 @@ await page.waitForTimeout(1000);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -4693,6 +4699,8 @@ await page.waitForTimeout(1000);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-pageassertions.mdx b/nodejs/docs/api/class-pageassertions.mdx
index 2b33424073..ed27abfdce 100644
--- a/nodejs/docs/api/class-pageassertions.mdx
+++ b/nodejs/docs/api/class-pageassertions.mdx
@@ -352,8 +352,6 @@ await expect(page).not.toHaveURL('error');
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -383,6 +381,8 @@ await expect(page).not.toHaveURL('error');
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-playwright.mdx b/nodejs/docs/api/class-playwright.mdx
index 8bc8dc34b9..8f218a450e 100644
--- a/nodejs/docs/api/class-playwright.mdx
+++ b/nodejs/docs/api/class-playwright.mdx
@@ -198,8 +198,6 @@ playwright.webkit
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -229,6 +227,8 @@ playwright.webkit
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-playwrightassertions.mdx b/nodejs/docs/api/class-playwrightassertions.mdx
index a220534b3a..bc70344871 100644
--- a/nodejs/docs/api/class-playwrightassertions.mdx
+++ b/nodejs/docs/api/class-playwrightassertions.mdx
@@ -126,8 +126,6 @@ Creates a [PageAssertions] object for the given [Page].
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -157,6 +155,8 @@ Creates a [PageAssertions] object for the given [Page].
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-reporter.mdx b/nodejs/docs/api/class-reporter.mdx
index 67d4be278a..b03d788a80 100644
--- a/nodejs/docs/api/class-reporter.mdx
+++ b/nodejs/docs/api/class-reporter.mdx
@@ -190,12 +190,16 @@ Called on some global error, for example unhandled exception in the worker proce
```js
reporter.onError(error);
+reporter.onError(error, workerInfo);
```
**Arguments**
- `error` [TestError]#
The error.
+- `workerInfo` [WorkerInfo] *(optional)* Added in: v1.60#
+
+ Contains information about the worker that produced this error. `undefined` for errors that are not associated with a specific worker.
---
@@ -397,8 +401,6 @@ reporter.printsToStdio();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -428,6 +430,8 @@ reporter.printsToStdio();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-request.mdx b/nodejs/docs/api/class-request.mdx
index 91c8f99767..1a56a78188 100644
--- a/nodejs/docs/api/class-request.mdx
+++ b/nodejs/docs/api/class-request.mdx
@@ -489,8 +489,6 @@ request.url();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -520,6 +518,8 @@ request.url();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-response.mdx b/nodejs/docs/api/class-response.mdx
index 1d84a6ae98..2dc76246f6 100644
--- a/nodejs/docs/api/class-response.mdx
+++ b/nodejs/docs/api/class-response.mdx
@@ -395,8 +395,6 @@ response.url();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -426,6 +424,8 @@ response.url();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-route.mdx b/nodejs/docs/api/class-route.mdx
index 91fba2af2c..49043e10f4 100644
--- a/nodejs/docs/api/class-route.mdx
+++ b/nodejs/docs/api/class-route.mdx
@@ -333,8 +333,6 @@ route.request();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -364,6 +362,8 @@ route.request();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-screencast.mdx b/nodejs/docs/api/class-screencast.mdx
index 5a811d9674..d5aebd28fa 100644
--- a/nodejs/docs/api/class-screencast.mdx
+++ b/nodejs/docs/api/class-screencast.mdx
@@ -243,8 +243,6 @@ await screencast.stop();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -274,6 +272,8 @@ await screencast.stop();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-selectors.mdx b/nodejs/docs/api/class-selectors.mdx
index 0baf16dadd..05e516eda0 100644
--- a/nodejs/docs/api/class-selectors.mdx
+++ b/nodejs/docs/api/class-selectors.mdx
@@ -121,8 +121,6 @@ selectors.setTestIdAttribute(attributeName);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -152,6 +150,8 @@ selectors.setTestIdAttribute(attributeName);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-snapshotassertions.mdx b/nodejs/docs/api/class-snapshotassertions.mdx
index 0645798c98..aa269c33bb 100644
--- a/nodejs/docs/api/class-snapshotassertions.mdx
+++ b/nodejs/docs/api/class-snapshotassertions.mdx
@@ -139,8 +139,6 @@ Note that matching snapshots only work with Playwright test runner.
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -170,6 +168,8 @@ Note that matching snapshots only work with Playwright test runner.
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-suite.mdx b/nodejs/docs/api/class-suite.mdx
index 16339670ea..c56b2c26b9 100644
--- a/nodejs/docs/api/class-suite.mdx
+++ b/nodejs/docs/api/class-suite.mdx
@@ -225,8 +225,6 @@ suite.type
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -256,6 +254,8 @@ suite.type
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-test.mdx b/nodejs/docs/api/class-test.mdx
index ab92985b18..be763e8f7b 100644
--- a/nodejs/docs/api/class-test.mdx
+++ b/nodejs/docs/api/class-test.mdx
@@ -1925,8 +1925,6 @@ test.describe.serial.only(() => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -1956,6 +1954,8 @@ test.describe.serial.only(() => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testcase.mdx b/nodejs/docs/api/class-testcase.mdx
index 4b1ace5cdf..194e322994 100644
--- a/nodejs/docs/api/class-testcase.mdx
+++ b/nodejs/docs/api/class-testcase.mdx
@@ -311,8 +311,6 @@ testCase.type
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -342,6 +340,8 @@ testCase.type
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testconfig.mdx b/nodejs/docs/api/class-testconfig.mdx
index 3769e008f7..3b38a45e9d 100644
--- a/nodejs/docs/api/class-testconfig.mdx
+++ b/nodejs/docs/api/class-testconfig.mdx
@@ -1247,8 +1247,6 @@ This path will serve as the base directory for each test file snapshot directory
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -1278,6 +1276,8 @@ This path will serve as the base directory for each test file snapshot directory
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testerror.mdx b/nodejs/docs/api/class-testerror.mdx
index e6ae142080..b7eb9f967e 100644
--- a/nodejs/docs/api/class-testerror.mdx
+++ b/nodejs/docs/api/class-testerror.mdx
@@ -136,8 +136,6 @@ testError.value
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -167,6 +165,8 @@ testError.value
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testinfo.mdx b/nodejs/docs/api/class-testinfo.mdx
index 03ee77792e..c0a3a50576 100644
--- a/nodejs/docs/api/class-testinfo.mdx
+++ b/nodejs/docs/api/class-testinfo.mdx
@@ -882,8 +882,6 @@ testInfo.workerIndex
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -913,6 +911,8 @@ testInfo.workerIndex
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testinfoerror.mdx b/nodejs/docs/api/class-testinfoerror.mdx
index 58f19372d2..eaa13ee2c3 100644
--- a/nodejs/docs/api/class-testinfoerror.mdx
+++ b/nodejs/docs/api/class-testinfoerror.mdx
@@ -31,6 +31,44 @@ testInfoError.cause
---
+### matcherResult {#test-info-error-matcher-result}
+
+Added in: v1.60testInfoError.matcherResult
+
+Structured information about a matcher failure. Set when the error originated from an `expect(...)` matcher; unset otherwise.
+
+**Usage**
+
+```js
+testInfoError.matcherResult
+```
+
+**Type**
+- [Object]
+ - `name` [string]
+
+ Matcher name (e.g. `toBeVisible`).
+ - `pass` [boolean]
+
+ Whether the matcher passed.
+ - `expected` [Object] *(optional)*
+
+ Expected value.
+ - `actual` [Object] *(optional)*
+
+ Received value.
+ - `log` [Array]<[string]> *(optional)*
+
+ Matcher log lines, if any.
+ - `timeout` [number] *(optional)*
+
+ Matcher timeout in milliseconds, set when the matcher timed out.
+ - `ariaSnapshot` [string] *(optional)*
+
+ Aria snapshot of the receiver at the time of failure, if available.
+
+---
+
### message {#test-info-error-message}
Added in: v1.10testInfoError.message
@@ -102,8 +140,6 @@ testInfoError.value
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -133,6 +169,8 @@ testInfoError.value
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testoptions.mdx b/nodejs/docs/api/class-testoptions.mdx
index 34a31d1eb8..a55f134247 100644
--- a/nodejs/docs/api/class-testoptions.mdx
+++ b/nodejs/docs/api/class-testoptions.mdx
@@ -1133,8 +1133,6 @@ export default defineConfig({
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -1164,6 +1162,8 @@ export default defineConfig({
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testproject.mdx b/nodejs/docs/api/class-testproject.mdx
index 00ce135024..8cad5cac18 100644
--- a/nodejs/docs/api/class-testproject.mdx
+++ b/nodejs/docs/api/class-testproject.mdx
@@ -789,8 +789,6 @@ export default defineConfig({
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -820,6 +818,8 @@ export default defineConfig({
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-testresult.mdx b/nodejs/docs/api/class-testresult.mdx
index f29bc2c071..2cf22f296f 100644
--- a/nodejs/docs/api/class-testresult.mdx
+++ b/nodejs/docs/api/class-testresult.mdx
@@ -287,8 +287,6 @@ testResult.workerIndex
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -318,6 +316,8 @@ testResult.workerIndex
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-teststep.mdx b/nodejs/docs/api/class-teststep.mdx
index 665bc658bb..74264ba807 100644
--- a/nodejs/docs/api/class-teststep.mdx
+++ b/nodejs/docs/api/class-teststep.mdx
@@ -250,8 +250,6 @@ testStep.title
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -281,6 +279,8 @@ testStep.title
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-teststepinfo.mdx b/nodejs/docs/api/class-teststepinfo.mdx
index 4191e8c885..8dfdb1920f 100644
--- a/nodejs/docs/api/class-teststepinfo.mdx
+++ b/nodejs/docs/api/class-teststepinfo.mdx
@@ -181,8 +181,6 @@ testStepInfo.titlePath
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -212,6 +210,8 @@ testStepInfo.titlePath
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-timeouterror.mdx b/nodejs/docs/api/class-timeouterror.mdx
index c6e9103325..3179749806 100644
--- a/nodejs/docs/api/class-timeouterror.mdx
+++ b/nodejs/docs/api/class-timeouterror.mdx
@@ -52,8 +52,6 @@ const playwright = require('playwright');
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -83,6 +81,8 @@ const playwright = require('playwright');
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-touchscreen.mdx b/nodejs/docs/api/class-touchscreen.mdx
index f14883902e..08ca94a065 100644
--- a/nodejs/docs/api/class-touchscreen.mdx
+++ b/nodejs/docs/api/class-touchscreen.mdx
@@ -66,8 +66,6 @@ await touchscreen.tap(x, y);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -97,6 +95,8 @@ await touchscreen.tap(x, y);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-tracing.mdx b/nodejs/docs/api/class-tracing.mdx
index add9d8999c..4954589b42 100644
--- a/nodejs/docs/api/class-tracing.mdx
+++ b/nodejs/docs/api/class-tracing.mdx
@@ -209,6 +209,9 @@ await context.tracing.stopHar();
- `mode` "full" | "minimal" *(optional)*#
When set to `minimal`, only record information necessary for routing from HAR. This omits sizes, timing, page, cookies, security and other types of HAR information that are not used when replaying from HAR. Defaults to `full`.
+ - `resourcesDir` [string] *(optional)*#
+
+ Only used together with `content: 'attach'`. When set, response bodies are placed in this directory instead of next to the HAR file. Not compatible with a `.zip` HAR file.
- `urlFilter` [string] | [RegExp] *(optional)*#
A glob or regex pattern to filter requests that are stored in the HAR. Defaults to none.
@@ -303,8 +306,6 @@ await tracing.stopHar();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -334,6 +335,8 @@ await tracing.stopHar();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-video.mdx b/nodejs/docs/api/class-video.mdx
index 8295e87b11..d05c70eacc 100644
--- a/nodejs/docs/api/class-video.mdx
+++ b/nodejs/docs/api/class-video.mdx
@@ -94,8 +94,6 @@ await video.saveAs(path);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -125,6 +123,8 @@ await video.saveAs(path);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-weberror.mdx b/nodejs/docs/api/class-weberror.mdx
index 3e0086c558..dc79bc1143 100644
--- a/nodejs/docs/api/class-weberror.mdx
+++ b/nodejs/docs/api/class-weberror.mdx
@@ -41,6 +41,30 @@ webError.error();
---
+### location {#web-error-location}
+
+Added in: v1.60webError.location
+
+**Usage**
+
+```js
+webError.location();
+```
+
+**Returns**
+- [Object]#
+ - `url` [string]
+
+ URL of the resource.
+ - `line` [number]
+
+ 0-based line number in the resource.
+ - `column` [number]
+
+ 0-based column number in the resource.
+
+---
+
### page {#web-error-page}
Added in: v1.38webError.page
@@ -78,8 +102,6 @@ webError.page();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -109,6 +131,8 @@ webError.page();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-websocket.mdx b/nodejs/docs/api/class-websocket.mdx
index bfbd6aede6..3944b3ea14 100644
--- a/nodejs/docs/api/class-websocket.mdx
+++ b/nodejs/docs/api/class-websocket.mdx
@@ -182,8 +182,6 @@ webSocket.on('socketerror', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -213,6 +211,8 @@ webSocket.on('socketerror', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-websocketroute.mdx b/nodejs/docs/api/class-websocketroute.mdx
index 765a3dd687..2ebc5876d7 100644
--- a/nodejs/docs/api/class-websocketroute.mdx
+++ b/nodejs/docs/api/class-websocketroute.mdx
@@ -177,6 +177,30 @@ webSocketRoute.onMessage(handler);
---
+### protocols {#web-socket-route-protocols}
+
+Added in: v1.60webSocketRoute.protocols
+
+The list of WebSocket subprotocols requested by the page, as passed via the second argument to the [`WebSocket` constructor](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket). Corresponds to the `Sec-WebSocket-Protocol` request header.
+
+Returns an empty array if no protocols were specified.
+
+**Usage**
+
+```js
+await page.routeWebSocket('wss://example.com/ws', ws => {
+ if (ws.protocols().includes('chat.v2'))
+ ws.onMessage(message => ws.send(JSON.stringify({ version: 2, echo: message })));
+ else
+ ws.close({ code: 1002, reason: 'Unsupported protocol' });
+});
+```
+
+**Returns**
+- [Array]<[string]>#
+
+---
+
### send {#web-socket-route-send}
Added in: v1.48webSocketRoute.send
@@ -233,8 +257,6 @@ webSocketRoute.url();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -264,6 +286,8 @@ webSocketRoute.url();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-worker.mdx b/nodejs/docs/api/class-worker.mdx
index a0ceb23d39..49e40a5be0 100644
--- a/nodejs/docs/api/class-worker.mdx
+++ b/nodejs/docs/api/class-worker.mdx
@@ -25,30 +25,6 @@ for (const worker of page.workers())
## Methods
-### disconnect {#worker-disconnect}
-
-Added in: v1.60worker.disconnect
-
-Disconnects from a worker that was connected through [browserType.connectToWorker()](/api/class-browsertype.mdx#browser-type-connect-to-worker). Calling this method on any other worker will throw.
-
-**Usage**
-
-```js
-await worker.disconnect();
-await worker.disconnect(options);
-```
-
-**Arguments**
-- `options` [Object] *(optional)*
- - `reason` [string] *(optional)*#
-
- The reason to be reported to the operations interrupted by the worker disconnect.
-
-**Returns**
-- [Promise]<[void]>#
-
----
-
### evaluate {#worker-evaluate}
Added before v1.9worker.evaluate
@@ -218,8 +194,6 @@ worker.on('console', data => {});
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -249,6 +223,8 @@ worker.on('console', data => {});
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/api/class-workerinfo.mdx b/nodejs/docs/api/class-workerinfo.mdx
index c16d699e10..300b8122dc 100644
--- a/nodejs/docs/api/class-workerinfo.mdx
+++ b/nodejs/docs/api/class-workerinfo.mdx
@@ -106,8 +106,6 @@ workerInfo.workerIndex
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -137,6 +135,8 @@ workerInfo.workerIndex
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/aria-snapshots.mdx b/nodejs/docs/aria-snapshots.mdx
index 72d862e1af..e01854e2c0 100644
--- a/nodejs/docs/aria-snapshots.mdx
+++ b/nodejs/docs/aria-snapshots.mdx
@@ -459,8 +459,6 @@ Commonly used ARIA attributes, like `checked`, `disabled`, `expanded`, `level`,
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -490,6 +488,8 @@ Commonly used ARIA attributes, like `checked`, `disabled`, `expanded`, `level`,
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/auth.mdx b/nodejs/docs/auth.mdx
index 7aa56ae0db..03d575edb8 100644
--- a/nodejs/docs/auth.mdx
+++ b/nodejs/docs/auth.mdx
@@ -548,8 +548,6 @@ test('not signed in test', async ({ page }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -579,6 +577,8 @@ test('not signed in test', async ({ page }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/best-practices.mdx b/nodejs/docs/best-practices.mdx
index fc192d432a..ce4bfae193 100644
--- a/nodejs/docs/best-practices.mdx
+++ b/nodejs/docs/best-practices.mdx
@@ -187,7 +187,7 @@ await expect(page.getByText('welcome')).toBeVisible();
#### Local debugging
-For local debugging we recommend you [debug your tests live in VSCode.](./getting-started-vscode.mdx#debugging-your-tests) by installing the [VS Code extension](./getting-started-vscode.mdx). You can run tests in debug mode by right-clicking on the line next to the test you want to run which will open a browser window and pause at where the breakpoint is set.
+For local debugging we recommend you [debug your tests live in VS Code](./getting-started-vscode.mdx#debugging-your-tests) by installing the [VS Code extension](./getting-started-vscode.mdx). You can run tests in debug mode by right-clicking on the line next to the test you want to run which will open a browser window and pause at where the breakpoint is set.
@@ -532,8 +532,6 @@ await page.getByRole('link', { name: 'next page' }).click();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -563,6 +561,8 @@ await page.getByRole('link', { name: 'next page' }).click();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/browser-contexts.mdx b/nodejs/docs/browser-contexts.mdx
index 172c978637..54bde1ee91 100644
--- a/nodejs/docs/browser-contexts.mdx
+++ b/nodejs/docs/browser-contexts.mdx
@@ -136,8 +136,6 @@ const userPage = await userContext.newPage();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -167,6 +165,8 @@ const userPage = await userContext.newPage();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/browsers.mdx b/nodejs/docs/browsers.mdx
index 9bd6531362..0571d48b43 100644
--- a/nodejs/docs/browsers.mdx
+++ b/nodejs/docs/browsers.mdx
@@ -660,8 +660,6 @@ npx playwright uninstall --all
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -691,6 +689,8 @@ npx playwright uninstall --all
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/canary-releases.mdx b/nodejs/docs/canary-releases.mdx
index 3814d81baa..8d77b9f01e 100644
--- a/nodejs/docs/canary-releases.mdx
+++ b/nodejs/docs/canary-releases.mdx
@@ -62,8 +62,6 @@ The stable and the `next` documentation is published on [playwright.dev](https:/
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -93,6 +91,8 @@ The stable and the `next` documentation is published on [playwright.dev](https:/
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/chrome-extensions.mdx b/nodejs/docs/chrome-extensions.mdx
index fe1ea383b0..d56d0e5415 100644
--- a/nodejs/docs/chrome-extensions.mdx
+++ b/nodejs/docs/chrome-extensions.mdx
@@ -137,8 +137,6 @@ test('popup page', async ({ page, extensionId }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -168,6 +166,8 @@ test('popup page', async ({ page, extensionId }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/ci-intro.mdx b/nodejs/docs/ci-intro.mdx
index 2026a35942..b2e6bd296e 100644
--- a/nodejs/docs/ci-intro.mdx
+++ b/nodejs/docs/ci-intro.mdx
@@ -185,8 +185,6 @@ Artifacts like trace files, HTML reports or even the console logs contain inform
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -216,6 +214,8 @@ Artifacts like trace files, HTML reports or even the console logs contain inform
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/ci.mdx b/nodejs/docs/ci.mdx
index 86b60e015a..a93f5fec54 100644
--- a/nodejs/docs/ci.mdx
+++ b/nodejs/docs/ci.mdx
@@ -527,8 +527,6 @@ xvfb-run npx playwright test
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -558,6 +556,8 @@ xvfb-run npx playwright test
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/clock.mdx b/nodejs/docs/clock.mdx
index 5440269911..2a89466bef 100644
--- a/nodejs/docs/clock.mdx
+++ b/nodejs/docs/clock.mdx
@@ -198,8 +198,6 @@ await expect(page.getByTestId('current-time')).toHaveText('2/2/2024, 10:00:02 AM
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -229,6 +227,8 @@ await expect(page.getByTestId('current-time')).toHaveText('2/2/2024, 10:00:02 AM
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/codegen-intro.mdx b/nodejs/docs/codegen-intro.mdx
index e37916edf8..de46eafb33 100644
--- a/nodejs/docs/codegen-intro.mdx
+++ b/nodejs/docs/codegen-intro.mdx
@@ -84,8 +84,6 @@ You can generate tests using emulation for specific viewports, devices, color sc
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -115,6 +113,8 @@ You can generate tests using emulation for specific viewports, devices, color sc
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/codegen.mdx b/nodejs/docs/codegen.mdx
index 9378221c54..b725fa726e 100644
--- a/nodejs/docs/codegen.mdx
+++ b/nodejs/docs/codegen.mdx
@@ -240,8 +240,6 @@ const { chromium } = require('@playwright/test');
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -271,6 +269,8 @@ const { chromium } = require('@playwright/test');
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/debug.mdx b/nodejs/docs/debug.mdx
index b68e2a69fe..654579c603 100644
--- a/nodejs/docs/debug.mdx
+++ b/nodejs/docs/debug.mdx
@@ -337,8 +337,6 @@ await chromium.launch({ headless: false, slowMo: 100 });
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -368,6 +366,8 @@ await chromium.launch({ headless: false, slowMo: 100 });
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/dialogs.mdx b/nodejs/docs/dialogs.mdx
index 83fb0d9ecf..364facec73 100644
--- a/nodejs/docs/dialogs.mdx
+++ b/nodejs/docs/dialogs.mdx
@@ -90,8 +90,6 @@ This will wait for the print dialog to be opened after the button is clicked. Ma
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -121,6 +119,8 @@ This will wait for the print dialog to be opened after the button is clicked. Ma
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/docker.mdx b/nodejs/docs/docker.mdx
index b8790d8ce0..695e511620 100644
--- a/nodejs/docs/docker.mdx
+++ b/nodejs/docs/docker.mdx
@@ -189,8 +189,6 @@ RUN npx -y playwright@1.59.1 install --with-deps
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -220,6 +218,8 @@ RUN npx -y playwright@1.59.1 install --with-deps
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/downloads.mdx b/nodejs/docs/downloads.mdx
index 387f92c8ae..dab9fff4f6 100644
--- a/nodejs/docs/downloads.mdx
+++ b/nodejs/docs/downloads.mdx
@@ -66,8 +66,6 @@ For uploading files, see the [uploading files](./input.mdx#upload-files) section
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -97,6 +95,8 @@ For uploading files, see the [uploading files](./input.mdx#upload-files) section
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/emulation.mdx b/nodejs/docs/emulation.mdx
index 3b46066eb3..ffefc98489 100644
--- a/nodejs/docs/emulation.mdx
+++ b/nodejs/docs/emulation.mdx
@@ -627,8 +627,6 @@ const context = await browser.newContext({
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -658,6 +656,8 @@ const context = await browser.newContext({
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/evaluating.mdx b/nodejs/docs/evaluating.mdx
index 664b85c8fe..c803d4617c 100644
--- a/nodejs/docs/evaluating.mdx
+++ b/nodejs/docs/evaluating.mdx
@@ -159,8 +159,6 @@ test.beforeEach(async ({ page }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -190,6 +188,8 @@ test.beforeEach(async ({ page }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/events.mdx b/nodejs/docs/events.mdx
index 3619bfaf26..6bc9ef279f 100644
--- a/nodejs/docs/events.mdx
+++ b/nodejs/docs/events.mdx
@@ -79,8 +79,6 @@ await page.evaluate("prompt('Enter a number:')");
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -110,6 +108,8 @@ await page.evaluate("prompt('Enter a number:')");
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/extensibility.mdx b/nodejs/docs/extensibility.mdx
index d5fbdc99d3..4618ef9a20 100644
--- a/nodejs/docs/extensibility.mdx
+++ b/nodejs/docs/extensibility.mdx
@@ -86,8 +86,6 @@ test('selector engine test', async ({ page }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -117,6 +115,8 @@ test('selector engine test', async ({ page }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/frames.mdx b/nodejs/docs/frames.mdx
index f4440f2952..ea9ec5483a 100644
--- a/nodejs/docs/frames.mdx
+++ b/nodejs/docs/frames.mdx
@@ -55,8 +55,6 @@ await frame.fill('#username-input', 'John');
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -86,6 +84,8 @@ await frame.fill('#username-input', 'John');
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/getting-started-cli.mdx b/nodejs/docs/getting-started-cli.mdx
index 45b5060723..71d9f432e4 100644
--- a/nodejs/docs/getting-started-cli.mdx
+++ b/nodejs/docs/getting-started-cli.mdx
@@ -166,7 +166,8 @@ playwright-cli tab-close [index] # close a tab
### Network
```bash
-playwright-cli network # list network requests since page load
+playwright-cli requests # list network requests since page load
+playwright-cli request # show full details of a single request
playwright-cli route [opts] # mock network requests
playwright-cli route-list # list active routes
playwright-cli unroute [pattern] # remove routes
@@ -284,7 +285,7 @@ Connect to your existing browser tabs instead of launching a new browser:
playwright-cli attach --extension
```
-This requires the [Playwright MCP Bridge browser extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md) to be installed.
+This requires the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md) to be installed.
## Quick Reference
@@ -328,8 +329,6 @@ This requires the [Playwright MCP Bridge browser extension](https://github.com/m
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -359,6 +358,8 @@ This requires the [Playwright MCP Bridge browser extension](https://github.com/m
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/getting-started-mcp.mdx b/nodejs/docs/getting-started-mcp.mdx
index 4b34e64f60..43c76e39d8 100644
--- a/nodejs/docs/getting-started-mcp.mdx
+++ b/nodejs/docs/getting-started-mcp.mdx
@@ -105,7 +105,7 @@ Playwright MCP provides tools for all common browser interactions:
### Running Playwright code
-For complex interactions that go beyond individual tool calls, use the `browser_run_code` tool to execute Playwright scripts directly:
+For complex interactions that go beyond individual tool calls, use the `browser_run_code_unsafe` tool to execute Playwright scripts directly. This tool runs arbitrary JavaScript in the Playwright server process and is RCE-equivalent — only enable it for trusted MCP clients:
```txt
Run this Playwright code to verify the todo count:
@@ -174,7 +174,7 @@ Supported values: `chrome`, `firefox`, `webkit`, `msedge`.
Playwright MCP supports three profile modes:
- **Persistent (default)**: Login state and cookies are preserved between sessions. The profile is stored in `ms-playwright/mcp-{channel}-{workspace-hash}` in your platform's cache directory, so different projects get separate profiles automatically. Override with `--user-data-dir`.
- **Isolated**: Each session starts fresh. Pass `--isolated` to enable. You can load initial state with `--storage-state`.
-- **Browser extension**: Connect to your existing browser tabs with the [Playwright MCP Bridge extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md). Pass `--extension` to enable.
+- **Browser extension**: Connect to your existing browser tabs with the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md). Pass `--extension` to enable.
### Configuration file
@@ -184,7 +184,7 @@ For advanced configuration, use a JSON config file:
npx @playwright/mcp@latest --config path/to/config.json
```
-The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/packages/playwright-mcp/config.d.ts) for the full schema.
+The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/config.d.ts) for the full schema.
### Standalone server
@@ -247,8 +247,6 @@ Then point your MCP client to the HTTP endpoint:
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -278,6 +276,8 @@ Then point your MCP client to the HTTP endpoint:
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/getting-started-vscode.mdx b/nodejs/docs/getting-started-vscode.mdx
index f71f0dbffd..77525c67db 100644
--- a/nodejs/docs/getting-started-vscode.mdx
+++ b/nodejs/docs/getting-started-vscode.mdx
@@ -165,8 +165,6 @@ If you have multiple `playwright.config.ts` files, you can switch between them u
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -196,6 +194,8 @@ If you have multiple `playwright.config.ts` files, you can switch between them u
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/handles.mdx b/nodejs/docs/handles.mdx
index a4ff21b40c..55757e4e37 100644
--- a/nodejs/docs/handles.mdx
+++ b/nodejs/docs/handles.mdx
@@ -139,8 +139,6 @@ await locator.click();
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -170,6 +168,8 @@ await locator.click();
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/input.mdx b/nodejs/docs/input.mdx
index 54b7385a0b..452203b0d6 100644
--- a/nodejs/docs/input.mdx
+++ b/nodejs/docs/input.mdx
@@ -286,8 +286,6 @@ await page.getByTestId('scrolling-container').evaluate(e => e.scrollTop += 100);
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -317,6 +315,8 @@ await page.getByTestId('scrolling-container').evaluate(e => e.scrollTop += 100);
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/intro.mdx b/nodejs/docs/intro.mdx
index 81f5bfa3a6..1a1dcda6d0 100644
--- a/nodejs/docs/intro.mdx
+++ b/nodejs/docs/intro.mdx
@@ -291,8 +291,6 @@ pnpm exec playwright --version
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -322,6 +320,8 @@ pnpm exec playwright --version
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/languages.mdx b/nodejs/docs/languages.mdx
index b00e2473ea..4e604a272d 100644
--- a/nodejs/docs/languages.mdx
+++ b/nodejs/docs/languages.mdx
@@ -56,8 +56,6 @@ Playwright for .NET comes with MSTest, NUnit, xUnit, and xUnit v3 [base classes]
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -87,6 +85,8 @@ Playwright for .NET comes with MSTest, NUnit, xUnit, and xUnit v3 [base classes]
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/library.mdx b/nodejs/docs/library.mdx
index bbf08defeb..f9bf705ed9 100644
--- a/nodejs/docs/library.mdx
+++ b/nodejs/docs/library.mdx
@@ -443,8 +443,6 @@ let page: import('playwright').Page;
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -474,6 +472,8 @@ let page: import('playwright').Page;
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/locators.mdx b/nodejs/docs/locators.mdx
index 24873319b8..5a525d1dbf 100644
--- a/nodejs/docs/locators.mdx
+++ b/nodejs/docs/locators.mdx
@@ -937,8 +937,6 @@ For less commonly used locators, look at the [other locators](./other-locators.m
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -968,6 +966,8 @@ For less commonly used locators, look at the [other locators](./other-locators.m
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/mock-browser.mdx b/nodejs/docs/mock-browser.mdx
index d0a23e70f2..9356b86df8 100644
--- a/nodejs/docs/mock-browser.mdx
+++ b/nodejs/docs/mock-browser.mdx
@@ -186,8 +186,6 @@ test('update battery status (no golden)', async ({ page }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -217,6 +215,8 @@ test('update battery status (no golden)', async ({ page }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/mock.mdx b/nodejs/docs/mock.mdx
index f106550709..d440635352 100644
--- a/nodejs/docs/mock.mdx
+++ b/nodejs/docs/mock.mdx
@@ -199,8 +199,6 @@ For more details, see [WebSocketRoute].
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -230,6 +228,8 @@ For more details, see [WebSocketRoute].
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/navigations.mdx b/nodejs/docs/navigations.mdx
index b5d03cf85e..8a2233cc3f 100644
--- a/nodejs/docs/navigations.mdx
+++ b/nodejs/docs/navigations.mdx
@@ -98,8 +98,6 @@ Playwright splits the process of showing a new document in a page into **navigat
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -129,6 +127,8 @@ Playwright splits the process of showing a new document in a page into **navigat
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/network.mdx b/nodejs/docs/network.mdx
index d090317087..0f0b9319b4 100644
--- a/nodejs/docs/network.mdx
+++ b/nodejs/docs/network.mdx
@@ -363,8 +363,6 @@ If you're interested in not solely using Service Workers for testing and network
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -394,6 +392,8 @@ If you're interested in not solely using Service Workers for testing and network
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/other-locators.mdx b/nodejs/docs/other-locators.mdx
index 6e54e48da4..1c27258ef7 100644
--- a/nodejs/docs/other-locators.mdx
+++ b/nodejs/docs/other-locators.mdx
@@ -426,8 +426,6 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -457,6 +455,8 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/pages.mdx b/nodejs/docs/pages.mdx
index 775aebe047..e7bce1701f 100644
--- a/nodejs/docs/pages.mdx
+++ b/nodejs/docs/pages.mdx
@@ -112,8 +112,6 @@ page.on('popup', async popup => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -143,6 +141,8 @@ page.on('popup', async popup => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/pom.mdx b/nodejs/docs/pom.mdx
index 0e69a5bd68..c68fe50f98 100644
--- a/nodejs/docs/pom.mdx
+++ b/nodejs/docs/pom.mdx
@@ -188,8 +188,6 @@ await expect(playwrightDev.tocList).toHaveText([
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -219,6 +217,8 @@ await expect(playwrightDev.tocList).toHaveText([
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/protractor.mdx b/nodejs/docs/protractor.mdx
index cc501e2e39..1bd2b8ff2e 100644
--- a/nodejs/docs/protractor.mdx
+++ b/nodejs/docs/protractor.mdx
@@ -188,8 +188,6 @@ Learn more about Playwright Test runner:
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -219,6 +217,8 @@ Learn more about Playwright Test runner:
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/puppeteer.mdx b/nodejs/docs/puppeteer.mdx
index d4674bee60..deeb0a01a3 100644
--- a/nodejs/docs/puppeteer.mdx
+++ b/nodejs/docs/puppeteer.mdx
@@ -193,8 +193,6 @@ Learn more about Playwright Test runner:
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -224,6 +222,8 @@ Learn more about Playwright Test runner:
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/release-notes.mdx b/nodejs/docs/release-notes.mdx
index 6775aa9977..d76a6e84e4 100644
--- a/nodejs/docs/release-notes.mdx
+++ b/nodejs/docs/release-notes.mdx
@@ -3460,8 +3460,6 @@ This version of Playwright was also tested against the following stable channels
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -3491,6 +3489,8 @@ This version of Playwright was also tested against the following stable channels
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/running-tests.mdx b/nodejs/docs/running-tests.mdx
index 6db1b2d12d..7101a5e5db 100644
--- a/nodejs/docs/running-tests.mdx
+++ b/nodejs/docs/running-tests.mdx
@@ -193,8 +193,6 @@ You can filter and search for tests as well as click on each test to see the tes
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -224,6 +222,8 @@ You can filter and search for tests as well as click on each test to see the tes
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/screenshots.mdx b/nodejs/docs/screenshots.mdx
index 791de90eac..6c99145fba 100644
--- a/nodejs/docs/screenshots.mdx
+++ b/nodejs/docs/screenshots.mdx
@@ -63,8 +63,6 @@ await page.locator('.header').screenshot({ path: 'screenshot.png' });
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -94,6 +92,8 @@ await page.locator('.header').screenshot({ path: 'screenshot.png' });
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/selenium-grid.mdx b/nodejs/docs/selenium-grid.mdx
index fde20bc020..1a309a582e 100644
--- a/nodejs/docs/selenium-grid.mdx
+++ b/nodejs/docs/selenium-grid.mdx
@@ -145,8 +145,6 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -176,6 +174,8 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/service-workers.mdx b/nodejs/docs/service-workers.mdx
index 8e8be7721b..2ca163d09e 100644
--- a/nodejs/docs/service-workers.mdx
+++ b/nodejs/docs/service-workers.mdx
@@ -151,8 +151,6 @@ Requests for updated Service Worker main script code currently cannot be routed
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -182,6 +180,8 @@ Requests for updated Service Worker main script code currently cannot be routed
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-agents.mdx b/nodejs/docs/test-agents.mdx
index 3279a18675..280d6e8b68 100644
--- a/nodejs/docs/test-agents.mdx
+++ b/nodejs/docs/test-agents.mdx
@@ -275,8 +275,6 @@ Seed tests provide a ready-to-use `page` context to bootstrap execution.
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -306,6 +304,8 @@ Seed tests provide a ready-to-use `page` context to bootstrap execution.
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-annotations.mdx b/nodejs/docs/test-annotations.mdx
index cda2677447..cf0ab7ffbb 100644
--- a/nodejs/docs/test-annotations.mdx
+++ b/nodejs/docs/test-annotations.mdx
@@ -339,8 +339,6 @@ test('example test', async ({ page, browser }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -370,6 +368,8 @@ test('example test', async ({ page, browser }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-assertions.mdx b/nodejs/docs/test-assertions.mdx
index 40c46dff6e..1f97a2fd0f 100644
--- a/nodejs/docs/test-assertions.mdx
+++ b/nodejs/docs/test-assertions.mdx
@@ -382,8 +382,6 @@ test('passes', async ({ database }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -413,6 +411,8 @@ test('passes', async ({ database }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-cli.mdx b/nodejs/docs/test-cli.mdx
index 59af546ae6..01c10818ad 100644
--- a/nodejs/docs/test-cli.mdx
+++ b/nodejs/docs/test-cli.mdx
@@ -351,8 +351,6 @@ npx playwright clear-cache
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -382,6 +380,8 @@ npx playwright clear-cache
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-components.mdx b/nodejs/docs/test-components.mdx
index 1042e31462..66717c9fa7 100644
--- a/nodejs/docs/test-components.mdx
+++ b/nodejs/docs/test-components.mdx
@@ -802,8 +802,6 @@ Accessing a component's internal methods or its instance within test code is nei
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -833,6 +831,8 @@ Accessing a component's internal methods or its instance within test code is nei
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-configuration.mdx b/nodejs/docs/test-configuration.mdx
index d8280dcd18..61d1a336fd 100644
--- a/nodejs/docs/test-configuration.mdx
+++ b/nodejs/docs/test-configuration.mdx
@@ -175,8 +175,6 @@ export default defineConfig({
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -206,6 +204,8 @@ export default defineConfig({
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-fixtures.mdx b/nodejs/docs/test-fixtures.mdx
index f5cfbc9d1d..01cb24670a 100644
--- a/nodejs/docs/test-fixtures.mdx
+++ b/nodejs/docs/test-fixtures.mdx
@@ -878,8 +878,6 @@ Note that the fixtures will still run once per [worker process](./test-parallel.
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -909,6 +907,8 @@ Note that the fixtures will still run once per [worker process](./test-parallel.
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-global-setup-teardown.mdx b/nodejs/docs/test-global-setup-teardown.mdx
index da75f61b92..436dc9c6b4 100644
--- a/nodejs/docs/test-global-setup-teardown.mdx
+++ b/nodejs/docs/test-global-setup-teardown.mdx
@@ -296,8 +296,6 @@ export default globalSetup;
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -327,6 +325,8 @@ export default globalSetup;
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-parallel.mdx b/nodejs/docs/test-parallel.mdx
index 4f03daf798..54a6ac2223 100644
--- a/nodejs/docs/test-parallel.mdx
+++ b/nodejs/docs/test-parallel.mdx
@@ -304,8 +304,6 @@ Do not define your tests directly in a helper file. This could lead to unexpecte
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -335,6 +333,8 @@ Do not define your tests directly in a helper file. This could lead to unexpecte
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-parameterize.mdx b/nodejs/docs/test-parameterize.mdx
index 0963a89200..92e7770ef7 100644
--- a/nodejs/docs/test-parameterize.mdx
+++ b/nodejs/docs/test-parameterize.mdx
@@ -441,8 +441,6 @@ for (const record of records) {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -472,6 +470,8 @@ for (const record of records) {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-projects.mdx b/nodejs/docs/test-projects.mdx
index f672d2783c..f78685633e 100644
--- a/nodejs/docs/test-projects.mdx
+++ b/nodejs/docs/test-projects.mdx
@@ -248,8 +248,6 @@ Projects can be also used to parametrize tests with your custom configuration -
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -279,6 +277,8 @@ Projects can be also used to parametrize tests with your custom configuration -
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-reporters.mdx b/nodejs/docs/test-reporters.mdx
index 1ebe6f4e2b..03828b7463 100644
--- a/nodejs/docs/test-reporters.mdx
+++ b/nodejs/docs/test-reporters.mdx
@@ -242,6 +242,12 @@ Or if there is a custom folder name:
npx playwright show-report my-report
```
+You can also pass a `.zip` archive — for example one downloaded from a CI artifact. The archive must contain `index.html` at its top level. Playwright will extract it to a temporary directory and serve the report:
+
+```bash
+npx playwright show-report playwright-report.zip
+```
+
HTML report supports the following configuration options and environment variables:
| Environment Variable Name | Reporter Config Option| Description | Default
@@ -520,8 +526,6 @@ Here's a short list of open source reporter implementations that you can take a
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -551,6 +555,8 @@ Here's a short list of open source reporter implementations that you can take a
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-retries.mdx b/nodejs/docs/test-retries.mdx
index 9f78e4a1df..fc09723c52 100644
--- a/nodejs/docs/test-retries.mdx
+++ b/nodejs/docs/test-retries.mdx
@@ -264,8 +264,6 @@ test('runs second', async () => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -295,6 +293,8 @@ test('runs second', async () => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-sharding.mdx b/nodejs/docs/test-sharding.mdx
index 2dd4710fa5..bab48cb526 100644
--- a/nodejs/docs/test-sharding.mdx
+++ b/nodejs/docs/test-sharding.mdx
@@ -231,8 +231,6 @@ Supported options:
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -262,6 +260,8 @@ Supported options:
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-snapshots.mdx b/nodejs/docs/test-snapshots.mdx
index 08303cda18..f34f59a012 100644
--- a/nodejs/docs/test-snapshots.mdx
+++ b/nodejs/docs/test-snapshots.mdx
@@ -161,8 +161,6 @@ Snapshots are stored next to the test file, in a separate directory. For example
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -192,6 +190,8 @@ Snapshots are stored next to the test file, in a separate directory. For example
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-timeouts.mdx b/nodejs/docs/test-timeouts.mdx
index 5aa9dc9a4f..9697484eae 100644
--- a/nodejs/docs/test-timeouts.mdx
+++ b/nodejs/docs/test-timeouts.mdx
@@ -232,8 +232,6 @@ API reference: [test.extend()](/api/class-test.mdx#test-extend).
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -263,6 +261,8 @@ API reference: [test.extend()](/api/class-test.mdx#test-extend).
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-typescript.mdx b/nodejs/docs/test-typescript.mdx
index cf551fba00..bb497bdbcb 100644
--- a/nodejs/docs/test-typescript.mdx
+++ b/nodejs/docs/test-typescript.mdx
@@ -160,8 +160,6 @@ Then `npm run test` will build the tests and run them.
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -191,6 +189,8 @@ Then `npm run test` will build the tests and run them.
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-ui-mode.mdx b/nodejs/docs/test-ui-mode.mdx
index b0cf088429..a1fbd9ee9d 100644
--- a/nodejs/docs/test-ui-mode.mdx
+++ b/nodejs/docs/test-ui-mode.mdx
@@ -154,8 +154,6 @@ Be aware that when specifying the `--ui-host=0.0.0.0` flag, UI Mode with your tr
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -185,6 +183,8 @@ Be aware that when specifying the `--ui-host=0.0.0.0` flag, UI Mode with your tr
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-use-options.mdx b/nodejs/docs/test-use-options.mdx
index 41dfe39990..e17b43eddd 100644
--- a/nodejs/docs/test-use-options.mdx
+++ b/nodejs/docs/test-use-options.mdx
@@ -369,8 +369,6 @@ test('no base url', async ({ page }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -400,6 +398,8 @@ test('no base url', async ({ page }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/test-webserver.mdx b/nodejs/docs/test-webserver.mdx
index 8157529a9b..87949f1eb3 100644
--- a/nodejs/docs/test-webserver.mdx
+++ b/nodejs/docs/test-webserver.mdx
@@ -153,8 +153,6 @@ export default defineConfig({
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -184,6 +182,8 @@ export default defineConfig({
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/testing-library.mdx b/nodejs/docs/testing-library.mdx
index ee60aaba6a..70a3bb124c 100644
--- a/nodejs/docs/testing-library.mdx
+++ b/nodejs/docs/testing-library.mdx
@@ -176,8 +176,6 @@ Learn more about Playwright Test runner:
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -207,6 +205,8 @@ Learn more about Playwright Test runner:
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/touch-events.mdx b/nodejs/docs/touch-events.mdx
index e2f742a7f9..185f983b73 100644
--- a/nodejs/docs/touch-events.mdx
+++ b/nodejs/docs/touch-events.mdx
@@ -164,8 +164,6 @@ test(`pinch in gesture to zoom out the map`, async ({ page }) => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -195,6 +193,8 @@ test(`pinch in gesture to zoom out the map`, async ({ page }) => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/trace-viewer-intro.mdx b/nodejs/docs/trace-viewer-intro.mdx
index 98d6c62d3a..0bf56303d8 100644
--- a/nodejs/docs/trace-viewer-intro.mdx
+++ b/nodejs/docs/trace-viewer-intro.mdx
@@ -96,8 +96,6 @@ To learn more about traces, check out our detailed guide on [Trace Viewer](/trac
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -127,6 +125,8 @@ To learn more about traces, check out our detailed guide on [Trace Viewer](/trac
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/trace-viewer.mdx b/nodejs/docs/trace-viewer.mdx
index 2f31618988..da94dba14a 100644
--- a/nodejs/docs/trace-viewer.mdx
+++ b/nodejs/docs/trace-viewer.mdx
@@ -233,8 +233,6 @@ The "Attachments" tab allows you to explore attachments. If you're doing [visual
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -264,6 +262,8 @@ The "Attachments" tab allows you to explore attachments. If you're doing [visual
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/videos.mdx b/nodejs/docs/videos.mdx
index 3b8ca14b28..8b1b77ad90 100644
--- a/nodejs/docs/videos.mdx
+++ b/nodejs/docs/videos.mdx
@@ -115,8 +115,6 @@ Note that the video is only available after the page or browser context is close
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -146,6 +144,8 @@ Note that the video is only available after the page or browser context is close
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/webview2.mdx b/nodejs/docs/webview2.mdx
index a653ca4d96..8d993a4831 100644
--- a/nodejs/docs/webview2.mdx
+++ b/nodejs/docs/webview2.mdx
@@ -139,8 +139,6 @@ For debugging tests, see the Playwright [Debugging guide](./debug).
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -170,6 +168,8 @@ For debugging tests, see the Playwright [Debugging guide](./debug).
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/nodejs/docs/writing-tests.mdx b/nodejs/docs/writing-tests.mdx
index f47968b190..7f22af0490 100644
--- a/nodejs/docs/writing-tests.mdx
+++ b/nodejs/docs/writing-tests.mdx
@@ -192,8 +192,6 @@ test.describe('navigation', () => {
[Dialog]: /api/class-dialog.mdx "Dialog"
[Disposable]: /api/class-disposable.mdx "Disposable"
[Download]: /api/class-download.mdx "Download"
-[Electron]: /api/class-electron.mdx "Electron"
-[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
[Frame]: /api/class-frame.mdx "Frame"
@@ -223,6 +221,8 @@ test.describe('navigation', () => {
[WebSocket]: /api/class-websocket.mdx "WebSocket"
[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
[Worker]: /api/class-worker.mdx "Worker"
+[Electron]: /api/class-electron.mdx "Electron"
+[ElectronApplication]: /api/class-electronapplication.mdx "ElectronApplication"
[Fixtures]: /api/class-fixtures.mdx "Fixtures"
[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
[FullProject]: /api/class-fullproject.mdx "FullProject"
diff --git a/python/docs/actionability.mdx b/python/docs/actionability.mdx
index 9b6a9463f5..1884b0ff9a 100644
--- a/python/docs/actionability.mdx
+++ b/python/docs/actionability.mdx
@@ -139,6 +139,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api-testing.mdx b/python/docs/api-testing.mdx
index b633090274..562a8d48ee 100644
--- a/python/docs/api-testing.mdx
+++ b/python/docs/api-testing.mdx
@@ -299,6 +299,7 @@ context = browser.new_context(storage_state=state)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-apirequest.mdx b/python/docs/api/class-apirequest.mdx
index 6cbbb65efd..6b52b21065 100644
--- a/python/docs/api/class-apirequest.mdx
+++ b/python/docs/api/class-apirequest.mdx
@@ -183,6 +183,7 @@ api_request.new_context(**kwargs)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-apirequestcontext.mdx b/python/docs/api/class-apirequestcontext.mdx
index d871c57a0d..d805cdf9f5 100644
--- a/python/docs/api/class-apirequestcontext.mdx
+++ b/python/docs/api/class-apirequestcontext.mdx
@@ -9,13 +9,17 @@ import HTMLCard from '@site/src/components/HTMLCard';
This API is used for the Web API testing. You can use it to trigger API endpoints, configure micro-services, prepare environment or the service to your e2e test.
-Each Playwright browser context has associated with it [APIRequestContext] instance which shares cookie storage with the browser context and can be accessed via [browser_context.request](/api/class-browsercontext.mdx#browser-context-request) or [page.request](/api/class-page.mdx#page-request). It is also possible to create a new APIRequestContext instance manually by calling [api_request.new_context()](/api/class-apirequest.mdx#api-request-new-context).
+Each Playwright browser context has an associated [APIRequestContext], accessible via [browser_context.request](/api/class-browsercontext.mdx#browser-context-request) or [page.request](/api/class-page.mdx#page-request) (these return the
+
+**same instance** — `page.request` is a shortcut for `page.context().request`). You can also create a standalone, isolated instance with [api_request.new_context()](/api/class-apirequest.mdx#api-request-new-context).
**Cookie management**
-[APIRequestContext] returned by [browser_context.request](/api/class-browsercontext.mdx#browser-context-request) and [page.request](/api/class-page.mdx#page-request) shares cookie storage with the corresponding [BrowserContext]. Each API request will have `Cookie` header populated with the values from the browser context. If the API response contains `Set-Cookie` header it will automatically update [BrowserContext] cookies and requests made from the page will pick them up. This means that if you log in using this API, your e2e test will be logged in and vice versa.
+The [APIRequestContext] returned by [browser_context.request](/api/class-browsercontext.mdx#browser-context-request) and
+
+[page.request](/api/class-page.mdx#page-request) uses the same cookie jar as its [BrowserContext]:
-If you want API requests to not interfere with the browser cookies you should create a new [APIRequestContext] by calling [api_request.new_context()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
+If you want API requests that do **not** share cookies with the browser, create an isolated context via [api_request.new_context()](/api/class-apirequest.mdx#api-request-new-context). Such `APIRequestContext` object will have its own isolated cookie storage.
#
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
-- `form` [Dict]\[[str], [str] | [float] | [bool]\] *(optional)* Added in: v1.17#
+- `form` [Dict]\[[str], [str] | [float] | [bool]\] | [FormData] *(optional)* Added in: v1.17#
- Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided.
+ Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided. Use [FormData] to send multiple values for the same field.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it.
@@ -176,7 +180,7 @@ api_request_context.delete(url, **kwargs)
- `max_retries` [int] *(optional)* Added in: v1.46#
Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
-- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] *(optional)* Added in: v1.17#
+- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] | [FormData] *(optional)* Added in: v1.17#
- `name` [str]
File name
@@ -187,7 +191,7 @@ api_request_context.delete(url, **kwargs)
File content
- Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
+ Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. Use [FormData] to send multiple files in the same field.
- `params` [Dict]\[[str], [str] | [float] | [bool]\] | [str] *(optional)*#
Query parameters to be sent with the URL.
@@ -265,9 +269,9 @@ api_request_context.fetch(
- `fail_on_status_code` [bool] *(optional)*#
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
-- `form` [Dict]\[[str], [str] | [float] | [bool]\] *(optional)*#
+- `form` [Dict]\[[str], [str] | [float] | [bool]\] | [FormData] *(optional)*#
- Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided.
+ Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided. Use [FormData] to send multiple values for the same field.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it.
@@ -283,7 +287,7 @@ api_request_context.fetch(
- `method` [str] *(optional)*#
If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) or [POST](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/POST)). If not specified, GET method is used.
-- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] *(optional)*#
+- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] | [FormData] *(optional)*#
- `name` [str]
File name
@@ -294,7 +298,7 @@ api_request_context.fetch(
File content
- Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
+ Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. Use [FormData] to send multiple files in the same field.
- `params` [Dict]\[[str], [str] | [float] | [bool]\] | [str] *(optional)*#
Query parameters to be sent with the URL.
@@ -335,9 +339,9 @@ api_request_context.get("https://example.com/api/getText", params=query_params)
- `fail_on_status_code` [bool] *(optional)*#
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
-- `form` [Dict]\[[str], [str] | [float] | [bool]\] *(optional)* Added in: v1.26#
+- `form` [Dict]\[[str], [str] | [float] | [bool]\] | [FormData] *(optional)* Added in: v1.26#
- Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided.
+ Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided. Use [FormData] to send multiple values for the same field.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it.
@@ -350,7 +354,7 @@ api_request_context.get("https://example.com/api/getText", params=query_params)
- `max_retries` [int] *(optional)* Added in: v1.46#
Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
-- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] *(optional)* Added in: v1.26#
+- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] | [FormData] *(optional)* Added in: v1.26#
- `name` [str]
File name
@@ -361,7 +365,7 @@ api_request_context.get("https://example.com/api/getText", params=query_params)
File content
- Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
+ Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. Use [FormData] to send multiple files in the same field.
- `params` [Dict]\[[str], [str] | [float] | [bool]\] | [str] *(optional)*#
Query parameters to be sent with the URL.
@@ -397,9 +401,9 @@ api_request_context.head(url, **kwargs)
- `fail_on_status_code` [bool] *(optional)*#
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
-- `form` [Dict]\[[str], [str] | [float] | [bool]\] *(optional)* Added in: v1.26#
+- `form` [Dict]\[[str], [str] | [float] | [bool]\] | [FormData] *(optional)* Added in: v1.26#
- Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided.
+ Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided. Use [FormData] to send multiple values for the same field.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it.
@@ -412,7 +416,7 @@ api_request_context.head(url, **kwargs)
- `max_retries` [int] *(optional)* Added in: v1.46#
Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
-- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] *(optional)* Added in: v1.26#
+- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] | [FormData] *(optional)* Added in: v1.26#
- `name` [str]
File name
@@ -423,7 +427,7 @@ api_request_context.head(url, **kwargs)
File content
- Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
+ Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. Use [FormData] to send multiple files in the same field.
- `params` [Dict]\[[str], [str] | [float] | [bool]\] | [str] *(optional)*#
Query parameters to be sent with the URL.
@@ -459,9 +463,9 @@ api_request_context.patch(url, **kwargs)
- `fail_on_status_code` [bool] *(optional)*#
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
-- `form` [Dict]\[[str], [str] | [float] | [bool]\] *(optional)*#
+- `form` [Dict]\[[str], [str] | [float] | [bool]\] | [FormData] *(optional)*#
- Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided.
+ Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided. Use [FormData] to send multiple values for the same field.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it.
@@ -474,7 +478,7 @@ api_request_context.patch(url, **kwargs)
- `max_retries` [int] *(optional)* Added in: v1.46#
Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
-- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] *(optional)*#
+- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] | [FormData] *(optional)*#
- `name` [str]
File name
@@ -485,7 +489,7 @@ api_request_context.patch(url, **kwargs)
File content
- Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
+ Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. Use [FormData] to send multiple files in the same field.
- `params` [Dict]\[[str], [str] | [float] | [bool]\] | [str] *(optional)*#
Query parameters to be sent with the URL.
@@ -550,9 +554,9 @@ api_request_context.post(
- `fail_on_status_code` [bool] *(optional)*#
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
-- `form` [Dict]\[[str], [str] | [float] | [bool]\] *(optional)*#
+- `form` [Dict]\[[str], [str] | [float] | [bool]\] | [FormData] *(optional)*#
- Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided.
+ Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided. Use [FormData] to send multiple values for the same field.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it.
@@ -565,7 +569,7 @@ api_request_context.post(
- `max_retries` [int] *(optional)* Added in: v1.46#
Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
-- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] *(optional)*#
+- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] | [FormData] *(optional)*#
- `name` [str]
File name
@@ -576,7 +580,7 @@ api_request_context.post(
File content
- Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
+ Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. Use [FormData] to send multiple files in the same field.
- `params` [Dict]\[[str], [str] | [float] | [bool]\] | [str] *(optional)*#
Query parameters to be sent with the URL.
@@ -612,9 +616,9 @@ api_request_context.put(url, **kwargs)
- `fail_on_status_code` [bool] *(optional)*#
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status codes.
-- `form` [Dict]\[[str], [str] | [float] | [bool]\] *(optional)*#
+- `form` [Dict]\[[str], [str] | [float] | [bool]\] | [FormData] *(optional)*#
- Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided.
+ Provides an object that will be serialized as html form using `application/x-www-form-urlencoded` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `application/x-www-form-urlencoded` unless explicitly provided. Use [FormData] to send multiple values for the same field.
- `headers` [Dict]\[[str], [str]\] *(optional)*#
Allows to set HTTP headers. These headers will apply to the fetched request as well as any redirects initiated by it.
@@ -627,7 +631,7 @@ api_request_context.put(url, **kwargs)
- `max_retries` [int] *(optional)* Added in: v1.46#
Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
-- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] *(optional)*#
+- `multipart` [Dict]\[[str], [str] | [float] | [bool] | [ReadStream] | [Dict]\] | [FormData] *(optional)*#
- `name` [str]
File name
@@ -638,7 +642,7 @@ api_request_context.put(url, **kwargs)
File content
- Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content.
+ Provides an object that will be serialized as html form using `multipart/form-data` encoding and sent as this request body. If this parameter is specified `content-type` header will be set to `multipart/form-data` unless explicitly provided. File values can be passed as file-like object containing file name, mime-type and its content. Use [FormData] to send multiple files in the same field.
- `params` [Dict]\[[str], [str] | [float] | [bool]\] | [str] *(optional)*#
Query parameters to be sent with the URL.
@@ -747,6 +751,7 @@ api_request_context.tracing
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-apiresponse.mdx b/python/docs/api/class-apiresponse.mdx
index 19e734db19..225764927b 100644
--- a/python/docs/api/class-apiresponse.mdx
+++ b/python/docs/api/class-apiresponse.mdx
@@ -260,6 +260,7 @@ api_response.url
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-apiresponseassertions.mdx b/python/docs/api/class-apiresponseassertions.mdx
index 8c014d5b09..0fbea12f0a 100644
--- a/python/docs/api/class-apiresponseassertions.mdx
+++ b/python/docs/api/class-apiresponseassertions.mdx
@@ -124,6 +124,7 @@ await expect(response).to_be_ok()
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-browser.mdx b/python/docs/api/class-browser.mdx
index 78e84b16d9..649ce654da 100644
--- a/python/docs/api/class-browser.mdx
+++ b/python/docs/api/class-browser.mdx
@@ -900,6 +900,23 @@ browser.version
## Events
+### on("context") {#browser-event-context}
+
+Added in: v1.60browser.on("context")
+
+Emitted when a new browser context is created.
+
+**Usage**
+
+```python
+browser.on("context", handler)
+```
+
+**Event data**
+- [BrowserContext]
+
+---
+
### on("disconnected") {#browser-event-disconnected}
Added before v1.9browser.on("disconnected")
@@ -934,6 +951,7 @@ browser.on("disconnected", handler)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-browsercontext.mdx b/python/docs/api/class-browsercontext.mdx
index f6138ac73f..1ab1bc40dc 100644
--- a/python/docs/api/class-browsercontext.mdx
+++ b/python/docs/api/class-browsercontext.mdx
@@ -1644,6 +1644,74 @@ When no [page.on("dialog")](/api/class-page.mdx#page-event-dialog) or [browser_c
---
+### on("download") {#browser-context-event-download}
+
+Added in: v1.60browserContext.on("download")
+
+Emitted when attachment download started in any page belonging to this context. User can access basic file operations on downloaded content via the passed [Download] instance. See also [page.on("download")](/api/class-page.mdx#page-event-download) to receive events about a specific page.
+
+**Usage**
+
+```python
+browser_context.on("download", handler)
+```
+
+**Event data**
+- [Download]
+
+---
+
+### on("frameattached") {#browser-context-event-frame-attached}
+
+Added in: v1.60browserContext.on("frameattached")
+
+Emitted when a frame is attached in any page belonging to this context. See also [page.on("frameattached")](/api/class-page.mdx#page-event-frame-attached) to receive events about a specific page.
+
+**Usage**
+
+```python
+browser_context.on("frameattached", handler)
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### on("framedetached") {#browser-context-event-frame-detached}
+
+Added in: v1.60browserContext.on("framedetached")
+
+Emitted when a frame is detached in any page belonging to this context. See also [page.on("framedetached")](/api/class-page.mdx#page-event-frame-detached) to receive events about a specific page.
+
+**Usage**
+
+```python
+browser_context.on("framedetached", handler)
+```
+
+**Event data**
+- [Frame]
+
+---
+
+### on("framenavigated") {#browser-context-event-frame-navigated}
+
+Added in: v1.60browserContext.on("framenavigated")
+
+Emitted when a frame is navigated to a new url in any page belonging to this context. See also [page.on("framenavigated")](/api/class-page.mdx#page-event-frame-navigated) to receive events about navigations in a specific page.
+
+**Usage**
+
+```python
+browser_context.on("framenavigated", handler)
+```
+
+**Event data**
+- [Frame]
+
+---
+
### on("page") {#browser-context-event-page}
Added before v1.9browserContext.on("page")
@@ -1698,6 +1766,40 @@ browser_context.on("page", handler)
---
+### on("pageclose") {#browser-context-event-page-close}
+
+Added in: v1.60browserContext.on("pageclose")
+
+Emitted when a page in this context is closed. See also [page.on("close")](/api/class-page.mdx#page-event-close) to receive events about a specific page.
+
+**Usage**
+
+```python
+browser_context.on("pageclose", handler)
+```
+
+**Event data**
+- [Page]
+
+---
+
+### on("pageload") {#browser-context-event-page-load}
+
+Added in: v1.60browserContext.on("pageload")
+
+Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched in any page belonging to this context. See also [page.on("load")](/api/class-page.mdx#page-event-load) to receive events about a specific page.
+
+**Usage**
+
+```python
+browser_context.on("pageload", handler)
+```
+
+**Event data**
+- [Page]
+
+---
+
### on("request") {#browser-context-event-request}
Added in: v1.12browserContext.on("request")
@@ -1877,6 +1979,7 @@ browser_context.background_pages
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-browsertype.mdx b/python/docs/api/class-browsertype.mdx
index d33ff7b7e2..7757d044dd 100644
--- a/python/docs/api/class-browsertype.mdx
+++ b/python/docs/api/class-browsertype.mdx
@@ -170,6 +170,9 @@ page = default_context.pages[0]
- `is_local` [bool] *(optional)* Added in: v1.58#
Tells Playwright that it runs on the same host as the CDP server. It will enable certain optimizations that rely upon the file system being the same between Playwright and the Browser.
+- `no_defaults` [bool] *(optional)* Added in: v1.53#
+
+ When true, Playwright will not send default overrides to the browser on the default context. This includes `Browser.setDownloadBehavior`, `Emulation.setFocusEmulationEnabled`, and `Emulation.setEmulatedMedia`. Useful when attaching to a user's daily-driver browser where these overrides would interfere with existing browser state. New contexts created via [browser.newContext([options])](https://playwright.dev/docs/api/class-browser#browser-new-context) are not affected. Defaults to `false`.
- `slow_mo` [float] *(optional)* Added in: v1.11#
Slows down Playwright operations by the specified amount of milliseconds. Useful so that you can see what is going on. Defaults to 0.
@@ -642,6 +645,7 @@ browser_type.name
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-cdpsession.mdx b/python/docs/api/class-cdpsession.mdx
index 5584e24e16..1177a2b09b 100644
--- a/python/docs/api/class-cdpsession.mdx
+++ b/python/docs/api/class-cdpsession.mdx
@@ -133,6 +133,7 @@ cdp_session.on("close", handler)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-clock.mdx b/python/docs/api/class-clock.mdx
index 67fd7577c7..b437f4b54b 100644
--- a/python/docs/api/class-clock.mdx
+++ b/python/docs/api/class-clock.mdx
@@ -345,6 +345,7 @@ await page.clock.set_system_time("2020-02-02")
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-consolemessage.mdx b/python/docs/api/class-consolemessage.mdx
index d64c417114..ecffc39cab 100644
--- a/python/docs/api/class-consolemessage.mdx
+++ b/python/docs/api/class-consolemessage.mdx
@@ -205,6 +205,7 @@ console_message.worker
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-debugger.mdx b/python/docs/api/class-debugger.mdx
index 3447d8051f..1abc51a28d 100644
--- a/python/docs/api/class-debugger.mdx
+++ b/python/docs/api/class-debugger.mdx
@@ -162,6 +162,7 @@ debugger.on("pausedstatechanged", handler)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-dialog.mdx b/python/docs/api/class-dialog.mdx
index 13c89fa699..f829551f91 100644
--- a/python/docs/api/class-dialog.mdx
+++ b/python/docs/api/class-dialog.mdx
@@ -203,6 +203,7 @@ dialog.type
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-download.mdx b/python/docs/api/class-download.mdx
index 3f7e7dc0f3..bc8e3f5250 100644
--- a/python/docs/api/class-download.mdx
+++ b/python/docs/api/class-download.mdx
@@ -236,6 +236,7 @@ download.url
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-elementhandle.mdx b/python/docs/api/class-elementhandle.mdx
index 9ecae6df52..ccc57899e9 100644
--- a/python/docs/api/class-elementhandle.mdx
+++ b/python/docs/api/class-elementhandle.mdx
@@ -1804,6 +1804,7 @@ This method does not work across navigations, use [page.wait_for_selector()](/ap
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-error.mdx b/python/docs/api/class-error.mdx
index 5197e016c5..0874af577e 100644
--- a/python/docs/api/class-error.mdx
+++ b/python/docs/api/class-error.mdx
@@ -81,6 +81,7 @@ error.stack
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-filechooser.mdx b/python/docs/api/class-filechooser.mdx
index 21a1e304bc..673798c934 100644
--- a/python/docs/api/class-filechooser.mdx
+++ b/python/docs/api/class-filechooser.mdx
@@ -153,6 +153,7 @@ file_chooser.page
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-formdata.mdx b/python/docs/api/class-formdata.mdx
new file mode 100644
index 0000000000..7492d9a058
--- /dev/null
+++ b/python/docs/api/class-formdata.mdx
@@ -0,0 +1,284 @@
+---
+id: class-formdata
+title: "FormData"
+---
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import HTMLCard from '@site/src/components/HTMLCard';
+
+
+The [FormData] is used create form data that is sent via [APIRequestContext].
+
+
+
+
+```py
+form = FormData()
+form.set("firstName", "John")
+form.set("lastName", "Doe")
+form.set("age", 30)
+page.request.post("http://localhost/submit", form=form)
+```
+
+
+
+
+```py
+form = FormData()
+form.set("firstName", "John")
+form.set("lastName", "Doe")
+form.set("age", 30)
+await page.request.post("http://localhost/submit", form=form)
+```
+
+
+
+
+
+---
+
+## Methods
+
+### append {#form-data-append}
+
+Added in: v1.44formData.append
+
+Appends a new value onto an existing key inside a FormData object, or adds the key if it does not already exist. File values can be passed either as `Path` or as `FilePayload`. Multiple fields with the same name can be added.
+
+The difference between [form_data.set()](/api/class-formdata.mdx#form-data-set) and [form_data.append()](/api/class-formdata.mdx#form-data-append) is that if the specified key already exists, [form_data.set()](/api/class-formdata.mdx#form-data-set) will overwrite all existing values with the new one, whereas [form_data.append()](/api/class-formdata.mdx#form-data-append) will append the new value onto the end of the existing set of values.
+
+
+
+
+```py
+form = FormData()
+# Only name and value are set.
+form.append("firstName", "John")
+# Name and value are set, filename and Content-Type are inferred from the file path.
+form.append("attachment", Path("pic.jpg"))
+# Name, value, filename and Content-Type are set.
+form.append("attachment", {
+ "name": "table.csv",
+ "mimeType": "text/csv",
+ "buffer": Path("my-table.csv").read_bytes(),
+})
+page.request.post("http://localhost/submit", multipart=form)
+```
+
+
+
+
+```py
+form = FormData()
+# Only name and value are set.
+form.append("firstName", "John")
+# Name and value are set, filename and Content-Type are inferred from the file path.
+form.append("attachment", Path("pic.jpg"))
+# Name, value, filename and Content-Type are set.
+form.append("attachment", {
+ "name": "table.csv",
+ "mimeType": "text/csv",
+ "buffer": Path("my-table.csv").read_bytes(),
+})
+await page.request.post("http://localhost/submit", multipart=form)
+```
+
+
+
+
+**Usage**
+
+```python
+form_data.append(name, value)
+```
+
+**Arguments**
+- `name` [str]#
+
+ Field name.
+- `value` [str] | [bool] | [int] | [Path] | [Dict]#
+ - `name` [str]
+
+ File name
+ - `mimeType` [str]
+
+ File type
+ - `buffer` [bytes]
+
+ File content
+
+ Field value.
+
+**Returns**
+- [FormData]#
+
+---
+
+### set {#form-data-set}
+
+Added in: v1.18formData.set
+
+Sets a field on the form. File values can be passed either as `Path` or as `FilePayload`.
+
+
+
+
+```py
+form = FormData()
+# Only name and value are set.
+form.set("firstName", "John")
+# Name and value are set, filename and Content-Type are inferred from the file path.
+form.set("profilePicture1", Path("john.jpg"))
+# Name, value, filename and Content-Type are set.
+form.set("profilePicture2", {
+ "name": "john.jpg",
+ "mimeType": "image/jpeg",
+ "buffer": Path("john.jpg").read_bytes(),
+})
+form.set("age", 30)
+page.request.post("http://localhost/submit", multipart=form)
+```
+
+
+
+
+```py
+form = FormData()
+# Only name and value are set.
+form.set("firstName", "John")
+# Name and value are set, filename and Content-Type are inferred from the file path.
+form.set("profilePicture1", Path("john.jpg"))
+# Name, value, filename and Content-Type are set.
+form.set("profilePicture2", {
+ "name": "john.jpg",
+ "mimeType": "image/jpeg",
+ "buffer": Path("john.jpg").read_bytes(),
+})
+form.set("age", 30)
+await page.request.post("http://localhost/submit", multipart=form)
+```
+
+
+
+
+**Usage**
+
+```python
+form_data.set(name, value)
+```
+
+**Arguments**
+- `name` [str]#
+
+ Field name.
+- `value` [str] | [bool] | [int] | [Path] | [Dict]#
+ - `name` [str]
+
+ File name
+ - `mimeType` [str]
+
+ File type
+ - `buffer` [bytes]
+
+ File content
+
+ Field value.
+
+**Returns**
+- [FormData]#
+
+
+[APIRequest]: /api/class-apirequest.mdx "APIRequest"
+[APIRequestContext]: /api/class-apirequestcontext.mdx "APIRequestContext"
+[APIResponse]: /api/class-apiresponse.mdx "APIResponse"
+[APIResponseAssertions]: /api/class-apiresponseassertions.mdx "APIResponseAssertions"
+[Browser]: /api/class-browser.mdx "Browser"
+[BrowserContext]: /api/class-browsercontext.mdx "BrowserContext"
+[BrowserType]: /api/class-browsertype.mdx "BrowserType"
+[CDPSession]: /api/class-cdpsession.mdx "CDPSession"
+[Clock]: /api/class-clock.mdx "Clock"
+[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
+[Dialog]: /api/class-dialog.mdx "Dialog"
+[Download]: /api/class-download.mdx "Download"
+[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
+[Error]: /api/class-error.mdx "Error"
+[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
+[Frame]: /api/class-frame.mdx "Frame"
+[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
+[JSHandle]: /api/class-jshandle.mdx "JSHandle"
+[Keyboard]: /api/class-keyboard.mdx "Keyboard"
+[Locator]: /api/class-locator.mdx "Locator"
+[LocatorAssertions]: /api/class-locatorassertions.mdx "LocatorAssertions"
+[Mouse]: /api/class-mouse.mdx "Mouse"
+[Page]: /api/class-page.mdx "Page"
+[PageAssertions]: /api/class-pageassertions.mdx "PageAssertions"
+[Playwright]: /api/class-playwright.mdx "Playwright"
+[Request]: /api/class-request.mdx "Request"
+[Response]: /api/class-response.mdx "Response"
+[Route]: /api/class-route.mdx "Route"
+[Screencast]: /api/class-screencast.mdx "Screencast"
+[Selectors]: /api/class-selectors.mdx "Selectors"
+[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
+[Touchscreen]: /api/class-touchscreen.mdx "Touchscreen"
+[Tracing]: /api/class-tracing.mdx "Tracing"
+[Video]: /api/class-video.mdx "Video"
+[WebError]: /api/class-weberror.mdx "WebError"
+[WebSocket]: /api/class-websocket.mdx "WebSocket"
+[WebSocketRoute]: /api/class-websocketroute.mdx "WebSocketRoute"
+[Worker]: /api/class-worker.mdx "Worker"
+[Element]: https://developer.mozilla.org/en-US/docs/Web/API/element "Element"
+[EvaluationArgument]: /evaluating.mdx#evaluation-argument "EvaluationArgument"
+[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise"
+[iterator]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols "Iterator"
+[origin]: https://developer.mozilla.org/en-US/docs/Glossary/Origin "Origin"
+[selector]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors "selector"
+[Serializable]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#Description "Serializable"
+[UIEvent.detail]: https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/detail "UIEvent.detail"
+[UnixTime]: https://en.wikipedia.org/wiki/Unix_time "Unix Time"
+[xpath]: https://developer.mozilla.org/en-US/docs/Web/XPath "xpath"
+
+[Any]: https://docs.python.org/3/library/typing.html#typing.Any "Any"
+[bool]: https://docs.python.org/3/library/stdtypes.html "bool"
+[bytes]: https://docs.python.org/3/library/stdtypes.html#bytes "bytes"
+[Callable]: https://docs.python.org/3/library/typing.html#typing.Callable "Callable"
+[EventContextManager]: https://docs.python.org/3/reference/datamodel.html#context-managers "Event context manager"
+[EventEmitter]: https://pyee.readthedocs.io/en/latest/#pyee.BaseEventEmitter "EventEmitter"
+[Exception]: https://docs.python.org/3/library/exceptions.html#Exception "Exception"
+[Dict]: https://docs.python.org/3/library/typing.html#typing.Dict "Dict"
+[float]: https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex "float"
+[int]: https://docs.python.org/3/library/stdtypes.html#numeric-types-int-float-complex "int"
+[List]: https://docs.python.org/3/library/typing.html#typing.List "List"
+[NoneType]: https://docs.python.org/3/library/constants.html#None "None"
+[Pattern]: https://docs.python.org/3/library/re.html "Pattern"
+[URL]: https://en.wikipedia.org/wiki/URL "URL"
+[pathlib.Path]: https://realpython.com/python-pathlib/ "pathlib.Path"
+[str]: https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str "str"
+[Union]: https://docs.python.org/3/library/typing.html#typing.Union "Union"
+[datetime]: https://docs.python.org/3/library/datetime.html#datetime.datetime "datetime"
+
+[all available image tags]: https://mcr.microsoft.com/en-us/product/playwright/python/about "all available image tags"
+[Microsoft Artifact Registry]: https://mcr.microsoft.com/en-us/product/playwright/python/about "Microsoft Artifact Registry"
+[Dockerfile.noble]: https://github.com/microsoft/playwright-python/blob/main/utils/docker/Dockerfile.noble "Dockerfile.noble"
diff --git a/python/docs/api/class-frame.mdx b/python/docs/api/class-frame.mdx
index 86578214b0..729feee6c0 100644
--- a/python/docs/api/class-frame.mdx
+++ b/python/docs/api/class-frame.mdx
@@ -757,6 +757,11 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+- `description` [str] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-frame.mdx#frame-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [bool] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -768,7 +773,7 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
- `exact` [bool] *(optional)* Added in: v1.28#
- Whether [name](/api/class-frame.mdx#frame-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-frame.mdx#frame-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-frame.mdx#frame-get-by-role-option-name) and [description](/api/class-frame.mdx#frame-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [bool] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -3248,6 +3253,7 @@ frame.wait_for_timeout(timeout)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-framelocator.mdx b/python/docs/api/class-framelocator.mdx
index 2c8242b493..6dabfcde52 100644
--- a/python/docs/api/class-framelocator.mdx
+++ b/python/docs/api/class-framelocator.mdx
@@ -327,6 +327,11 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+- `description` [str] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-framelocator.mdx#frame-locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [bool] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -338,7 +343,7 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
- `exact` [bool] *(optional)* Added in: v1.28#
- Whether [name](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-framelocator.mdx#frame-locator-get-by-role-option-name) and [description](/api/class-framelocator.mdx#frame-locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [bool] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -760,6 +765,7 @@ frame_locator.nth(index)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-jshandle.mdx b/python/docs/api/class-jshandle.mdx
index 6dc3127af0..5bfda72843 100644
--- a/python/docs/api/class-jshandle.mdx
+++ b/python/docs/api/class-jshandle.mdx
@@ -269,6 +269,7 @@ js_handle.as_element()
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-keyboard.mdx b/python/docs/api/class-keyboard.mdx
index d8b5531c70..f657bf564b 100644
--- a/python/docs/api/class-keyboard.mdx
+++ b/python/docs/api/class-keyboard.mdx
@@ -378,6 +378,7 @@ keyboard.up(key)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-locator.mdx b/python/docs/api/class-locator.mdx
index c1ab0ab1cb..242435c966 100644
--- a/python/docs/api/class-locator.mdx
+++ b/python/docs/api/class-locator.mdx
@@ -225,6 +225,9 @@ await page.get_by_role("link").aria_snapshot()
**Arguments**
+- `boxes` [bool] *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `depth` [int] *(optional)* Added in: v1.59#
When specified, limits the depth of the snapshot.
@@ -968,6 +971,59 @@ This method drags the locator to another target locator or target position. It w
---
+### drop {#locator-drop}
+
+Added in: v1.60locator.drop
+
+Simulate an external drag-and-drop of files or clipboard-like data onto this locator.
+
+**Usage**
+
+Drop a file buffer onto an upload area:
+
+Drop plain text and a URL together:
+
+**Arguments**
+- `payload` [Dict]#
+ - `files` [Union]\[[str], [pathlib.Path]\] | [List]\[[Union]\[[str], [pathlib.Path]\]\] | [Dict] | [List]\[[Dict]\] *(optional)*
+ - `name` [str]
+
+ File name
+ - `mimeType` [str]
+
+ File type
+ - `buffer` [bytes]
+
+ File content
+
+
+ - `data` [Dict]\[[str], [str]\] *(optional)*
+
+
+ Data to drop onto the target. Provide `files` (file paths or in-memory buffers), `data` (a mime-type → string map for clipboard-like content such as `text/plain`, `text/html`, `text/uri-list`), or both.
+- `position` [Dict] *(optional)*#
+ - `x` [float]
+
+
+ - `y` [float]
+
+
+ A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element.
+- `timeout` [float] *(optional)*#
+
+ Maximum time in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout. The default value can be changed by using the [browser_context.set_default_timeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.set_default_timeout()](/api/class-page.mdx#page-set-default-timeout) methods.
+
+**Returns**
+- [NoneType]#
+
+**Details**
+
+Dispatches the native `dragenter`, `dragover`, and `drop` events at the center of the target element with a synthetic [DataTransfer] carrying the provided files and/or data entries. Works cross-browser by constructing the [DataTransfer] in the page context.
+
+If the target element's `dragover` listener does not call `preventDefault()`, the target is considered to have rejected the drop: Playwright dispatches `dragleave` and this method throws.
+
+---
+
### evaluate {#locator-evaluate}
Added in: v1.14locator.evaluate
@@ -1576,6 +1632,11 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+- `description` [str] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-locator.mdx#locator-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [bool] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1587,7 +1648,7 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
- `exact` [bool] *(optional)* Added in: v1.28#
- Whether [name](/api/class-locator.mdx#locator-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-locator.mdx#locator-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-locator.mdx#locator-get-by-role-option-name) and [description](/api/class-locator.mdx#locator-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [bool] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -3597,6 +3658,7 @@ To press a special key, like `Control` or `ArrowDown`, use [locator.press()](/ap
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-locatorassertions.mdx b/python/docs/api/class-locatorassertions.mdx
index f7f7d5dc36..35245daadf 100644
--- a/python/docs/api/class-locatorassertions.mdx
+++ b/python/docs/api/class-locatorassertions.mdx
@@ -2347,6 +2347,7 @@ await expect(page.locator('body')).to_match_aria_snapshot('''
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-mouse.mdx b/python/docs/api/class-mouse.mdx
index 5192953ccf..95406d371e 100644
--- a/python/docs/api/class-mouse.mdx
+++ b/python/docs/api/class-mouse.mdx
@@ -252,6 +252,7 @@ mouse.wheel(delta_x, delta_y)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-page.mdx b/python/docs/api/class-page.mdx
index 4aa5deb8d6..68c66c3514 100644
--- a/python/docs/api/class-page.mdx
+++ b/python/docs/api/class-page.mdx
@@ -418,6 +418,9 @@ page.aria_snapshot(**kwargs)
```
**Arguments**
+- `boxes` [bool] *(optional)* Added in: v1.60#
+
+ When `true`, appends each element's bounding box as `[box=x,y,width,height]` to the snapshot. Defaults to `false`.
- `depth` [int] *(optional)*#
When specified, limits the depth of the snapshot.
@@ -1868,6 +1871,11 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
An attribute that is usually set by `aria-checked` or native `` controls.
Learn more about [`aria-checked`](https://www.w3.org/TR/wai-aria-1.2/#aria-checked).
+- `description` [str] | [Pattern] *(optional)* Added in: v1.60#
+
+ Option to match the [accessible description](https://w3c.github.io/accname/#dfn-accessible-description). By default, matching is case-insensitive and searches for a substring, use [exact](/api/class-page.mdx#page-get-by-role-option-exact) to control this behavior.
+
+ Learn more about [accessible description](https://w3c.github.io/accname/#dfn-accessible-description).
- `disabled` [bool] *(optional)*#
An attribute that is usually set by `aria-disabled` or `disabled`.
@@ -1879,7 +1887,7 @@ await page.get_by_role("button", name=re.compile("submit", re.IGNORECASE)).click
- `exact` [bool] *(optional)* Added in: v1.28#
- Whether [name](/api/class-page.mdx#page-get-by-role-option-name) is matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when [name](/api/class-page.mdx#page-get-by-role-option-name) is a regular expression. Note that exact match still trims whitespace.
+ Whether [name](/api/class-page.mdx#page-get-by-role-option-name) and [description](/api/class-page.mdx#page-get-by-role-option-description) are matched exactly: case-sensitive and whole-string. Defaults to false. Ignored when the value is a regular expression. Note that exact match still trims whitespace.
- `expanded` [bool] *(optional)*#
An attribute that is usually set by `aria-expanded`.
@@ -6058,6 +6066,7 @@ await page.wait_for_timeout(1000)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-pageassertions.mdx b/python/docs/api/class-pageassertions.mdx
index 67ce6bc9e0..bdc5cf598e 100644
--- a/python/docs/api/class-pageassertions.mdx
+++ b/python/docs/api/class-pageassertions.mdx
@@ -304,6 +304,7 @@ await expect(page).to_match_aria_snapshot('''
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-playwright.mdx b/python/docs/api/class-playwright.mdx
index 5761ac552d..79ae989899 100644
--- a/python/docs/api/class-playwright.mdx
+++ b/python/docs/api/class-playwright.mdx
@@ -266,6 +266,7 @@ playwright.webkit
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-request.mdx b/python/docs/api/class-request.mdx
index 1aad76db01..e9f3105ea4 100644
--- a/python/docs/api/class-request.mdx
+++ b/python/docs/api/class-request.mdx
@@ -537,6 +537,7 @@ request.url
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-response.mdx b/python/docs/api/class-response.mdx
index d1be8688c4..6dbfac165f 100644
--- a/python/docs/api/class-response.mdx
+++ b/python/docs/api/class-response.mdx
@@ -392,6 +392,7 @@ response.url
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-route.mdx b/python/docs/api/class-route.mdx
index 30c0e63b3f..564e1e6568 100644
--- a/python/docs/api/class-route.mdx
+++ b/python/docs/api/class-route.mdx
@@ -502,6 +502,7 @@ route.request
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-screencast.mdx b/python/docs/api/class-screencast.mdx
index aa78fc2eb7..27bc5d7855 100644
--- a/python/docs/api/class-screencast.mdx
+++ b/python/docs/api/class-screencast.mdx
@@ -208,6 +208,7 @@ screencast.stop()
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-selectors.mdx b/python/docs/api/class-selectors.mdx
index 32a5083414..f50bb416f3 100644
--- a/python/docs/api/class-selectors.mdx
+++ b/python/docs/api/class-selectors.mdx
@@ -167,6 +167,7 @@ selectors.set_test_id_attribute(attribute_name)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-timeouterror.mdx b/python/docs/api/class-timeouterror.mdx
index 2c71afa18f..3d26a66d4f 100644
--- a/python/docs/api/class-timeouterror.mdx
+++ b/python/docs/api/class-timeouterror.mdx
@@ -77,6 +77,7 @@ asyncio.run(main())
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-touchscreen.mdx b/python/docs/api/class-touchscreen.mdx
index 6be7302c7c..203de6bc86 100644
--- a/python/docs/api/class-touchscreen.mdx
+++ b/python/docs/api/class-touchscreen.mdx
@@ -61,6 +61,7 @@ touchscreen.tap(x, y)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-tracing.mdx b/python/docs/api/class-tracing.mdx
index 1ce10e42cc..dcc20443ff 100644
--- a/python/docs/api/class-tracing.mdx
+++ b/python/docs/api/class-tracing.mdx
@@ -420,6 +420,7 @@ tracing.stop_har()
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-video.mdx b/python/docs/api/class-video.mdx
index 85f0fc4360..f321b705ec 100644
--- a/python/docs/api/class-video.mdx
+++ b/python/docs/api/class-video.mdx
@@ -109,6 +109,7 @@ video.save_as(path)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-weberror.mdx b/python/docs/api/class-weberror.mdx
index 05e83bc56b..b91be9f22e 100644
--- a/python/docs/api/class-weberror.mdx
+++ b/python/docs/api/class-weberror.mdx
@@ -63,6 +63,30 @@ web_error.error
---
+### location {#web-error-location}
+
+Added in: v1.60webError.location
+
+**Usage**
+
+```python
+web_error.location
+```
+
+**Returns**
+- [Dict]#
+ - `url` [str]
+
+ URL of the resource.
+ - `line` [int]
+
+ 0-based line number in the resource.
+ - `column` [int]
+
+ 0-based column number in the resource.
+
+---
+
### page {#web-error-page}
Added in: v1.38webError.page
@@ -95,6 +119,7 @@ web_error.page
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-websocket.mdx b/python/docs/api/class-websocket.mdx
index 6f6ae8bc51..d485720f5a 100644
--- a/python/docs/api/class-websocket.mdx
+++ b/python/docs/api/class-websocket.mdx
@@ -200,6 +200,7 @@ web_socket.on("socketerror", handler)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-websocketroute.mdx b/python/docs/api/class-websocketroute.mdx
index 7b29e7cb48..16ce94b677 100644
--- a/python/docs/api/class-websocketroute.mdx
+++ b/python/docs/api/class-websocketroute.mdx
@@ -320,6 +320,57 @@ web_socket_route.connect_to_server
---
+### protocols {#web-socket-route-protocols}
+
+Added in: v1.60webSocketRoute.protocols
+
+The list of WebSocket subprotocols requested by the page, as passed via the second argument to the [`WebSocket` constructor](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/WebSocket). Corresponds to the `Sec-WebSocket-Protocol` request header.
+
+Returns an empty array if no protocols were specified.
+
+**Usage**
+
+
+
+
+```py
+def handler(ws: WebSocketRoute):
+ if "chat.v2" in ws.protocols:
+ ws.on_message(lambda message: ws.send(f"v2:{message}"))
+ else:
+ ws.close(code=1002, reason="Unsupported protocol")
+
+page.route_web_socket("wss://example.com/ws", handler)
+```
+
+
+
+
+```py
+async def handler(ws: WebSocketRoute):
+ if "chat.v2" in ws.protocols:
+ ws.on_message(lambda message: ws.send(f"v2:{message}"))
+ else:
+ await ws.close(code=1002, reason="Unsupported protocol")
+
+await page.route_web_socket("wss://example.com/ws", handler)
+```
+
+
+
+
+**Returns**
+- [List]\[[str]\]#
+
+---
+
### url {#web-socket-route-url}
Added in: v1.48webSocketRoute.url
@@ -352,6 +403,7 @@ web_socket_route.url
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/api/class-worker.mdx b/python/docs/api/class-worker.mdx
index e34daf8306..7ecb63f5b6 100644
--- a/python/docs/api/class-worker.mdx
+++ b/python/docs/api/class-worker.mdx
@@ -206,6 +206,7 @@ worker.on("console", handler)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/aria-snapshots.mdx b/python/docs/aria-snapshots.mdx
index b2af5d046a..ccc6c6b823 100644
--- a/python/docs/aria-snapshots.mdx
+++ b/python/docs/aria-snapshots.mdx
@@ -459,6 +459,7 @@ Commonly used ARIA attributes, like `checked`, `disabled`, `expanded`, `level`,
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/auth.mdx b/python/docs/auth.mdx
index 5a5708bc16..cf011468b8 100644
--- a/python/docs/auth.mdx
+++ b/python/docs/auth.mdx
@@ -220,6 +220,7 @@ await context.add_init_script("""(storage => {
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/browser-contexts.mdx b/python/docs/browser-contexts.mdx
index 4c3683e6a8..26fdbde992 100644
--- a/python/docs/browser-contexts.mdx
+++ b/python/docs/browser-contexts.mdx
@@ -133,6 +133,7 @@ asyncio.run(main())
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/browsers.mdx b/python/docs/browsers.mdx
index a21b8e5c98..2bc878d5c8 100644
--- a/python/docs/browsers.mdx
+++ b/python/docs/browsers.mdx
@@ -585,6 +585,7 @@ playwright uninstall --all
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/chrome-extensions.mdx b/python/docs/chrome-extensions.mdx
index 92dbfbbcb1..8338cdb87d 100644
--- a/python/docs/chrome-extensions.mdx
+++ b/python/docs/chrome-extensions.mdx
@@ -217,6 +217,7 @@ def test_popup_page(page: Page, extension_id: str) -> None:
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/ci-intro.mdx b/python/docs/ci-intro.mdx
index b6a7d3e91d..cacec445a1 100644
--- a/python/docs/ci-intro.mdx
+++ b/python/docs/ci-intro.mdx
@@ -116,6 +116,7 @@ Artifacts like trace files or console logs contain information about your test e
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/ci.mdx b/python/docs/ci.mdx
index de16b3d680..da419c80b2 100644
--- a/python/docs/ci.mdx
+++ b/python/docs/ci.mdx
@@ -83,7 +83,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
- image: mcr.microsoft.com/playwright/python:v1.58.0-noble
+ image: mcr.microsoft.com/playwright/python:v1.59.0-noble
options: --user 1001
steps:
- uses: actions/checkout@v5
@@ -173,7 +173,7 @@ trigger:
pool:
vmImage: ubuntu-latest
-container: mcr.microsoft.com/playwright/python:v1.58.0-noble
+container: mcr.microsoft.com/playwright/python:v1.59.0-noble
steps:
- task: UsePythonVersion@0
@@ -197,7 +197,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-noble-development:
docker:
- - image: mcr.microsoft.com/playwright/python:v1.58.0-noble
+ - image: mcr.microsoft.com/playwright/python:v1.59.0-noble
```
Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
@@ -208,7 +208,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](
```groovy
pipeline {
- agent { docker { image 'mcr.microsoft.com/playwright/python:v1.58.0-noble' } }
+ agent { docker { image 'mcr.microsoft.com/playwright/python:v1.59.0-noble' } }
stages {
stage('e2e-tests') {
steps {
@@ -225,7 +225,7 @@ pipeline {
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)).
```yml
-image: mcr.microsoft.com/playwright/python:v1.58.0-noble
+image: mcr.microsoft.com/playwright/python:v1.59.0-noble
```
### GitLab CI
@@ -238,7 +238,7 @@ stages:
tests:
stage: test
- image: mcr.microsoft.com/playwright/python:v1.58.0-noble
+ image: mcr.microsoft.com/playwright/python:v1.59.0-noble
script:
...
```
@@ -284,6 +284,7 @@ xvfb-run pytest
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/clock.mdx b/python/docs/clock.mdx
index b0167b0554..b996bc6e0c 100644
--- a/python/docs/clock.mdx
+++ b/python/docs/clock.mdx
@@ -322,6 +322,7 @@ await expect(locator).to_have_text("2/2/2024, 10:00:02 AM")
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/codegen-intro.mdx b/python/docs/codegen-intro.mdx
index e434d89e8c..41a80b1b6b 100644
--- a/python/docs/codegen-intro.mdx
+++ b/python/docs/codegen-intro.mdx
@@ -79,6 +79,7 @@ You can generate tests using emulation for specific viewports, devices, color sc
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/codegen.mdx b/python/docs/codegen.mdx
index 5e220b600a..24192c67e6 100644
--- a/python/docs/codegen.mdx
+++ b/python/docs/codegen.mdx
@@ -220,6 +220,7 @@ asyncio.run(main())
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/debug.mdx b/python/docs/debug.mdx
index 071838c332..f4d395b074 100644
--- a/python/docs/debug.mdx
+++ b/python/docs/debug.mdx
@@ -337,6 +337,7 @@ await chromium.launch(headless=False, slow_mo=100)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/dialogs.mdx b/python/docs/dialogs.mdx
index b9d7e63aab..cc269a3e7b 100644
--- a/python/docs/dialogs.mdx
+++ b/python/docs/dialogs.mdx
@@ -180,6 +180,7 @@ This will wait for the print dialog to be opened after the button is clicked. Ma
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/docker.mdx b/python/docs/docker.mdx
index 6de1fd1e4a..1ba0a30b4c 100644
--- a/python/docs/docker.mdx
+++ b/python/docs/docker.mdx
@@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image
```bash
-docker pull mcr.microsoft.com/playwright/python:v1.58.0-noble
+docker pull mcr.microsoft.com/playwright/python:v1.59.0-noble
```
### Run the image
@@ -34,7 +34,7 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.
```bash
-docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.58.0-noble /bin/bash
+docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.59.0-noble /bin/bash
```
#### Crawling and scraping
@@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/python:v1.58.0-noble
On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.
```bash
-docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v1.58.0-noble /bin/bash
+docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/python:v1.59.0-noble /bin/bash
```
[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
@@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the
Start the Playwright Server in Docker:
```bash
-docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.58.0-noble /bin/sh -c "npx -y playwright@1.58.0 run-server --port 3000 --host 0.0.0.0"
+docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.59.0-noble /bin/sh -c "npx -y playwright@1.59.0 run-server --port 3000 --host 0.0.0.0"
```
#### Connecting to the Server
@@ -122,7 +122,7 @@ async with async_playwright() as p:
If you need to access local servers from within the Docker container:
```bash
-docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.58.0-noble /bin/sh -c "npx -y playwright@1.58.0 run-server --port 3000 --host 0.0.0.0"
+docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.59.0-noble /bin/sh -c "npx -y playwright@1.59.0 run-server --port 3000 --host 0.0.0.0"
```
This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers.
@@ -155,9 +155,9 @@ Once this is enabled you can open the port specified in a new browser tab and yo
See [all available image tags].
We currently publish images with the following tags:
-- `:v1.58.0` - Playwright v1.58.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
-- `:v1.58.0-noble` - Playwright v1.58.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
-- `:v1.58.0-jammy` - Playwright v1.58.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
+- `:v1.59.0` - Playwright v1.59.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
+- `:v1.59.0-noble` - Playwright v1.59.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
+- `:v1.59.0-jammy` - Playwright v1.59.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
:::note
@@ -181,7 +181,7 @@ To run Playwright inside Docker, you need to have Python, [Playwright browsers](
```Dockerfile
FROM python:3.12-bookworm
-RUN pip install playwright==@1.58.0 && \
+RUN pip install playwright==@1.59.0 && \
playwright install --with-deps
```
@@ -202,6 +202,7 @@ RUN pip install playwright==@1.58.0 && \
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/downloads.mdx b/python/docs/downloads.mdx
index 74cbd45c54..9311fff874 100644
--- a/python/docs/downloads.mdx
+++ b/python/docs/downloads.mdx
@@ -111,6 +111,7 @@ For uploading files, see the [uploading files](./input.mdx#upload-files) section
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/emulation.mdx b/python/docs/emulation.mdx
index fc3bae6ca9..20c325b57c 100644
--- a/python/docs/emulation.mdx
+++ b/python/docs/emulation.mdx
@@ -515,6 +515,7 @@ context = await browser.new_context(
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/evaluating.mdx b/python/docs/evaluating.mdx
index e35940d09f..6efd66e775 100644
--- a/python/docs/evaluating.mdx
+++ b/python/docs/evaluating.mdx
@@ -303,6 +303,7 @@ await page.add_init_script(path="mocks/preload.js")
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/events.mdx b/python/docs/events.mdx
index d190b64e8e..42c97e1206 100644
--- a/python/docs/events.mdx
+++ b/python/docs/events.mdx
@@ -173,6 +173,7 @@ await page.evaluate("prompt('Enter a number:')")
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/extensibility.mdx b/python/docs/extensibility.mdx
index e83c3f4175..6c535d06b2 100644
--- a/python/docs/extensibility.mdx
+++ b/python/docs/extensibility.mdx
@@ -111,6 +111,7 @@ button_count = await page.locator("tag=button").count()
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/frames.mdx b/python/docs/frames.mdx
index 17f2ff59cb..1c46a05555 100644
--- a/python/docs/frames.mdx
+++ b/python/docs/frames.mdx
@@ -100,6 +100,7 @@ await frame.fill('#username-input', 'John')
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/getting-started-cli.mdx b/python/docs/getting-started-cli.mdx
index d6bdb9c458..173690796f 100644
--- a/python/docs/getting-started-cli.mdx
+++ b/python/docs/getting-started-cli.mdx
@@ -166,7 +166,8 @@ playwright-cli tab-close [index] # close a tab
### Network
```bash
-playwright-cli network # list network requests since page load
+playwright-cli requests # list network requests since page load
+playwright-cli request # show full details of a single request
playwright-cli route [opts] # mock network requests
playwright-cli route-list # list active routes
playwright-cli unroute [pattern] # remove routes
@@ -284,7 +285,7 @@ Connect to your existing browser tabs instead of launching a new browser:
playwright-cli attach --extension
```
-This requires the [Playwright MCP Bridge browser extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md) to be installed.
+This requires the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md) to be installed.
## Quick Reference
@@ -323,6 +324,7 @@ This requires the [Playwright MCP Bridge browser extension](https://github.com/m
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/getting-started-mcp.mdx b/python/docs/getting-started-mcp.mdx
index b0042b2cbb..81f383b8d4 100644
--- a/python/docs/getting-started-mcp.mdx
+++ b/python/docs/getting-started-mcp.mdx
@@ -105,7 +105,7 @@ Playwright MCP provides tools for all common browser interactions:
### Running Playwright code
-For complex interactions that go beyond individual tool calls, use the `browser_run_code` tool to execute Playwright scripts directly:
+For complex interactions that go beyond individual tool calls, use the `browser_run_code_unsafe` tool to execute Playwright scripts directly. This tool runs arbitrary JavaScript in the Playwright server process and is RCE-equivalent — only enable it for trusted MCP clients:
```txt
Run this Playwright code to verify the todo count:
@@ -174,7 +174,7 @@ Supported values: `chrome`, `firefox`, `webkit`, `msedge`.
Playwright MCP supports three profile modes:
- **Persistent (default)**: Login state and cookies are preserved between sessions. The profile is stored in `ms-playwright/mcp-{channel}-{workspace-hash}` in your platform's cache directory, so different projects get separate profiles automatically. Override with `--user-data-dir`.
- **Isolated**: Each session starts fresh. Pass `--isolated` to enable. You can load initial state with `--storage-state`.
-- **Browser extension**: Connect to your existing browser tabs with the [Playwright MCP Bridge extension](https://github.com/microsoft/playwright-mcp/blob/main/packages/extension/README.md). Pass `--extension` to enable.
+- **Browser extension**: Connect to your existing browser tabs with the [Playwright Extension](https://github.com/microsoft/playwright/blob/main/packages/extension/README.md). Pass `--extension` to enable.
### Configuration file
@@ -184,7 +184,7 @@ For advanced configuration, use a JSON config file:
npx @playwright/mcp@latest --config path/to/config.json
```
-The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/packages/playwright-mcp/config.d.ts) for the full schema.
+The config file supports browser options, context options, network rules, timeouts, and more. See the [Playwright MCP repository](https://github.com/microsoft/playwright-mcp/blob/main/config.d.ts) for the full schema.
### Standalone server
@@ -242,6 +242,7 @@ Then point your MCP client to the HTTP endpoint:
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/handles.mdx b/python/docs/handles.mdx
index 263e35789c..ff940e4588 100644
--- a/python/docs/handles.mdx
+++ b/python/docs/handles.mdx
@@ -262,6 +262,7 @@ await locator.click()
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/input.mdx b/python/docs/input.mdx
index fe07f8c139..d651ecdd4e 100644
--- a/python/docs/input.mdx
+++ b/python/docs/input.mdx
@@ -700,6 +700,7 @@ await page.get_by_test_id("scrolling-container").evaluate("e => e.scrollTop += 1
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/intro.mdx b/python/docs/intro.mdx
index cf4603cfe0..93c6e8aa13 100644
--- a/python/docs/intro.mdx
+++ b/python/docs/intro.mdx
@@ -125,6 +125,7 @@ pip install pytest-playwright playwright -U
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/languages.mdx b/python/docs/languages.mdx
index 5e4e8576dd..84a2746083 100644
--- a/python/docs/languages.mdx
+++ b/python/docs/languages.mdx
@@ -51,6 +51,7 @@ Playwright for .NET comes with MSTest, NUnit, xUnit, and xUnit v3 [base classes]
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/library.mdx b/python/docs/library.mdx
index 6fa641f8aa..5ee96dbae3 100644
--- a/python/docs/library.mdx
+++ b/python/docs/library.mdx
@@ -216,6 +216,7 @@ Playwright's API is not thread-safe. If you are using Playwright in a multi-thre
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/locators.mdx b/python/docs/locators.mdx
index f0c0127125..b73d9820b5 100644
--- a/python/docs/locators.mdx
+++ b/python/docs/locators.mdx
@@ -1878,6 +1878,7 @@ For less commonly used locators, look at the [other locators](./other-locators.m
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/mock.mdx b/python/docs/mock.mdx
index ad964e97a7..7d53061853 100644
--- a/python/docs/mock.mdx
+++ b/python/docs/mock.mdx
@@ -388,6 +388,7 @@ For more details, see [WebSocketRoute].
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/navigations.mdx b/python/docs/navigations.mdx
index 1487568065..933bec760b 100644
--- a/python/docs/navigations.mdx
+++ b/python/docs/navigations.mdx
@@ -158,6 +158,7 @@ Playwright splits the process of showing a new document in a page into **navigat
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/network.mdx b/python/docs/network.mdx
index 5de3c28184..f4e626087d 100644
--- a/python/docs/network.mdx
+++ b/python/docs/network.mdx
@@ -520,6 +520,7 @@ It might be that you are using a mock tool such as Mock Service Worker (MSW). Wh
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/other-locators.mdx b/python/docs/other-locators.mdx
index 6dd89ff285..c5f49cfeed 100644
--- a/python/docs/other-locators.mdx
+++ b/python/docs/other-locators.mdx
@@ -881,6 +881,7 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/pages.mdx b/python/docs/pages.mdx
index 58e4202f42..382c192d70 100644
--- a/python/docs/pages.mdx
+++ b/python/docs/pages.mdx
@@ -269,6 +269,7 @@ page.on("popup", handle_popup)
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/pom.mdx b/python/docs/pom.mdx
index 2326d68934..71769e6da4 100644
--- a/python/docs/pom.mdx
+++ b/python/docs/pom.mdx
@@ -117,6 +117,7 @@ await search_page.search("search query")
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/release-notes.mdx b/python/docs/release-notes.mdx
index 43e4b59284..505a9fc696 100644
--- a/python/docs/release-notes.mdx
+++ b/python/docs/release-notes.mdx
@@ -2119,6 +2119,7 @@ This version of Playwright was also tested against the following stable channels
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/running-tests.mdx b/python/docs/running-tests.mdx
index 2c9afe2eb7..c4bfb4c733 100644
--- a/python/docs/running-tests.mdx
+++ b/python/docs/running-tests.mdx
@@ -220,6 +220,7 @@ Check out our [debugging guide](./debug.mdx) to learn more about the [Playwright
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/screenshots.mdx b/python/docs/screenshots.mdx
index 25acd57b27..18d21b2e63 100644
--- a/python/docs/screenshots.mdx
+++ b/python/docs/screenshots.mdx
@@ -140,6 +140,7 @@ await page.locator(".header").screenshot(path="screenshot.png")
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/selenium-grid.mdx b/python/docs/selenium-grid.mdx
index 27665f71b6..3cc37ec6de 100644
--- a/python/docs/selenium-grid.mdx
+++ b/python/docs/selenium-grid.mdx
@@ -140,6 +140,7 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/service-workers.mdx b/python/docs/service-workers.mdx
index e301ab73b9..770f1b85cd 100644
--- a/python/docs/service-workers.mdx
+++ b/python/docs/service-workers.mdx
@@ -206,6 +206,7 @@ Requests for updated Service Worker main script code currently cannot be routed
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/test-assertions.mdx b/python/docs/test-assertions.mdx
index c5dc340ca6..c76d5666a9 100644
--- a/python/docs/test-assertions.mdx
+++ b/python/docs/test-assertions.mdx
@@ -100,6 +100,7 @@ def test_foobar(page: Page) -> None:
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/test-runners.mdx b/python/docs/test-runners.mdx
index 39d4cf3cdf..14cd75e882 100644
--- a/python/docs/test-runners.mdx
+++ b/python/docs/test-runners.mdx
@@ -301,6 +301,7 @@ async def test_foo(page: Page):
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/touch-events.mdx b/python/docs/touch-events.mdx
index 922af336d9..9d6916f65c 100644
--- a/python/docs/touch-events.mdx
+++ b/python/docs/touch-events.mdx
@@ -323,6 +323,7 @@ asyncio.run(main())
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/trace-viewer-intro.mdx b/python/docs/trace-viewer-intro.mdx
index b8bae9d375..810f4f977d 100644
--- a/python/docs/trace-viewer-intro.mdx
+++ b/python/docs/trace-viewer-intro.mdx
@@ -113,6 +113,7 @@ To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx).
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/trace-viewer.mdx b/python/docs/trace-viewer.mdx
index 60110823ce..fb9138a6f6 100644
--- a/python/docs/trace-viewer.mdx
+++ b/python/docs/trace-viewer.mdx
@@ -211,6 +211,7 @@ Next to the Actions tab you will find the Metadata tab which will show you more
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/videos.mdx b/python/docs/videos.mdx
index 897133e120..7e072b9a95 100644
--- a/python/docs/videos.mdx
+++ b/python/docs/videos.mdx
@@ -122,6 +122,7 @@ Note that the video is only available after the page or browser context is close
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/webview2.mdx b/python/docs/webview2.mdx
index 62260d1395..9fe3d09759 100644
--- a/python/docs/webview2.mdx
+++ b/python/docs/webview2.mdx
@@ -186,6 +186,7 @@ For debugging tests, see the Playwright [Debugging guide](./debug).
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/python/docs/writing-tests.mdx b/python/docs/writing-tests.mdx
index 3d5311c5f9..830e7cabe6 100644
--- a/python/docs/writing-tests.mdx
+++ b/python/docs/writing-tests.mdx
@@ -184,6 +184,7 @@ def test_main_navigation(page: Page):
[ElementHandle]: /api/class-elementhandle.mdx "ElementHandle"
[Error]: /api/class-error.mdx "Error"
[FileChooser]: /api/class-filechooser.mdx "FileChooser"
+[FormData]: /api/class-formdata.mdx "FormData"
[Frame]: /api/class-frame.mdx "Frame"
[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
[JSHandle]: /api/class-jshandle.mdx "JSHandle"
diff --git a/src/components/GitHubStarButton/index.tsx b/src/components/GitHubStarButton/index.tsx
index aa3ac9645d..ab1755c4bb 100644
--- a/src/components/GitHubStarButton/index.tsx
+++ b/src/components/GitHubStarButton/index.tsx
@@ -6,7 +6,7 @@ type StarButtonProps = {
repo: string
}
-const STARS = '86k+'; // NOTE: this line is generated by src/generate.js. Do not change!
+const STARS = '87k+'; // NOTE: this line is generated by src/generate.js. Do not change!
const StarButton: React.FC = ({owner, repo}) => {
if (!repo)
diff --git a/src/generator.js b/src/generator.js
index 01f374930a..923a449580 100644
--- a/src/generator.js
+++ b/src/generator.js
@@ -75,6 +75,7 @@ class Generator {
this.formatter = formatter;
this.documentation = parseApi(path.join(srcDir, 'api'))
+ .mergeWith(parseApi(path.join(srcDir, 'electron-api'), path.join(srcDir, 'api', 'params.md')))
.mergeWith(parseApi(path.join(srcDir, 'test-api'), path.join(srcDir, 'api', 'params.md')))
.mergeWith(parseApi(path.join(srcDir, 'test-reporter-api')));
this.documentation.filterForLanguage(lang, { csharpOptionOverloadsShortNotation: true });