` inside.
@@ -116,7 +116,7 @@ Comma-separated list of CSS selectors will match all elements that can be select
page.locator("button:has-text(\"Log in\"), button:has-text(\"Sign in\")").click();
```
-The `:is()` pseudo-class is an [experimental CSS pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:is) that may be useful for specifying a list of extra conditions on an element.
+The `:is()` pseudo-class is a [CSS pseudo-class](https://developer.mozilla.org/en-US/docs/Web/CSS/:is) that may be useful for specifying a list of extra conditions on an element.
### CSS: matching elements based on layout
@@ -165,9 +165,19 @@ It is usually possible to distinguish elements by some attribute or text content
Sometimes page contains a number of similar elements, and it is hard to select a particular one. For example:
```html
-
-
-
+
+
+
+
+
+
+
```
In this case, `:nth-match(:text("Buy"), 3)` will select the third button from the snippet above. Note that index is one-based.
@@ -222,85 +232,6 @@ Alternatively, if you cannot find a suitable locator for the parent element, use
Locator parent = page.getByText("Hello").locator("xpath=..");
```
-## React locator
-
-:::note
-
-React locator is experimental and prefixed with `_`. The functionality might change in future.
-:::
-
-React locator allows finding elements by their component name and property values. The syntax is very similar to [CSS attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) and supports all CSS attribute selector operators.
-
-In React locator, component names are transcribed with **CamelCase**.
-
-```java
-page.locator("_react=BookItem").click();
-```
-
-More examples:
-- match by **component**: `_react=BookItem`
-- match by component and **exact property value**, case-sensitive: `_react=BookItem[author = "Steven King"]`
-- match by property value only, **case-insensitive**: `_react=[author = "steven king" i]`
-- match by component and **truthy property value**: `_react=MyButton[enabled]`
-- match by component and **boolean value**: `_react=MyButton[enabled = false]`
-- match by property **value substring**: `_react=[author *= "King"]`
-- match by component and **multiple properties**: `_react=BookItem[author *= "king" i][year = 1990]`
-- match by **nested** property value: `_react=[some.nested.value = 12]`
-- match by component and property value **prefix**: `_react=BookItem[author ^= "Steven"]`
-- match by component and property value **suffix**: `_react=BookItem[author $= "Steven"]`
-- match by component and **key**: `_react=BookItem[key = '2']`
-- match by property value **regex**: `_react=[author = /Steven(\\s+King)?/i]`
-
-To find React element names in a tree use [React DevTools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi).
-
-:::note
-
-React locator supports React 15 and above.
-:::
-
-:::note
-React locator, as well as [React DevTools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi), only work against **unminified** application builds.
-:::
-
-## Vue locator
-
-:::note
-
-Vue locator is experimental and prefixed with `_`. The functionality might change in future.
-:::
-
-Vue locator allows finding elements by their component name and property values. The syntax is very similar to [CSS attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) and supports all CSS attribute selector operators.
-
-In Vue locator, component names are transcribed with **kebab-case**.
-
-```java
-page.locator("_vue=book-item").click();
-```
-
-More examples:
-- match by **component**: `_vue=book-item`
-- match by component and **exact property value**, case-sensitive: `_vue=book-item[author = "Steven King"]`
-- match by property value only, **case-insensitive**: `_vue=[author = "steven king" i]`
-- match by component and **truthy property value**: `_vue=my-button[enabled]`
-- match by component and **boolean value**: `_vue=my-button[enabled = false]`
-- match by property **value substring**: `_vue=[author *= "King"]`
-- match by component and **multiple properties**: `_vue=book-item[author *= "king" i][year = 1990]`
-- match by **nested** property value: `_vue=[some.nested.value = 12]`
-- match by component and property value **prefix**: `_vue=book-item[author ^= "Steven"]`
-- match by component and property value **suffix**: `_vue=book-item[author $= "Steven"]`
-- match by property value **regex**: `_vue=[author = /Steven(\\s+King)?/i]`
-
-To find Vue element names in a tree use [Vue DevTools](https://chrome.google.com/webstore/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd?hl=en).
-
-:::note
-
-Vue locator supports Vue2 and above.
-:::
-
-:::note
-Vue locator, as well as [Vue DevTools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi), only work against **unminified** application builds.
-:::
-
## XPath locator
:::warning
@@ -482,6 +413,7 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel
[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"
@@ -503,6 +435,7 @@ For example, `css=article >> text=Hello` captures the element with the text `Hel
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/pages.mdx b/java/versioned_docs/version-stable/pages.mdx
index 62e190dc35a..0191c9a485f 100644
--- a/java/versioned_docs/version-stable/pages.mdx
+++ b/java/versioned_docs/version-stable/pages.mdx
@@ -101,6 +101,7 @@ page.onPopup(popup -> {
[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"
@@ -122,6 +123,7 @@ page.onPopup(popup -> {
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/pom.mdx b/java/versioned_docs/version-stable/pom.mdx
index 25a69f6b6b8..b621d735dac 100644
--- a/java/versioned_docs/version-stable/pom.mdx
+++ b/java/versioned_docs/version-stable/pom.mdx
@@ -68,6 +68,7 @@ searchPage.search("search query");
[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"
@@ -89,6 +90,7 @@ searchPage.search("search query");
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/release-notes.mdx b/java/versioned_docs/version-stable/release-notes.mdx
index fc48cdb6458..550e017cefa 100644
--- a/java/versioned_docs/version-stable/release-notes.mdx
+++ b/java/versioned_docs/version-stable/release-notes.mdx
@@ -7,6 +7,180 @@ import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
import HTMLCard from '@site/src/components/HTMLCard';
+import LiteYouTube from '@site/src/components/LiteYouTube';
+
+## Version 1.59
+
+### 🎬 Screencast
+
+New [Page.screencast()](/api/class-page.mdx#page-screencast) API provides a unified interface for capturing page content with:
+- Screencast recordings
+- Action annotations
+- Visual overlays
+- Real-time frame capture
+- Agentic video receipts
+
+
+
+
+
+
+
+**Screencast recording** — record video with precise start/stop control, as an alternative to the [setRecordVideoDir](/api/class-browser.mdx#browser-new-context-option-record-video-dir) option:
+
+```java
+page.screencast().start(new Screencast.StartOptions().setPath(Paths.get("video.webm")));
+// ... perform actions ...
+page.screencast().stop();
+```
+
+**Action annotations** — enable built-in visual annotations that highlight interacted elements and display action titles during recording:
+
+```java
+page.screencast().showActions(new Screencast.ShowActionsOptions().setPosition("top-right"));
+```
+
+[Screencast.showActions()](/api/class-screencast.mdx#screencast-show-actions) accepts `position` (`"top-left"`, `"top"`, `"top-right"`, `"bottom-left"`, `"bottom"`, `"bottom-right"`), `duration` (ms per annotation), and `fontSize` (px). Returns a disposable to stop showing actions.
+
+**Visual overlays** — add chapter titles and custom HTML overlays on top of the page for richer narration:
+
+```java
+page.screencast().showChapter("Adding TODOs",
+ new Screencast.ShowChapterOptions()
+ .setDescription("Type and press enter for each TODO")
+ .setDuration(1000));
+
+page.screencast().showOverlay("
Recording
");
+```
+
+**Real-time frame capture** — stream JPEG-encoded frames for custom processing like thumbnails, live previews, AI vision, and more:
+
+```java
+page.screencast().start(new Screencast.StartOptions()
+ .setOnFrame(frame -> sendToVisionModel(frame.data)));
+```
+
+**Agentic video receipts** — coding agents can produce video evidence of their work. After completing a task, an agent can record a walkthrough video with rich annotations for human review:
+
+```java
+page.screencast().start(new Screencast.StartOptions()
+ .setPath(Paths.get("receipt.webm")));
+page.screencast().showActions(new Screencast.ShowActionsOptions().setPosition("top-right"));
+
+page.screencast().showChapter("Verifying checkout flow",
+ new Screencast.ShowChapterOptions()
+ .setDescription("Added coupon code support per ticket #1234"));
+
+// Agent performs the verification steps...
+page.locator("#coupon").fill("SAVE20");
+page.locator("#apply-coupon").click();
+assertThat(page.locator(".discount")).containsText("20%");
+
+page.screencast().showChapter("Done",
+ new Screencast.ShowChapterOptions()
+ .setDescription("Coupon applied, discount reflected in total"));
+
+page.screencast().stop();
+```
+
+The resulting video serves as a receipt: chapter titles provide context, action annotations highlight each interaction, and the visual walkthrough is faster to review than text logs.
+
+### 🔍 Snapshots and Locators
+- Method [Page.ariaSnapshot()](/api/class-page.mdx#page-aria-snapshot) to capture the aria snapshot of the page — equivalent to `page.locator("body").ariaSnapshot()`.
+- Options `depth` and `mode` in [Locator.ariaSnapshot()](/api/class-locator.mdx#locator-aria-snapshot).
+- Method [Locator.normalize()](/api/class-locator.mdx#locator-normalize) converts a locator to follow best practices like test ids and aria roles.
+- Method [Page.pickLocator()](/api/class-page.mdx#page-pick-locator) enters an interactive mode where hovering over elements highlights them and shows the corresponding locator. Click an element to get its [Locator] back. Use [Page.cancelPickLocator()](/api/class-page.mdx#page-cancel-pick-locator) to cancel.
+
+### New APIs
+
+#### Screencast
+- [Page.screencast()](/api/class-page.mdx#page-screencast) provides video recording, real-time frame streaming, and overlay management.
+- Methods [Screencast.start()](/api/class-screencast.mdx#screencast-start) and [Screencast.stop()](/api/class-screencast.mdx#screencast-stop) for recording and frame capture.
+- Methods [Screencast.showActions()](/api/class-screencast.mdx#screencast-show-actions) and [Screencast.hideActions()](/api/class-screencast.mdx#screencast-hide-actions) for action annotations.
+- Methods [Screencast.showChapter()](/api/class-screencast.mdx#screencast-show-chapter) and [Screencast.showOverlay()](/api/class-screencast.mdx#screencast-show-overlay) for visual overlays.
+- Methods [Screencast.showOverlays()](/api/class-screencast.mdx#screencast-show-overlays) and [Screencast.hideOverlays()](/api/class-screencast.mdx#screencast-hide-overlays) for overlay visibility control.
+
+#### Storage, Console and Errors
+- Method [BrowserContext.setStorageState()](/api/class-browsercontext.mdx#browser-context-set-storage-state) clears existing cookies, local storage, and IndexedDB for all origins and sets a new storage state — no need to create a new context.
+- Methods [Page.clearConsoleMessages()](/api/class-page.mdx#page-clear-console-messages) and [Page.clearPageErrors()](/api/class-page.mdx#page-clear-page-errors) to clear stored messages and errors.
+- Option `filter` in [Page.consoleMessages()](/api/class-page.mdx#page-console-messages) and [Page.pageErrors()](/api/class-page.mdx#page-page-errors) controls which messages are returned.
+- Method [ConsoleMessage.timestamp()](/api/class-consolemessage.mdx#console-message-timestamp).
+
+#### Miscellaneous
+- [BrowserContext.debugger()](/api/class-browsercontext.mdx#browser-context-debugger) provides programmatic control over the Playwright debugger.
+- Method [BrowserContext.isClosed()](/api/class-browsercontext.mdx#browser-context-is-closed).
+- Method [Request.existingResponse()](/api/class-request.mdx#request-existing-response) returns the response without waiting.
+- Method [Response.httpVersion()](/api/class-response.mdx#response-http-version) returns the HTTP version used by the response.
+- Option `live` in [Tracing.start()](/api/class-tracing.mdx#tracing-start) for real-time trace updates.
+- Option `artifactsDir` in [BrowserType.launch()](/api/class-browsertype.mdx#browser-type-launch) to configure the artifacts directory.
+
+### 🔗 Interoperability
+
+New [Browser.bind()](/api/class-browser.mdx#browser-bind) API makes a launched browser available for `playwright-cli`, `@playwright/mcp`, and other clients to connect to.
+
+**Bind a browser** — start a browser and bind it so others can connect:
+
+```java
+Browser.BindResult serverInfo = browser.bind("my-session",
+ new Browser.BindOptions().setWorkspaceDir("/my/project"));
+```
+
+**Connect from playwright-cli** — connect to the running browser from your favorite coding agent.
+
+```bash
+playwright-cli attach my-session
+playwright-cli -s my-session snapshot
+```
+
+**Connect from @playwright/mcp** — or point your MCP server to the running browser.
+
+```bash
+@playwright/mcp --endpoint=my-session
+```
+
+**Connect from a Playwright client** — use API to connect to the browser. Multiple clients at a time are supported!
+
+```java
+Browser browser = chromium.connect(serverInfo.endpoint);
+```
+
+Pass `host` and `port` options to bind over WebSocket instead of a named pipe:
+
+```java
+Browser.BindResult serverInfo = browser.bind("my-session",
+ new Browser.BindOptions().setHost("localhost").setPort(0));
+// serverInfo.endpoint is a ws:// URL
+```
+
+Call [Browser.unbind()](/api/class-browser.mdx#browser-unbind) to stop accepting new connections.
+
+### 📊 Observability
+
+Run `playwright-cli show` to open the Dashboard that lists all the bound browsers, their statuses, and allows interacting with them:
+- See what your agent is doing on the background browsers
+- Click into the sessions for manual interventions
+- Open DevTools to inspect pages from the background browsers.
+
+
+
+
+
+
+- `playwright-cli` binds all of its browsers automatically, so you can see what your agents are doing.
+- Pass `PLAYWRIGHT_DASHBOARD=1` env variable to see all `@playwright/test` browsers in the dashboard.
+
+### Breaking Changes ⚠️
+- Removed macOS 14 support for WebKit. We recommend upgrading your macOS version, or keeping an older Playwright version.
+
+### Browser Versions
+- Chromium 147.0.7727.15
+- Mozilla Firefox 148.0.2
+- WebKit 26.4
+
+This version was also tested against the following stable channels:
+- Google Chrome 146
+- Microsoft Edge 146
+
## Version 1.58
### UI Mode and Trace Viewer Improvements
@@ -125,7 +299,9 @@ This version was also tested against the following stable channels:
## Version 1.53
### Trace Viewer and HTML Reporter Updates
-- New Steps in Trace Viewer: 
+- New Steps in Trace Viewer:
+
+

- New method [Locator.describe()](/api/class-locator.mdx#locator-describe) to describe a locator. Used for trace viewer.
```java
@@ -153,7 +329,7 @@ This version was also tested against the following stable channels:
assertThat(page.getByRole(AriaRole.LISTITEM, new Page.GetByRoleOptions().setName("Ship v1.52"))).containsClass("done");
```
-- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and `/url` for links.
+- [Aria Snapshots](./aria-snapshots.mdx) got two new properties: [`/children`](./aria-snapshots.mdx#strict-matching) for strict matching and [`/url`](./aria-snapshots.mdx#links) for links.
```java
assertThat(locator).toMatchAriaSnapshot("""
@@ -359,7 +535,7 @@ The Network tab in the trace viewer has several nice improvements:
- better display of query string parameters
- preview of font assets
-
+

### Miscellaneous
- The `mcr.microsoft.com/playwright/java:v1.47.0` now serves a Playwright image based on Ubuntu 24.04 Noble. To use the 22.02 jammy-based image, please use `mcr.microsoft.com/playwright/java:v1.47.0-jammy` instead.
@@ -708,7 +884,7 @@ This version was also tested against the following stable channels:
### Test Generator Update
-
+

New tools to generate assertions:
- "Assert visibility" tool generates [assertThat(locator).isVisible()](/api/class-locatorassertions.mdx#locator-assertions-to-be-visible).
@@ -760,7 +936,7 @@ This version was also tested against the following stable channels:
### Trace Viewer Updates
-
+

1. Zoom into time range.
1. Network panel redesign.
@@ -1036,7 +1212,7 @@ This version was also tested against the following stable channels:
### Playwright Tools
* **Live Locators in CodeGen.** Generate a locator for any element on the page using "Explore" tool.
-
+

### New APIs
- [Locator.blur()](/api/class-locator.mdx#locator-blur)
@@ -1148,11 +1324,7 @@ This version was also tested against the following stable channels:
## Version 1.24
-
-
-
-
-
+
### 🐂 Debian 11 Bullseye Support
@@ -1401,7 +1573,7 @@ Read more in [our documentation](./test-assertions).
[Tracing](./api/class-tracing.mdx) now can embed Java sources to recorded traces, using new [`setSources`](./api/class-tracing#tracing-start-option-sources) option.
-
+

### New APIs & changes
- [`acceptDownloads`](./api/class-browser#browser-new-context-option-accept-downloads) option now defaults to `true`.
@@ -1421,7 +1593,7 @@ This version was also tested against the following stable channels:
Playwright 1.17 introduces [frame locators](./api/class-framelocator) - a locator to the iframe on the page. Frame locators capture the logic sufficient to retrieve the `iframe` and then locate elements in that iframe. Frame locators are strict by default, will wait for `iframe` to appear and can be used in Web-First assertions.
-
+

Frame locators can be created with either [Page.frameLocator()](/api/class-page.mdx#page-frame-locator) or [Locator.frameLocator()](/api/class-locator.mdx#locator-frame-locator) method.
@@ -1442,13 +1614,13 @@ Playwright Trace Viewer is now **available online** at https://trace.playwright.
- New trace metadata tab with browser details
- Snapshots now have URL bar
-
+

### HTML Report Update
- HTML report now supports dynamic filtering
- Report is now a **single static HTML file** that could be sent by e-mail or as a slack attachment.
-
+

### Ubuntu ARM64 support + more
- Playwright now supports **Ubuntu 20.04 ARM64**. You can now run Playwright tests inside Docker on Apple M1 and on Raspberry Pi.
@@ -1553,7 +1725,7 @@ locator.click();
Learn more in the [documentation](./api/class-locator).
-#### 🧩 Experimental [**React**](./other-locators.mdx#react-locator) and [**Vue**](./other-locators.mdx#vue-locator) selector engines
+#### 🧩 Experimental [**React**](./other-locators.mdx) and [**Vue**](./other-locators.mdx) selector engines
React and Vue selectors allow selecting elements by its component name and/or property values. The syntax is very similar to [attribute selectors](https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors) and supports all attribute selector operators.
@@ -1562,7 +1734,7 @@ page.locator("_react=SubmitButton[enabled=true]").click();
page.locator("_vue=submit-button[enabled=true]").click();
```
-Learn more in the [react selectors documentation](./other-locators.mdx#react-locator) and the [vue selectors documentation](./other-locators.mdx#vue-locator).
+Learn more in the [react selectors documentation](./other-locators.mdx) and the [vue selectors documentation](./other-locators.mdx).
#### ✨ New [**`nth`**](./other-locators.mdx#n-th-element-locator) and [**`visible`**](./other-locators.mdx#css-matching-only-visible-elements) selector engines
- [`nth`](./other-locators.mdx#n-th-element-locator) selector engine is equivalent to the `:nth-match` pseudo class, but could be combined with other selector engines.
@@ -1646,7 +1818,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="sh
That will open the following GUI:
-
+

👉 Read more in [trace viewer documentation](./trace-viewer.mdx).
@@ -1787,6 +1959,7 @@ This version of Playwright was also tested against the following stable channels
[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"
@@ -1808,6 +1981,7 @@ This version of Playwright was also tested against the following stable channels
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/running-tests.mdx b/java/versioned_docs/version-stable/running-tests.mdx
index 51e9aa9e33a..7943a1ed6d5 100644
--- a/java/versioned_docs/version-stable/running-tests.mdx
+++ b/java/versioned_docs/version-stable/running-tests.mdx
@@ -106,6 +106,7 @@ If you prefer, you can run your tests in headed mode by using the `launch(new Br
[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"
@@ -127,6 +128,7 @@ If you prefer, you can run your tests in headed mode by using the `launch(new Br
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/screenshots.mdx b/java/versioned_docs/version-stable/screenshots.mdx
index 90dbb322a90..de8689d6d8f 100644
--- a/java/versioned_docs/version-stable/screenshots.mdx
+++ b/java/versioned_docs/version-stable/screenshots.mdx
@@ -55,6 +55,7 @@ page.locator(".header").screenshot(new Locator.ScreenshotOptions().setPath(Paths
[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"
@@ -76,6 +77,7 @@ page.locator(".header").screenshot(new Locator.ScreenshotOptions().setPath(Paths
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/selenium-grid.mdx b/java/versioned_docs/version-stable/selenium-grid.mdx
index 87a1a1d154e..912069e496a 100644
--- a/java/versioned_docs/version-stable/selenium-grid.mdx
+++ b/java/versioned_docs/version-stable/selenium-grid.mdx
@@ -134,6 +134,7 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh
[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"
@@ -155,6 +156,7 @@ This means that Selenium 3 is supported in a best-effort manner, where Playwrigh
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/test-assertions.mdx b/java/versioned_docs/version-stable/test-assertions.mdx
index 88dc40b867c..c0d1a396015 100644
--- a/java/versioned_docs/version-stable/test-assertions.mdx
+++ b/java/versioned_docs/version-stable/test-assertions.mdx
@@ -50,6 +50,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
[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"
@@ -71,6 +72,7 @@ import HTMLCard from '@site/src/components/HTMLCard';
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/test-runners.mdx b/java/versioned_docs/version-stable/test-runners.mdx
index 6455c98005d..f2c977d728b 100644
--- a/java/versioned_docs/version-stable/test-runners.mdx
+++ b/java/versioned_docs/version-stable/test-runners.mdx
@@ -351,6 +351,7 @@ public class TestExample {
[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"
@@ -372,6 +373,7 @@ public class TestExample {
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/threading.mdx b/java/versioned_docs/version-stable/threading.mdx
index e97e36a486b..370d0cbde3e 100644
--- a/java/versioned_docs/version-stable/threading.mdx
+++ b/java/versioned_docs/version-stable/threading.mdx
@@ -91,6 +91,7 @@ page.waitForTimeout(60_000);
[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"
@@ -112,6 +113,7 @@ page.waitForTimeout(60_000);
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/touch-events.mdx b/java/versioned_docs/version-stable/touch-events.mdx
index 1041b23f9af..0fd1ac56b26 100644
--- a/java/versioned_docs/version-stable/touch-events.mdx
+++ b/java/versioned_docs/version-stable/touch-events.mdx
@@ -161,6 +161,7 @@ public class TouchEvents {
[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"
@@ -182,6 +183,7 @@ public class TouchEvents {
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/trace-viewer-intro.mdx b/java/versioned_docs/version-stable/trace-viewer-intro.mdx
index 1110c26c0a2..84eef3b432c 100644
--- a/java/versioned_docs/version-stable/trace-viewer-intro.mdx
+++ b/java/versioned_docs/version-stable/trace-viewer-intro.mdx
@@ -47,7 +47,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="sh
```
######
-
+

To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx).
@@ -66,6 +66,7 @@ To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx).
[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"
@@ -87,6 +88,7 @@ To learn more check out our detailed guide on [Trace Viewer](/trace-viewer.mdx).
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/trace-viewer.mdx b/java/versioned_docs/version-stable/trace-viewer.mdx
index bcb0b0fb7eb..3494800f112 100644
--- a/java/versioned_docs/version-stable/trace-viewer.mdx
+++ b/java/versioned_docs/version-stable/trace-viewer.mdx
@@ -10,7 +10,7 @@ import LiteYouTube from '@site/src/components/LiteYouTube';
## Introduction
-Playwright Trace Viewer is a GUI tool that helps you explore recorded Playwright traces after the script has run. Traces are a great way for debugging your tests when they fail on CI. You can open traces [locally](#opening-the-trace) or in your browser on [trace.playwright.dev](https://trace.playwright.dev).
+Playwright Trace Viewer is a GUI tool that helps you explore recorded Playwright traces after the script has run. Traces are a great way for debugging your tests when they fail on CI. You can open traces [locally](#opening-trace-viewer) or in your browser on [trace.playwright.dev](https://trace.playwright.dev).
## Opening Trace Viewer
@@ -26,7 +26,7 @@ mvn exec:java -e -D exec.mainClass=com.microsoft.playwright.CLI -D exec.args="sh
Trace Viewer loads the trace entirely in your browser and does not transmit any data externally.
-

+

### Viewing remote traces
@@ -72,7 +72,7 @@ This will record the trace and place it into the file named `trace.zip`.
In the Actions tab you can see what locator was used for every action and how long each one took to run. Hover over each action of your test and visually see the change in the DOM snapshot. Go back and forward in time and click an action to inspect and debug. Use the Before and After tabs to visually see what happened before and after the action.
-
+

**Selecting each action reveals:**
- Action snapshots
@@ -85,7 +85,7 @@ When tracing with the [setScreenshots](/api/class-tracing.mdx#tracing-start-opti
Double click on an action to see the time range for that action. You can use the slider in the timeline to increase the actions selected and these will be shown in the Actions tab and all console logs and network logs will be filtered to only show the logs for the actions selected.
-
+

### Snapshots
@@ -99,7 +99,7 @@ When tracing with the [setSnapshots](/api/class-tracing.mdx#tracing-start-option
Here is what the typical Action snapshot looks like:
-
+

Notice how it highlights both, the DOM Node as well as the exact click position.
@@ -107,31 +107,31 @@ Notice how it highlights both, the DOM Node as well as the exact click position.
When you click on an action in the sidebar, the line of code for that action is highlighted in the source panel.
-
+

### Call
The call tab shows you information about the action such as the time it took, what locator was used, if in strict mode and what key was used.
-
+

### Log
See a full log of your test to better understand what Playwright is doing behind the scenes such as scrolling into view, waiting for element to be visible, enabled and stable and performing actions such as click, fill, press etc.
-
+

### Errors
If your test fails you will see the error messages for each test in the Errors tab. The timeline will also show a red line highlighting where the error occurred. You can also click on the source tab to see on which line of the source code the error is.
-
+

### Console
See console logs from the browser as well as from your test. Different icons are displayed to show you if the console log came from the browser or from the test file.
-
+

Double click on an action from your test in the actions sidebar. This will filter the console to only show the logs that were made during that action. Click the *Show all* button to see all console logs again.
@@ -141,7 +141,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an
The Network tab shows you all the network requests that were made during your test. You can sort by different types of requests, status code, method, request, content type, duration and size. Click on a request to see more information about it such as the request headers, response headers, request body and response body.
-
+

Double click on an action from your test in the actions sidebar. This will filter the network requests to only show the requests that were made during that action. Click the *Show all* button to see all network requests again.
@@ -151,7 +151,7 @@ Use the timeline to filter actions, by clicking a start point and dragging to an
Next to the Actions tab you will find the Metadata tab which will show you more information on your test such as the Browser, viewport size, test duration and more.
-
+

[APIRequest]: /api/class-apirequest.mdx "APIRequest"
@@ -164,6 +164,7 @@ Next to the Actions tab you will find the Metadata tab which will show you more
[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"
@@ -185,6 +186,7 @@ Next to the Actions tab you will find the Metadata tab which will show you more
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/videos.mdx b/java/versioned_docs/version-stable/videos.mdx
index 53b66491503..c1ef143a57e 100644
--- a/java/versioned_docs/version-stable/videos.mdx
+++ b/java/versioned_docs/version-stable/videos.mdx
@@ -49,6 +49,7 @@ Note that the video is only available after the page or browser context is close
[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"
@@ -70,6 +71,7 @@ Note that the video is only available after the page or browser context is close
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/webview2.mdx b/java/versioned_docs/version-stable/webview2.mdx
index 394d4f055ff..30cdec7533a 100644
--- a/java/versioned_docs/version-stable/webview2.mdx
+++ b/java/versioned_docs/version-stable/webview2.mdx
@@ -187,6 +187,7 @@ For debugging tests, see the Playwright [Debugging guide](./debug).
[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"
@@ -208,6 +209,7 @@ For debugging tests, see the Playwright [Debugging guide](./debug).
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_docs/version-stable/writing-tests.mdx b/java/versioned_docs/version-stable/writing-tests.mdx
index 95018cbf098..6f1cd4308c5 100644
--- a/java/versioned_docs/version-stable/writing-tests.mdx
+++ b/java/versioned_docs/version-stable/writing-tests.mdx
@@ -106,6 +106,7 @@ Page page = context.newPage();
[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"
@@ -127,6 +128,7 @@ Page page = context.newPage();
[RequestOptions]: /api/class-requestoptions.mdx "RequestOptions"
[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"
diff --git a/java/versioned_sidebars/version-stable-sidebars.json b/java/versioned_sidebars/version-stable-sidebars.json
index 635b9a951ac..5b3dc3ef763 100644
--- a/java/versioned_sidebars/version-stable-sidebars.json
+++ b/java/versioned_sidebars/version-stable-sidebars.json
@@ -255,6 +255,10 @@
"type": "doc",
"id": "api/class-consolemessage"
},
+ {
+ "type": "doc",
+ "id": "api/class-debugger"
+ },
{
"type": "doc",
"id": "api/class-dialog"
@@ -323,6 +327,10 @@
"type": "doc",
"id": "api/class-route"
},
+ {
+ "type": "doc",
+ "id": "api/class-screencast"
+ },
{
"type": "doc",
"id": "api/class-selectors"
diff --git a/nodejs/versioned_docs/images/release-notes-1.59-dashboard.png b/nodejs/versioned_docs/images/release-notes-1.59-dashboard.png
new file mode 100644
index 00000000000..b951a63c4ef
Binary files /dev/null and b/nodejs/versioned_docs/images/release-notes-1.59-dashboard.png differ
diff --git a/nodejs/versioned_docs/images/release-notes-1.59-screencast-demo.gif b/nodejs/versioned_docs/images/release-notes-1.59-screencast-demo.gif
new file mode 100644
index 00000000000..90b2e029f5b
Binary files /dev/null and b/nodejs/versioned_docs/images/release-notes-1.59-screencast-demo.gif differ
diff --git a/nodejs/versioned_docs/version-stable/accessibility-testing.mdx b/nodejs/versioned_docs/version-stable/accessibility-testing.mdx
index 9b8f0b6fb05..b3dbee51046 100644
--- a/nodejs/versioned_docs/version-stable/accessibility-testing.mdx
+++ b/nodejs/versioned_docs/version-stable/accessibility-testing.mdx
@@ -350,7 +350,9 @@ test('example using custom fixture', async ({ page, makeAxeBuilder }) => {
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -372,6 +374,7 @@ test('example using custom fixture', async ({ page, makeAxeBuilder }) => {
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/actionability.mdx b/nodejs/versioned_docs/version-stable/actionability.mdx
index e72c40edaac..aa5e7b4ca7d 100644
--- a/nodejs/versioned_docs/version-stable/actionability.mdx
+++ b/nodejs/versioned_docs/version-stable/actionability.mdx
@@ -140,7 +140,9 @@ For example, consider a scenario where Playwright will click `Sign Up` button re
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -162,6 +164,7 @@ For example, consider a scenario where Playwright will click `Sign Up` button re
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api-testing.mdx b/nodejs/versioned_docs/version-stable/api-testing.mdx
index 5072e812205..d49a7170cd2 100644
--- a/nodejs/versioned_docs/version-stable/api-testing.mdx
+++ b/nodejs/versioned_docs/version-stable/api-testing.mdx
@@ -391,7 +391,9 @@ test('global context request has isolated cookie storage', async ({
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -413,6 +415,7 @@ test('global context request has isolated cookie storage', async ({
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-android.mdx b/nodejs/versioned_docs/version-stable/api/class-android.mdx
index 5df34f8dd16..9c8043213dc 100644
--- a/nodejs/versioned_docs/version-stable/api/class-android.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-android.mdx
@@ -93,12 +93,12 @@ This methods attaches Playwright to an existing Android device. Use [android.lau
**Usage**
```js
-await android.connect(wsEndpoint);
-await android.connect(wsEndpoint, options);
+await android.connect(endpoint);
+await android.connect(endpoint, options);
```
**Arguments**
-- `wsEndpoint` [string]
#
+- `endpoint` [string]
#
A browser websocket endpoint to connect to.
- `options` [Object] *(optional)*
@@ -261,7 +261,9 @@ android.setDefaultTimeout(timeout);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -283,6 +285,7 @@ android.setDefaultTimeout(timeout);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-androiddevice.mdx b/nodejs/versioned_docs/version-stable/api/class-androiddevice.mdx
index a6ba2d859bb..00fc63052c0 100644
--- a/nodejs/versioned_docs/version-stable/api/class-androiddevice.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-androiddevice.mdx
@@ -322,9 +322,9 @@ await androidDevice.launchBrowser(options);
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)*
#
- - `dir` [string]
+ - `dir` [string] *(optional)*
- Path to the directory to put videos into.
+ 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]
@@ -334,6 +334,18 @@ await androidDevice.launchBrowser(options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
+ - `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.
- `reducedMotion` [null] | "reduce" | "no-preference" *(optional)*
#
@@ -957,7 +969,9 @@ androidDevice.on('webview', data => {});
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -979,6 +993,7 @@ androidDevice.on('webview', data => {});
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-androidinput.mdx b/nodejs/versioned_docs/version-stable/api/class-androidinput.mdx
index 5b8d3393a6d..681ccf6187e 100644
--- a/nodejs/versioned_docs/version-stable/api/class-androidinput.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-androidinput.mdx
@@ -175,7 +175,9 @@ await androidInput.type(text);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -197,6 +199,7 @@ await androidInput.type(text);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-androidsocket.mdx b/nodejs/versioned_docs/version-stable/api/class-androidsocket.mdx
index 0e32f9feb6b..56374bd8e6d 100644
--- a/nodejs/versioned_docs/version-stable/api/class-androidsocket.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-androidsocket.mdx
@@ -102,7 +102,9 @@ androidSocket.on('data', data => {});
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -124,6 +126,7 @@ androidSocket.on('data', data => {});
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-androidwebview.mdx b/nodejs/versioned_docs/version-stable/api/class-androidwebview.mdx
index ac1cc740376..9d6f7d14824 100644
--- a/nodejs/versioned_docs/version-stable/api/class-androidwebview.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-androidwebview.mdx
@@ -97,7 +97,9 @@ androidWebView.on('close', data => {});
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -119,6 +121,7 @@ androidWebView.on('close', data => {});
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-apirequest.mdx b/nodejs/versioned_docs/version-stable/api/class-apirequest.mdx
index 96b1c5220c0..f874d845e97 100644
--- a/nodejs/versioned_docs/version-stable/api/class-apirequest.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-apirequest.mdx
@@ -185,7 +185,9 @@ await apiRequest.newContext(options);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -207,6 +209,7 @@ await apiRequest.newContext(options);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-apirequestcontext.mdx b/nodejs/versioned_docs/version-stable/api/class-apirequestcontext.mdx
index 2bfdad0740d..6a0b78185f6 100644
--- a/nodejs/versioned_docs/version-stable/api/class-apirequestcontext.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-apirequestcontext.mdx
@@ -642,7 +642,9 @@ await apiRequestContext.storageState(options);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -664,6 +666,7 @@ await apiRequestContext.storageState(options);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-apiresponse.mdx b/nodejs/versioned_docs/version-stable/api/class-apiresponse.mdx
index 0ac972bb669..177ac3b2b50 100644
--- a/nodejs/versioned_docs/version-stable/api/class-apiresponse.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-apiresponse.mdx
@@ -208,7 +208,9 @@ apiResponse.url();
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -230,6 +232,7 @@ apiResponse.url();
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-apiresponseassertions.mdx b/nodejs/versioned_docs/version-stable/api/class-apiresponseassertions.mdx
index 1050a54e6b6..bebc63bdbb9 100644
--- a/nodejs/versioned_docs/version-stable/api/class-apiresponseassertions.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-apiresponseassertions.mdx
@@ -47,16 +47,14 @@ await expect(response).toBeOK();
Added in: v1.20apiResponseAssertions.not
-Makes the assertion check for the opposite condition. For example, this code tests that the response status is not successful:
-
-```js
-await expect(response).not.toBeOK();
-```
+Makes the assertion check for the opposite condition.
**Usage**
+For example, this code tests that the response status is not successful:
+
```js
-expect(response).not
+await expect(response).not.toBeOK();
```
**Type**
@@ -80,7 +78,9 @@ expect(response).not
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -102,6 +102,7 @@ expect(response).not
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-browser.mdx b/nodejs/versioned_docs/version-stable/api/class-browser.mdx
index e3208aad8de..9e35ed9804d 100644
--- a/nodejs/versioned_docs/version-stable/api/class-browser.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-browser.mdx
@@ -25,6 +25,44 @@ const { firefox } = require('playwright'); // Or 'chromium' or 'webkit'.
## Methods
+### bind {#browser-bind}
+
+
Added in: v1.59browser.bind
+
+Binds the browser to a named pipe or web socket, making it available for other clients to connect to.
+
+**Usage**
+
+```js
+await browser.bind(title);
+await browser.bind(title, options);
+```
+
+**Arguments**
+- `title` [string]
#
+
+ Title of the browser server, used for identification.
+- `options` [Object] *(optional)*
+ - `host` [string] *(optional)*
#
+
+ Host to bind the web socket server to. When specified, a web socket server is created instead of a named pipe.
+ - `metadata` [Object]<[string], [Object]> *(optional)*
#
+
+ Additional metadata to associate with the browser server.
+ - `port` [number] *(optional)*
#
+
+ Port to bind the web socket server to. When specified, a web socket server is created instead of a named pipe. Use `0` to let the OS pick an available port.
+ - `workspaceDir` [string] *(optional)*
#
+
+ Working directory associated with this browser server.
+
+**Returns**
+- [Promise]<[Object]>
#
+ - `endpoint` [string]
+
+
+---
+
### browserType {#browser-browser-type}
Added in: v1.23browser.browserType
@@ -319,9 +357,9 @@ If directly using this method to create [BrowserContext]s, it is best practice t
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)*
#
- - `dir` [string]
+ - `dir` [string] *(optional)*
- Path to the directory to put videos into.
+ 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]
@@ -331,6 +369,18 @@ If directly using this method to create [BrowserContext]s, it is best practice t
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
+ - `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.
- `reducedMotion` [null] | "reduce" | "no-preference" *(optional)*
#
@@ -613,9 +663,9 @@ await browser.newPage(options);
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)*
#
- - `dir` [string]
+ - `dir` [string] *(optional)*
- Path to the directory to put videos into.
+ 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]
@@ -625,6 +675,18 @@ await browser.newPage(options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
+ - `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.
- `reducedMotion` [null] | "reduce" | "no-preference" *(optional)*
#
@@ -825,6 +887,23 @@ await browser.stopTracing();
---
+### unbind {#browser-unbind}
+
+
Added in: v1.59browser.unbind
+
+Unbinds the browser server previously bound with [browser.bind()](/api/class-browser.mdx#browser-bind).
+
+**Usage**
+
+```js
+await browser.unbind();
+```
+
+**Returns**
+- [Promise]<[void]>
#
+
+---
+
### version {#browser-version}
Added before v1.9browser.version
@@ -879,7 +958,9 @@ browser.on('disconnected', data => {});
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -901,6 +982,7 @@ browser.on('disconnected', data => {});
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-browsercontext.mdx b/nodejs/versioned_docs/version-stable/api/class-browsercontext.mdx
index f168b63a539..3a226f0e955 100644
--- a/nodejs/versioned_docs/version-stable/api/class-browsercontext.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-browsercontext.mdx
@@ -123,7 +123,7 @@ The order of evaluation of multiple scripts installed via [browserContext.addIni
Optional argument to pass to [script](/api/class-browsercontext.mdx#browser-context-add-init-script-option-script) (only supported when passing a function).
**Returns**
-- [Promise]<[void]>
#
+- [Promise]<[Disposable]>
#
---
@@ -329,7 +329,7 @@ const { webkit } = require('playwright'); // Or 'chromium' or 'firefox'.
Whether to pass the argument as a handle, instead of passing by value. When passing a handle, only one argument is supported. When passing by value, multiple arguments are supported.
**Returns**
-- [Promise]<[void]>
#
+- [Promise]<[Disposable]>
#
---
@@ -380,7 +380,7 @@ const crypto = require('crypto');
Callback function that will be called in the Playwright's context.
**Returns**
-- [Promise]<[void]>
#
+- [Promise]<[Disposable]>
#
---
@@ -425,6 +425,7 @@ await browserContext.grantPermissions(permissions, options);
* `'notifications'`
* `'payment-handler'`
* `'storage-access'`
+ * `'screen-wake-lock'`
- `options` [Object] *(optional)*
- `origin` [string] *(optional)*
#
@@ -435,6 +436,23 @@ await browserContext.grantPermissions(permissions, options);
---
+### isClosed {#browser-context-is-closed}
+
+
Added in: v1.59browserContext.isClosed
+
+Indicates that the browser context is in the process of closing or has already been closed.
+
+**Usage**
+
+```js
+browserContext.isClosed();
+```
+
+**Returns**
+- [boolean]
#
+
+---
+
### newCDPSession {#browser-context-new-cdp-session}
Added in: v1.11browserContext.newCDPSession
@@ -578,9 +596,9 @@ Enabling routing disables http cache.
:::
**Arguments**
-- `url` [string] | [RegExp] | [function]\([URL]\):[boolean]
#
+- `url` [string] | [RegExp] | [URLPattern] | [function]\([URL]\):[boolean]
#
- A glob pattern, regex pattern, or predicate that receives a [URL] to match during routing. If [baseURL](/api/class-browser.mdx#browser-new-context-option-base-url) is set in the context options and the provided URL is a string that does not start with `*`, it is resolved using the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
+ A glob pattern, regex pattern, URL pattern, or predicate that receives a [URL] to match during routing. If [baseURL](/api/class-browser.mdx#browser-new-context-option-base-url) is set in the context options and the provided URL is a string that does not start with `*`, it is resolved using the [`new URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor.
- `handler` [function]\([Route], [Request]\):[Promise]<[Object]> | [Object]
#
handler function to route the request.
@@ -590,7 +608,7 @@ Enabling routing disables http cache.
How often a route should be used. By default it will be used every time.
**Returns**
-- [Promise]<[void]>
#
+- [Promise]<[Disposable]>
#
---
@@ -829,6 +847,71 @@ await browserContext.setOffline(offline);
---
+### setStorageState {#browser-context-set-storage-state}
+
+
Added in: v1.59browserContext.setStorageState
+
+Clears the existing cookies, local storage and IndexedDB entries for all origins and sets the new storage state.
+
+**Usage**
+
+```js
+// Load storage state from a file and apply it to the context.
+await context.setStorageState('state.json');
+```
+
+**Arguments**
+- `storageState` [string] | [Object]
#
+ - `cookies` [Array]<[Object]>
+ - `name` [string]
+
+
+ - `value` [string]
+
+
+ - `domain` [string]
+
+ Domain and path are required. For the cookie to apply to all subdomains as well, prefix domain with a dot, like this: ".example.com"
+ - `path` [string]
+
+ Domain and path are required
+ - `expires` [number]
+
+ Unix time in seconds.
+ - `httpOnly` [boolean]
+
+
+ - `secure` [boolean]
+
+
+ - `sameSite` "Strict" | "Lax" | "None"
+
+ sameSite flag
+
+ Cookies to set for context
+ - `origins` [Array]<[Object]>
+ - `origin` [string]
+
+
+ - `localStorage` [Array]<[Object]>
+ - `name` [string]
+
+
+ - `value` [string]
+
+
+ localStorage to set for context
+
+
+ Learn more about [storage state and auth](../auth.mdx).
+
+ Populates context with given storage state. This option can be used to initialize context with logged-in information obtained via [browserContext.storageState()](/api/class-browsercontext.mdx#browser-context-storage-state).
+
+**Returns**
+- [Promise]<[void]>
#
+
+---
+
### storageState {#browser-context-storage-state}
Added before v1.9browserContext.storageState
@@ -908,9 +991,9 @@ await browserContext.unroute(url, handler);
```
**Arguments**
-- `url` [string] | [RegExp] | [function]\([URL]\):[boolean]
#
+- `url` [string] | [RegExp] | [URLPattern] | [function]\([URL]\):[boolean]
#
- A glob pattern, regex pattern or predicate receiving [URL] used to register a routing with [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route).
+ A glob pattern, regex pattern, URL pattern, or predicate receiving [URL] used to register a routing with [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route).
- `handler` [function]\([Route], [Request]\):[Promise]<[Object]> | [Object] *(optional)*
#
Optional handler function used to register a routing with [browserContext.route()](/api/class-browsercontext.mdx#browser-context-route).
@@ -1003,6 +1086,23 @@ browserContext.clock
---
+### debugger {#browser-context-debugger}
+
+
Added in: v1.59browserContext.debugger
+
+Debugger allows to pause and resume the execution.
+
+**Usage**
+
+```js
+browserContext.debugger
+```
+
+**Type**
+- [Debugger]
+
+---
+
### request {#browser-context-request}
Added in: v1.16browserContext.request
@@ -1345,7 +1445,9 @@ await browserContext.setHTTPCredentials(httpCredentials);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -1367,6 +1469,7 @@ await browserContext.setHTTPCredentials(httpCredentials);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-browserserver.mdx b/nodejs/versioned_docs/version-stable/api/class-browserserver.mdx
index f636d8ba612..a015b13e4ca 100644
--- a/nodejs/versioned_docs/version-stable/api/class-browserserver.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-browserserver.mdx
@@ -116,7 +116,9 @@ browserServer.on('close', data => {});
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -138,6 +140,7 @@ browserServer.on('close', data => {});
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-browsertype.mdx b/nodejs/versioned_docs/version-stable/api/class-browsertype.mdx
index 5258a0f8438..4dca4f39384 100644
--- a/nodejs/versioned_docs/version-stable/api/class-browsertype.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-browsertype.mdx
@@ -40,12 +40,12 @@ The major and minor version of the Playwright instance that connects needs to ma
**Usage**
```js
-await browserType.connect(wsEndpoint);
-await browserType.connect(wsEndpoint, options);
+await browserType.connect(endpoint);
+await browserType.connect(endpoint, options);
```
**Arguments**
-- `wsEndpoint` [string]
Added in: v1.10#
+- `endpoint` [string]
Added in: v1.10#
A Playwright browser websocket endpoint to connect to. You obtain this endpoint via `BrowserServer.wsEndpoint`.
- `options` [Object] *(optional)*
@@ -196,6 +196,9 @@ const browser = await chromium.launch({ // Or 'firefox' or 'webkit'.
:::
Additional arguments to pass to the browser instance. The list of Chromium flags can be found [here](https://peter.sh/experiments/chromium-command-line-switches/).
+ - `artifactsDir` [string] *(optional)*
#
+
+ 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.
- `channel` [string] *(optional)*
#
Browser distribution channel.
@@ -312,6 +315,9 @@ await browserType.launchPersistentContext(userDataDir, options);
:::
Additional arguments to pass to the browser instance. The list of Chromium flags can be found [here](https://peter.sh/experiments/chromium-command-line-switches/).
+ - `artifactsDir` [string] *(optional)*
#
+
+ 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.
- `baseURL` [string] *(optional)*
#
When using [page.goto()](/api/class-page.mdx#page-goto), [page.route()](/api/class-page.mdx#page-route), [page.waitForURL()](/api/class-page.mdx#page-wait-for-url), [page.waitForRequest()](/api/class-page.mdx#page-wait-for-request), or [page.waitForResponse()](/api/class-page.mdx#page-wait-for-response) it takes the base URL in consideration by using the [`URL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/URL) constructor for building the corresponding URL. Unset by default. Examples:
@@ -500,9 +506,9 @@ await browserType.launchPersistentContext(userDataDir, options);
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)*
#
- - `dir` [string]
+ - `dir` [string] *(optional)*
- Path to the directory to put videos into.
+ 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]
@@ -512,6 +518,18 @@ await browserType.launchPersistentContext(userDataDir, options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
+ - `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.
- `reducedMotion` [null] | "reduce" | "no-preference" *(optional)*
#
@@ -620,6 +638,9 @@ const { chromium } = require('playwright'); // Or 'webkit' or 'firefox'.
:::
Additional arguments to pass to the browser instance. The list of Chromium flags can be found [here](https://peter.sh/experiments/chromium-command-line-switches/).
+ - `artifactsDir` [string] *(optional)*
#
+
+ 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.
- `channel` [string] *(optional)*
#
Browser distribution channel.
@@ -739,7 +760,9 @@ browserType.name();
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -761,6 +784,7 @@ browserType.name();
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-cdpsession.mdx b/nodejs/versioned_docs/version-stable/api/class-cdpsession.mdx
index 16a2f04d116..97eb8610cb1 100644
--- a/nodejs/versioned_docs/version-stable/api/class-cdpsession.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-cdpsession.mdx
@@ -70,6 +70,50 @@ await cdpSession.send(method, params);
**Returns**
- [Promise]<[Object]>
#
+---
+
+## Events
+
+### on('close') {#cdp-session-event-close}
+
+
Added in: v1.59cdpSession.on('close')
+
+Emitted when the session is closed, either because the target was closed or `session.detach()` was called.
+
+**Usage**
+
+```js
+cdpSession.on('close', data => {});
+```
+
+**Event data**
+- [CDPSession]
+
+---
+
+### on('event') {#cdp-session-event-event}
+
+
Added in: v1.59cdpSession.on('event')
+
+Emitted for every CDP event received from the session. Allows subscribing to all CDP events at once without knowing their names ahead of time.
+
+**Usage**
+
+```js
+session.on('event', ({ name, params }) => {
+ console.log(`CDP event: ${name}`, params);
+});
+```
+
+**Event data**
+- [Object]
+ - `method` [string]
+
+ CDP event name.
+ - `params` [Object] *(optional)*
+
+ CDP event parameters.
+
[Android]: /api/class-android.mdx "Android"
[AndroidDevice]: /api/class-androiddevice.mdx "AndroidDevice"
@@ -88,7 +132,9 @@ await cdpSession.send(method, params);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -110,6 +156,7 @@ await cdpSession.send(method, params);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-clock.mdx b/nodejs/versioned_docs/version-stable/api/class-clock.mdx
index fc9247a6022..5726baa1640 100644
--- a/nodejs/versioned_docs/version-stable/api/class-clock.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-clock.mdx
@@ -216,7 +216,9 @@ await page.clock.setSystemTime('2020-02-02');
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -238,6 +240,7 @@ await page.clock.setSystemTime('2020-02-02');
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-consolemessage.mdx b/nodejs/versioned_docs/version-stable/api/class-consolemessage.mdx
index ce10419b8cb..b92106e53bd 100644
--- a/nodejs/versioned_docs/version-stable/api/class-consolemessage.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-consolemessage.mdx
@@ -111,6 +111,23 @@ consoleMessage.text();
---
+### timestamp {#console-message-timestamp}
+
+
Added in: v1.59consoleMessage.timestamp
+
+The timestamp of the console message in milliseconds since the Unix epoch.
+
+**Usage**
+
+```js
+consoleMessage.timestamp();
+```
+
+**Returns**
+- [number]
#
+
+---
+
### type {#console-message-type}
Added before v1.9consoleMessage.type
@@ -159,7 +176,9 @@ consoleMessage.worker();
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -181,6 +200,7 @@ consoleMessage.worker();
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-coverage.mdx b/nodejs/versioned_docs/version-stable/api/class-coverage.mdx
index 00112c43a60..051d3786674 100644
--- a/nodejs/versioned_docs/version-stable/api/class-coverage.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-coverage.mdx
@@ -200,7 +200,9 @@ await coverage.stopJSCoverage();
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -222,6 +224,7 @@ await coverage.stopJSCoverage();
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-debugger.mdx b/nodejs/versioned_docs/version-stable/api/class-debugger.mdx
new file mode 100644
index 00000000000..750141f0738
--- /dev/null
+++ b/nodejs/versioned_docs/version-stable/api/class-debugger.mdx
@@ -0,0 +1,253 @@
+---
+id: class-debugger
+title: "Debugger"
+---
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import HTMLCard from '@site/src/components/HTMLCard';
+
+
+API for controlling the Playwright debugger. The debugger allows pausing script execution and inspecting the page. Obtain the debugger instance via [browserContext.debugger](/api/class-browsercontext.mdx#browser-context-debugger).
+
+
+---
+
+## Methods
+
+### next {#debugger-next}
+
+
Added in: v1.59debugger.next
+
+Resumes script execution and pauses again before the next action. Throws if the debugger is not paused.
+
+**Usage**
+
+```js
+await debugger.next();
+```
+
+**Returns**
+- [Promise]<[void]>
#
+
+---
+
+### pausedDetails {#debugger-paused-details}
+
+
Added in: v1.59debugger.pausedDetails
+
+Returns details about the currently paused call. Returns `null` if the debugger is not paused.
+
+**Usage**
+
+```js
+debugger.pausedDetails();
+```
+
+**Returns**
+- [null] | [Object]
#
+ - `location` [Object]
+ - `file` [string]
+
+
+ - `line` [number] *(optional)*
+
+
+ - `column` [number] *(optional)*
+
+
+
+ - `title` [string]
+
+
+---
+
+### requestPause {#debugger-request-pause}
+
+
Added in: v1.59debugger.requestPause
+
+Configures the debugger to pause before the next action is executed.
+
+Throws if the debugger is already paused. Use [debugger.next()](/api/class-debugger.mdx#debugger-next) or [debugger.runTo()](/api/class-debugger.mdx#debugger-run-to) to step while paused.
+
+Note that [page.pause()](/api/class-page.mdx#page-pause) is equivalent to a "debugger" statement — it pauses execution at the call site immediately. On the contrary, [debugger.requestPause()](/api/class-debugger.mdx#debugger-request-pause) is equivalent to "pause on next statement" — it configures the debugger to pause before the next action is executed.
+
+**Usage**
+
+```js
+await debugger.requestPause();
+```
+
+**Returns**
+- [Promise]<[void]>
#
+
+---
+
+### resume {#debugger-resume}
+
+
Added in: v1.59debugger.resume
+
+Resumes script execution. Throws if the debugger is not paused.
+
+**Usage**
+
+```js
+await debugger.resume();
+```
+
+**Returns**
+- [Promise]<[void]>
#
+
+---
+
+### runTo {#debugger-run-to}
+
+
Added in: v1.59debugger.runTo
+
+Resumes script execution and pauses when an action originates from the given source location. Throws if the debugger is not paused.
+
+**Usage**
+
+```js
+await debugger.runTo(location);
+```
+
+**Arguments**
+- `location` [Object]
#
+ - `file` [string]
+
+
+ - `line` [number] *(optional)*
+
+
+ - `column` [number] *(optional)*
+
+
+ The source location to pause at.
+
+**Returns**
+- [Promise]<[void]>
#
+
+---
+
+## Events
+
+### on('pausedstatechanged') {#debugger-event-paused-state-changed}
+
+
Added in: v1.59debugger.on('pausedstatechanged')
+
+Emitted when the debugger pauses or resumes.
+
+**Usage**
+
+```js
+debugger.on('pausedstatechanged', data => {});
+```
+
+
+[Android]: /api/class-android.mdx "Android"
+[AndroidDevice]: /api/class-androiddevice.mdx "AndroidDevice"
+[AndroidInput]: /api/class-androidinput.mdx "AndroidInput"
+[AndroidSocket]: /api/class-androidsocket.mdx "AndroidSocket"
+[AndroidWebView]: /api/class-androidwebview.mdx "AndroidWebView"
+[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"
+[BrowserServer]: /api/class-browserserver.mdx "BrowserServer"
+[BrowserType]: /api/class-browsertype.mdx "BrowserType"
+[CDPSession]: /api/class-cdpsession.mdx "CDPSession"
+[Clock]: /api/class-clock.mdx "Clock"
+[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
+[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
+[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"
+[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
+[GenericAssertions]: /api/class-genericassertions.mdx "GenericAssertions"
+[JSHandle]: /api/class-jshandle.mdx "JSHandle"
+[Keyboard]: /api/class-keyboard.mdx "Keyboard"
+[Locator]: /api/class-locator.mdx "Locator"
+[LocatorAssertions]: /api/class-locatorassertions.mdx "LocatorAssertions"
+[Logger]: /api/class-logger.mdx "Logger"
+[Mouse]: /api/class-mouse.mdx "Mouse"
+[Page]: /api/class-page.mdx "Page"
+[PageAssertions]: /api/class-pageassertions.mdx "PageAssertions"
+[Playwright]: /api/class-playwright.mdx "Playwright"
+[PlaywrightAssertions]: /api/class-playwrightassertions.mdx "PlaywrightAssertions"
+[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"
+[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
+[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"
+[Fixtures]: /api/class-fixtures.mdx "Fixtures"
+[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
+[FullProject]: /api/class-fullproject.mdx "FullProject"
+[Location]: /api/class-location.mdx "Location"
+[Test]: /api/class-test.mdx "Test"
+[TestConfig]: /api/class-testconfig.mdx "TestConfig"
+[TestInfo]: /api/class-testinfo.mdx "TestInfo"
+[TestInfoError]: /api/class-testinfoerror.mdx "TestInfoError"
+[TestOptions]: /api/class-testoptions.mdx "TestOptions"
+[TestProject]: /api/class-testproject.mdx "TestProject"
+[TestStepInfo]: /api/class-teststepinfo.mdx "TestStepInfo"
+[WorkerInfo]: /api/class-workerinfo.mdx "WorkerInfo"
+[Reporter]: /api/class-reporter.mdx "Reporter"
+[Suite]: /api/class-suite.mdx "Suite"
+[TestCase]: /api/class-testcase.mdx "TestCase"
+[TestError]: /api/class-testerror.mdx "TestError"
+[TestResult]: /api/class-testresult.mdx "TestResult"
+[TestStep]: /api/class-teststep.mdx "TestStep"
+[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"
+
+[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array "Array"
+[boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type "Boolean"
+[Buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer "Buffer"
+[ChildProcess]: https://nodejs.org/api/child_process.html "ChildProcess"
+[Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date "Date"
+[Error]: https://nodejs.org/api/errors.html#errors_class_error "Error"
+[EventEmitter]: https://nodejs.org/api/events.html#events_class_eventemitter "EventEmitter"
+[function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function "Function"
+[FormData]: https://developer.mozilla.org/en-US/docs/Web/API/FormData "FormData"
+[Map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map "Map"
+[Metadata]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object "Object<string, any>"
+[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null "null"
+[number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number"
+[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object "Object"
+[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise"
+[Readable]: https://nodejs.org/api/stream.html#stream_class_stream_readable "Readable"
+[ReadStream]: https://nodejs.org/api/fs.html#class-fsreadstream "ReadStream"
+[RegExp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp "RegExp"
+[string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "string"
+[void]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined "void"
+[URL]: https://nodejs.org/api/url.html "URL"
+[URLSearchParams]: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams "URLSearchParams"
+
+[all available image tags]: https://mcr.microsoft.com/en-us/product/playwright/about "all available image tags"
+[Microsoft Artifact Registry]: https://mcr.microsoft.com/en-us/product/playwright/about "Microsoft Artifact Registry"
+[Dockerfile.noble]: https://github.com/microsoft/playwright/blob/main/utils/docker/Dockerfile.noble "Dockerfile.noble"
diff --git a/nodejs/versioned_docs/version-stable/api/class-dialog.mdx b/nodejs/versioned_docs/version-stable/api/class-dialog.mdx
index 8f5d4a08819..a4bdfcafe40 100644
--- a/nodejs/versioned_docs/version-stable/api/class-dialog.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-dialog.mdx
@@ -159,7 +159,9 @@ dialog.type();
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -181,6 +183,7 @@ dialog.type();
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-disposable.mdx b/nodejs/versioned_docs/version-stable/api/class-disposable.mdx
new file mode 100644
index 00000000000..08eda2aa414
--- /dev/null
+++ b/nodejs/versioned_docs/version-stable/api/class-disposable.mdx
@@ -0,0 +1,139 @@
+---
+id: class-disposable
+title: "Disposable"
+---
+import Tabs from '@theme/Tabs';
+import TabItem from '@theme/TabItem';
+import HTMLCard from '@site/src/components/HTMLCard';
+
+
+[Disposable] is returned from various methods to allow undoing the corresponding action. For example, [page.addInitScript()](/api/class-page.mdx#page-add-init-script) returns a [Disposable] that can be used to remove the init script.
+
+
+---
+
+## Methods
+
+### dispose {#disposable-dispose}
+
+
Added in: v1.59disposable.dispose
+
+Removes the associated resource. For example, removes the init script installed via [page.addInitScript()](/api/class-page.mdx#page-add-init-script) or [browserContext.addInitScript()](/api/class-browsercontext.mdx#browser-context-add-init-script).
+
+**Usage**
+
+```js
+await disposable.dispose();
+```
+
+**Returns**
+- [Promise]<[void]>
#
+
+
+[Android]: /api/class-android.mdx "Android"
+[AndroidDevice]: /api/class-androiddevice.mdx "AndroidDevice"
+[AndroidInput]: /api/class-androidinput.mdx "AndroidInput"
+[AndroidSocket]: /api/class-androidsocket.mdx "AndroidSocket"
+[AndroidWebView]: /api/class-androidwebview.mdx "AndroidWebView"
+[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"
+[BrowserServer]: /api/class-browserserver.mdx "BrowserServer"
+[BrowserType]: /api/class-browsertype.mdx "BrowserType"
+[CDPSession]: /api/class-cdpsession.mdx "CDPSession"
+[Clock]: /api/class-clock.mdx "Clock"
+[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
+[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
+[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"
+[FrameLocator]: /api/class-framelocator.mdx "FrameLocator"
+[GenericAssertions]: /api/class-genericassertions.mdx "GenericAssertions"
+[JSHandle]: /api/class-jshandle.mdx "JSHandle"
+[Keyboard]: /api/class-keyboard.mdx "Keyboard"
+[Locator]: /api/class-locator.mdx "Locator"
+[LocatorAssertions]: /api/class-locatorassertions.mdx "LocatorAssertions"
+[Logger]: /api/class-logger.mdx "Logger"
+[Mouse]: /api/class-mouse.mdx "Mouse"
+[Page]: /api/class-page.mdx "Page"
+[PageAssertions]: /api/class-pageassertions.mdx "PageAssertions"
+[Playwright]: /api/class-playwright.mdx "Playwright"
+[PlaywrightAssertions]: /api/class-playwrightassertions.mdx "PlaywrightAssertions"
+[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"
+[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
+[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"
+[Fixtures]: /api/class-fixtures.mdx "Fixtures"
+[FullConfig]: /api/class-fullconfig.mdx "FullConfig"
+[FullProject]: /api/class-fullproject.mdx "FullProject"
+[Location]: /api/class-location.mdx "Location"
+[Test]: /api/class-test.mdx "Test"
+[TestConfig]: /api/class-testconfig.mdx "TestConfig"
+[TestInfo]: /api/class-testinfo.mdx "TestInfo"
+[TestInfoError]: /api/class-testinfoerror.mdx "TestInfoError"
+[TestOptions]: /api/class-testoptions.mdx "TestOptions"
+[TestProject]: /api/class-testproject.mdx "TestProject"
+[TestStepInfo]: /api/class-teststepinfo.mdx "TestStepInfo"
+[WorkerInfo]: /api/class-workerinfo.mdx "WorkerInfo"
+[Reporter]: /api/class-reporter.mdx "Reporter"
+[Suite]: /api/class-suite.mdx "Suite"
+[TestCase]: /api/class-testcase.mdx "TestCase"
+[TestError]: /api/class-testerror.mdx "TestError"
+[TestResult]: /api/class-testresult.mdx "TestResult"
+[TestStep]: /api/class-teststep.mdx "TestStep"
+[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"
+
+[Array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array "Array"
+[boolean]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Boolean_type "Boolean"
+[Buffer]: https://nodejs.org/api/buffer.html#buffer_class_buffer "Buffer"
+[ChildProcess]: https://nodejs.org/api/child_process.html "ChildProcess"
+[Date]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date "Date"
+[Error]: https://nodejs.org/api/errors.html#errors_class_error "Error"
+[EventEmitter]: https://nodejs.org/api/events.html#events_class_eventemitter "EventEmitter"
+[function]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function "Function"
+[FormData]: https://developer.mozilla.org/en-US/docs/Web/API/FormData "FormData"
+[Map]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map "Map"
+[Metadata]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object "Object<string, any>"
+[null]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null "null"
+[number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Number_type "Number"
+[Object]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object "Object"
+[Promise]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise "Promise"
+[Readable]: https://nodejs.org/api/stream.html#stream_class_stream_readable "Readable"
+[ReadStream]: https://nodejs.org/api/fs.html#class-fsreadstream "ReadStream"
+[RegExp]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp "RegExp"
+[string]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#String_type "string"
+[void]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined "void"
+[URL]: https://nodejs.org/api/url.html "URL"
+[URLSearchParams]: https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams "URLSearchParams"
+
+[all available image tags]: https://mcr.microsoft.com/en-us/product/playwright/about "all available image tags"
+[Microsoft Artifact Registry]: https://mcr.microsoft.com/en-us/product/playwright/about "Microsoft Artifact Registry"
+[Dockerfile.noble]: https://github.com/microsoft/playwright/blob/main/utils/docker/Dockerfile.noble "Dockerfile.noble"
diff --git a/nodejs/versioned_docs/version-stable/api/class-download.mdx b/nodejs/versioned_docs/version-stable/api/class-download.mdx
index 520cc764610..53b3a63f6a2 100644
--- a/nodejs/versioned_docs/version-stable/api/class-download.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-download.mdx
@@ -209,7 +209,9 @@ download.url();
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -231,6 +233,7 @@ download.url();
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-electron.mdx b/nodejs/versioned_docs/version-stable/api/class-electron.mdx
index 8d4a4fc937e..6d3432abae8 100644
--- a/nodejs/versioned_docs/version-stable/api/class-electron.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-electron.mdx
@@ -81,9 +81,15 @@ await electron.launch(options);
- `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'`.
@@ -152,9 +158,9 @@ await electron.launch(options);
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]
+ - `dir` [string] *(optional)*
- Path to the directory to put videos into.
+ 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]
@@ -164,6 +170,18 @@ await electron.launch(options);
Video frame height.
Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport` scaled down to fit into 800x800. If `viewport` is not configured explicitly the video size defaults to 800x450. Actual picture of each page will be scaled down if necessary to fit the specified size.
+ - `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#
@@ -197,7 +215,9 @@ await electron.launch(options);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -219,6 +239,7 @@ await electron.launch(options);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-electronapplication.mdx b/nodejs/versioned_docs/version-stable/api/class-electronapplication.mdx
index 005b4b9f641..faf5b153645 100644
--- a/nodejs/versioned_docs/version-stable/api/class-electronapplication.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-electronapplication.mdx
@@ -328,7 +328,9 @@ electronApplication.on('window', data => {});
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -350,6 +352,7 @@ electronApplication.on('window', data => {});
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-elementhandle.mdx b/nodejs/versioned_docs/version-stable/api/class-elementhandle.mdx
index 9c2583e93ba..0c515a8929d 100644
--- a/nodejs/versioned_docs/version-stable/api/class-elementhandle.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-elementhandle.mdx
@@ -1609,7 +1609,9 @@ This method does not work across navigations, use [page.waitForSelector()](/api/
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -1631,6 +1633,7 @@ This method does not work across navigations, use [page.waitForSelector()](/api/
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-filechooser.mdx b/nodejs/versioned_docs/version-stable/api/class-filechooser.mdx
index c343795440a..79af166527e 100644
--- a/nodejs/versioned_docs/version-stable/api/class-filechooser.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-filechooser.mdx
@@ -131,7 +131,9 @@ await fileChooser.setFiles(files, options);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -153,6 +155,7 @@ await fileChooser.setFiles(files, options);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-fixtures.mdx b/nodejs/versioned_docs/version-stable/api/class-fixtures.mdx
index 7bf93dae008..c16839120ef 100644
--- a/nodejs/versioned_docs/version-stable/api/class-fixtures.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-fixtures.mdx
@@ -164,7 +164,9 @@ test('basic test', async ({ request }) => {
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -186,6 +188,7 @@ test('basic test', async ({ request }) => {
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-frame.mdx b/nodejs/versioned_docs/version-stable/api/class-frame.mdx
index 6e8c9f484b8..eeb9c6ea4df 100644
--- a/nodejs/versioned_docs/version-stable/api/class-frame.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-frame.mdx
@@ -467,7 +467,7 @@ Consider the following DOM structure.
```
-You can locate each element by it's implicit role:
+You can locate each element by its implicit role:
```js
await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
@@ -555,7 +555,7 @@ Consider the following DOM structure.
```
-You can locate the element by it's test id:
+You can locate the element by its test id:
```js
await page.getByTestId('directions').click();
@@ -1051,9 +1051,9 @@ await frame.waitForURL('**/target.html');
```
**Arguments**
-- `url` [string] | [RegExp] | [function]\([URL]\):[boolean]
#
+- `url` [string] | [RegExp] | [URLPattern] | [function]\([URL]\):[boolean]
#
- A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
+ A glob pattern, regex pattern, URL pattern, or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
- `options` [Object] *(optional)*
- `timeout` [number] *(optional)*
#
@@ -2545,9 +2545,9 @@ Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/Hist
- `timeout` [number] *(optional)*
#
Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `navigationTimeout` option in the config, or by using the [browserContext.setDefaultNavigationTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-navigation-timeout), [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout), [page.setDefaultNavigationTimeout()](/api/class-page.mdx#page-set-default-navigation-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout) methods.
- - `url` [string] | [RegExp] | [function]\([URL]\):[boolean] *(optional)*
#
+ - `url` [string] | [RegExp] | [URLPattern] | [function]\([URL]\):[boolean] *(optional)*
#
- A glob pattern, regex pattern or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
+ A glob pattern, regex pattern, URL pattern, or predicate receiving [URL] to match while waiting for the navigation. Note that if the parameter is a string without wildcard characters, the method will wait for navigation to URL that is exactly equal to the string.
- `waitUntil` "load" | "domcontentloaded" | "networkidle" | "commit" *(optional)*
#
When to consider operation succeeded, defaults to `load`. Events can be either:
@@ -2671,7 +2671,9 @@ await frame.waitForTimeout(timeout);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -2693,6 +2695,7 @@ await frame.waitForTimeout(timeout);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-framelocator.mdx b/nodejs/versioned_docs/version-stable/api/class-framelocator.mdx
index 9605686033d..b46f39750de 100644
--- a/nodejs/versioned_docs/version-stable/api/class-framelocator.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-framelocator.mdx
@@ -183,7 +183,7 @@ Consider the following DOM structure.
```
-You can locate each element by it's implicit role:
+You can locate each element by its implicit role:
```js
await expect(page.getByRole('heading', { name: 'Sign up' })).toBeVisible();
@@ -271,7 +271,7 @@ Consider the following DOM structure.
```
-You can locate the element by it's test id:
+You can locate the element by its test id:
```js
await page.getByTestId('directions').click();
@@ -553,7 +553,9 @@ frameLocator.nth(index);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -575,6 +577,7 @@ frameLocator.nth(index);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-fullconfig.mdx b/nodejs/versioned_docs/version-stable/api/class-fullconfig.mdx
index fa00830f5f9..45003f6938a 100644
--- a/nodejs/versioned_docs/version-stable/api/class-fullconfig.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-fullconfig.mdx
@@ -439,7 +439,9 @@ fullConfig.workers
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -461,6 +463,7 @@ fullConfig.workers
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-fullproject.mdx b/nodejs/versioned_docs/version-stable/api/class-fullproject.mdx
index 29752586f38..52665c95fcd 100644
--- a/nodejs/versioned_docs/version-stable/api/class-fullproject.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-fullproject.mdx
@@ -65,6 +65,23 @@ fullProject.grepInvert
---
+### ignoreSnapshots {#full-project-ignore-snapshots}
+
+
Added in: v1.59fullProject.ignoreSnapshots
+
+See [testProject.ignoreSnapshots](/api/class-testproject.mdx#test-project-ignore-snapshots).
+
+**Usage**
+
+```js
+fullProject.ignoreSnapshots
+```
+
+**Type**
+- [boolean]
+
+---
+
### metadata {#full-project-metadata}
Added in: v1.10fullProject.metadata
@@ -285,7 +302,9 @@ fullProject.use
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -307,6 +326,7 @@ fullProject.use
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-genericassertions.mdx b/nodejs/versioned_docs/version-stable/api/class-genericassertions.mdx
index 3a5ddfe0efb..bc477f14399 100644
--- a/nodejs/versioned_docs/version-stable/api/class-genericassertions.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-genericassertions.mdx
@@ -768,17 +768,65 @@ expect(() => {
Added in: v1.9genericAssertions.not
-Makes the assertion check for the opposite condition. For example, the following code passes:
+Makes the assertion check for the opposite condition.
+
+**Usage**
+
+For example, the following code passes:
```js
const value = 1;
expect(value).not.toBe(2);
```
+**Type**
+- [GenericAssertions]
+
+---
+
+### rejects {#generic-assertions-rejects}
+
+
Added in: v1.9genericAssertions.rejects
+
+Use `.rejects` to unwrap the reason of a rejected promise so any other matcher can be chained. If the promise is fulfilled the assertion fails.
+
+For example, this code tests that the promise rejects with reason `'octopus'`:
+
+```js
+test('rejects to octopus', async () => {
+ await expect(Promise.reject(new Error('octopus'))).rejects.toThrow('octopus');
+});
+```
+
+**Usage**
+
+```js
+expect(value).rejects
+```
+
+**Type**
+- [GenericAssertions]
+
+---
+
+### resolves {#generic-assertions-resolves}
+
+
Added in: v1.9genericAssertions.resolves
+
+Use `resolves` to unwrap the value of a fulfilled promise so any other matcher can be chained. If the promise is rejected the assertion fails.
+
+For example, this code tests that the promise resolves and that the resulting value is `'lemon'`:
+
+```js
+test('resolves to lemon', async () => {
+ await expect(Promise.resolve('lemon')).resolves.toBe('lemon');
+});
+```
+
**Usage**
```js
-expect(value).not
+expect(value).resolves
```
**Type**
@@ -802,7 +850,9 @@ expect(value).not
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -824,6 +874,7 @@ expect(value).not
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-jshandle.mdx b/nodejs/versioned_docs/version-stable/api/class-jshandle.mdx
index 91512d911ac..da7a0976e55 100644
--- a/nodejs/versioned_docs/version-stable/api/class-jshandle.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-jshandle.mdx
@@ -202,7 +202,9 @@ await jsHandle.jsonValue();
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -224,6 +226,7 @@ await jsHandle.jsonValue();
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-keyboard.mdx b/nodejs/versioned_docs/version-stable/api/class-keyboard.mdx
index c6e877d211b..cc70b2c4d7e 100644
--- a/nodejs/versioned_docs/version-stable/api/class-keyboard.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-keyboard.mdx
@@ -243,7 +243,9 @@ await keyboard.up(key);
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -265,6 +267,7 @@ await keyboard.up(key);
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-location.mdx b/nodejs/versioned_docs/version-stable/api/class-location.mdx
index 0bb4c721c31..0450285e4aa 100644
--- a/nodejs/versioned_docs/version-stable/api/class-location.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-location.mdx
@@ -81,7 +81,9 @@ location.line
[Clock]: /api/class-clock.mdx "Clock"
[ConsoleMessage]: /api/class-consolemessage.mdx "ConsoleMessage"
[Coverage]: /api/class-coverage.mdx "Coverage"
+[Debugger]: /api/class-debugger.mdx "Debugger"
[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"
@@ -103,6 +105,7 @@ location.line
[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"
[SnapshotAssertions]: /api/class-snapshotassertions.mdx "SnapshotAssertions"
[TimeoutError]: /api/class-timeouterror.mdx "TimeoutError"
diff --git a/nodejs/versioned_docs/version-stable/api/class-locator.mdx b/nodejs/versioned_docs/version-stable/api/class-locator.mdx
index e8c54761c3a..8b748b7d81c 100644
--- a/nodejs/versioned_docs/version-stable/api/class-locator.mdx
+++ b/nodejs/versioned_docs/version-stable/api/class-locator.mdx
@@ -125,6 +125,12 @@ await page.getByRole('link').ariaSnapshot();
**Arguments**
- `options` [Object] *(optional)*
+ - `depth` [number] *(optional)*
Added in: v1.59#
+
+ When specified, limits the depth of the snapshot.
+ - `mode` "ai" | "default" *(optional)*
Added in: v1.59#
+
+ When set to `"ai"`, returns a snapshot optimized for AI consumption. Defaults to `"default"`. See details for more information.
- `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.
@@ -158,6 +164,9 @@ Below is the HTML markup and the respective ARIA snapshot:
- link "About"
```
+An AI-optimized snapshot, controlled by [mode](/api/class-locator.mdx#locator-aria-snapshot-option-mode), is different from a default snapshot:
+1. Includes element references `[ref=e2]`. 2. Does not wait for an element matching the locator, and throws when no elements match. 3. Includes snapshots of `