From 6027d2483edf899e9dce3b52ed6d4b8fa40e0093 Mon Sep 17 00:00:00 2001
From: "microsoft-playwright-automation[bot]"
<203992400+microsoft-playwright-automation[bot]@users.noreply.github.com>
Date: Wed, 1 Jul 2026 11:15:35 +0000
Subject: [PATCH] feat(roll): roll to ToT Playwright (01-07-26)
---
dotnet/docs/api/class-browsercontext.mdx | 3 +
dotnet/docs/getting-started-cli.mdx | 3 +-
dotnet/docs/getting-started-mcp.mdx | 4 +-
java/docs/api/class-browsercontext.mdx | 3 +
java/docs/ci.mdx | 12 +--
java/docs/docker.mdx | 18 ++--
java/docs/getting-started-cli.mdx | 3 +-
java/docs/getting-started-mcp.mdx | 4 +-
java/docs/intro.mdx | 2 +-
java/docs/test-runners.mdx | 4 +-
nodejs/docs/api/class-browsercontext.mdx | 5 +-
nodejs/docs/api/class-coverage.mdx | 7 +-
nodejs/docs/api/class-elementhandle.mdx | 51 ++++++++++
nodejs/docs/api/class-filechooser.mdx | 3 +
nodejs/docs/api/class-frame.mdx | 90 +++++++++++++++++-
nodejs/docs/api/class-locator.mdx | 108 +++++++++++++++++++++
nodejs/docs/api/class-page.mdx | 111 ++++++++++++++++++++--
nodejs/docs/api/class-websocket.mdx | 2 +-
nodejs/docs/api/class-worker.mdx | 2 +-
nodejs/docs/getting-started-cli.mdx | 3 +-
nodejs/docs/getting-started-mcp.mdx | 4 +-
python/docs/api/class-browsercontext.mdx | 3 +
python/docs/ci.mdx | 12 +--
python/docs/docker.mdx | 20 ++--
python/docs/getting-started-cli.mdx | 3 +-
python/docs/getting-started-mcp.mdx | 4 +-
src/components/GitHubStarButton/index.tsx | 2 +-
27 files changed, 430 insertions(+), 56 deletions(-)
diff --git a/dotnet/docs/api/class-browsercontext.mdx b/dotnet/docs/api/class-browsercontext.mdx
index 71d36105ea..d345b026b5 100644
--- a/dotnet/docs/api/class-browsercontext.mdx
+++ b/dotnet/docs/api/class-browsercontext.mdx
@@ -592,6 +592,9 @@ await BrowserContext.RouteFromHARAsync(har, options);
Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a relative path, then it is resolved relative to the current working directory.
- `options` `BrowserContextRouteFromHAROptions?` *(optional)*
+ - `InterceptAPIRequests` [bool]? *(optional)* Added in: v1.62#
+
+ If set to `true`, requests made via [APIRequestContext] (such as [BrowserContext.APIRequest](/api/class-browsercontext.mdx#browser-context-request) or [Page.APIRequest](/api/class-page.mdx#page-request)) are also served from the HAR file. By default these requests are sent to the network, matching the behavior prior to v1.62. Defaults to `false` for backward compatibility.
- `NotFound` `enum HarNotFound { Abort, Fallback }?` *(optional)*#
* If set to 'abort' any request not found in the HAR file will be aborted.
* If set to 'fallback' falls through to the next route handler in the handler chain.
diff --git a/dotnet/docs/getting-started-cli.mdx b/dotnet/docs/getting-started-cli.mdx
index 893def3363..69684ba510 100644
--- a/dotnet/docs/getting-started-cli.mdx
+++ b/dotnet/docs/getting-started-cli.mdx
@@ -17,7 +17,7 @@ Playwright comes with `playwright-cli`, a command-line interface for browser aut
## Prerequisites
Before you begin, make sure you have the following installed:
-- [Node.js](https://nodejs.org/) 18 or newer
+- [Node.js](https://nodejs.org/) 20 or newer
- A coding agent: Claude Code, GitHub Copilot, or similar
## Installation
@@ -132,6 +132,7 @@ playwright-cli snapshot --filename=f # save snapshot to specific file
playwright-cli screenshot # screenshot of the current page
playwright-cli screenshot [ref] # screenshot of a specific element
playwright-cli screenshot --filename=f # save with specific filename
+playwright-cli screenshot --hires # capture using device pixels
playwright-cli pdf # save page as PDF
```
diff --git a/dotnet/docs/getting-started-mcp.mdx b/dotnet/docs/getting-started-mcp.mdx
index 7a3727592f..3acca2e8fb 100644
--- a/dotnet/docs/getting-started-mcp.mdx
+++ b/dotnet/docs/getting-started-mcp.mdx
@@ -13,7 +13,7 @@ The Playwright MCP server provides browser automation capabilities through the [
## Prerequisites
Before you begin, make sure you have the following installed:
-- [Node.js](https://nodejs.org/) 18 or newer
+- [Node.js](https://nodejs.org/) 20 or newer
- An MCP client: VS Code, Cursor, Windsurf, Claude Code, Claude Desktop, or similar
## Getting Started
@@ -194,6 +194,8 @@ When running a headed browser on a system without a display or from IDE worker p
npx @playwright/mcp@latest --port 8931
```
+HTTP sessions use a five-second heartbeat timeout. If your MCP client or proxy does not answer server-initiated pings, set `PLAYWRIGHT_MCP_PING_TIMEOUT_MS` to a longer timeout in milliseconds. Set it to `0` to disable the heartbeat.
+
Then point your MCP client to the HTTP endpoint:
```json
diff --git a/java/docs/api/class-browsercontext.mdx b/java/docs/api/class-browsercontext.mdx
index 733835fe36..434ffb0cdc 100644
--- a/java/docs/api/class-browsercontext.mdx
+++ b/java/docs/api/class-browsercontext.mdx
@@ -603,6 +603,9 @@ BrowserContext.routeFromHAR(har, options);
Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a relative path, then it is resolved relative to the current working directory.
- `options` `BrowserContext.RouteFromHAROptions` *(optional)*
+ - `setInterceptAPIRequests` [boolean] *(optional)* Added in: v1.62#
+
+ If set to `true`, requests made via [APIRequestContext] (such as [BrowserContext.request()](/api/class-browsercontext.mdx#browser-context-request) or [Page.request()](/api/class-page.mdx#page-request)) are also served from the HAR file. By default these requests are sent to the network, matching the behavior prior to v1.62. Defaults to `false` for backward compatibility.
- `setNotFound` `enum HarNotFound { ABORT, FALLBACK }` *(optional)*#
* If set to 'abort' any request not found in the HAR file will be aborted.
* If set to 'fallback' falls through to the next route handler in the handler chain.
diff --git a/java/docs/ci.mdx b/java/docs/ci.mdx
index 7326ec4996..ed30ecfc63 100644
--- a/java/docs/ci.mdx
+++ b/java/docs/ci.mdx
@@ -75,7 +75,7 @@ jobs:
name: 'Playwright Tests'
runs-on: ubuntu-latest
container:
- image: mcr.microsoft.com/playwright/java:v1.60.0-noble
+ image: mcr.microsoft.com/playwright/java:v1.61.0-noble
options: --user 1001
steps:
- uses: actions/checkout@v5
@@ -160,7 +160,7 @@ trigger:
pool:
vmImage: ubuntu-latest
-container: mcr.microsoft.com/playwright/java:v1.60.0-noble
+container: mcr.microsoft.com/playwright/java:v1.61.0-noble
steps:
- task: JavaToolInstaller@1
@@ -183,7 +183,7 @@ Running Playwright on CircleCI is very similar to running on GitHub Actions. In
executors:
pw-noble-development:
docker:
- - image: mcr.microsoft.com/playwright/java:v1.60.0-noble
+ - image: mcr.microsoft.com/playwright/java:v1.61.0-noble
```
Note: When using the docker agent definition, you are specifying the resource class of where playwright runs to the 'medium' tier [here](https://circleci.com/docs/configuration-reference?#docker-execution-environment). The default behavior of Playwright is to set the number of workers to the detected core count (2 in the case of the medium tier). Overriding the number of workers to greater than this number will cause unnecessary timeouts and failures.
@@ -194,7 +194,7 @@ Jenkins supports Docker agents for pipelines. Use the [Playwright Docker image](
```groovy
pipeline {
- agent { docker { image 'mcr.microsoft.com/playwright/java:v1.60.0-noble' } }
+ agent { docker { image 'mcr.microsoft.com/playwright/java:v1.61.0-noble' } }
stages {
stage('e2e-tests') {
steps {
@@ -211,7 +211,7 @@ pipeline {
Bitbucket Pipelines can use public [Docker images as build environments](https://confluence.atlassian.com/bitbucket/use-docker-images-as-build-environments-792298897.html). To run Playwright tests on Bitbucket, use our public Docker image ([see Dockerfile](./docker.mdx)).
```yml
-image: mcr.microsoft.com/playwright/java:v1.60.0-noble
+image: mcr.microsoft.com/playwright/java:v1.61.0-noble
```
### GitLab CI
@@ -224,7 +224,7 @@ stages:
tests:
stage: test
- image: mcr.microsoft.com/playwright/java:v1.60.0-noble
+ image: mcr.microsoft.com/playwright/java:v1.61.0-noble
script:
...
```
diff --git a/java/docs/docker.mdx b/java/docs/docker.mdx
index 75f2168a09..13dcb45168 100644
--- a/java/docs/docker.mdx
+++ b/java/docs/docker.mdx
@@ -22,7 +22,7 @@ This Docker image is intended to be used for testing and development purposes on
### Pull the image
```bash
-docker pull mcr.microsoft.com/playwright/java:v1.60.0-noble
+docker pull mcr.microsoft.com/playwright/java:v1.61.0-noble
```
### Run the image
@@ -34,7 +34,7 @@ By default, the Docker image will use the `root` user to run the browsers. This
On trusted websites, you can avoid creating a separate user and use root for it since you trust the code which will run on the browsers.
```bash
-docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.60.0-noble /bin/bash
+docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.61.0-noble /bin/bash
```
#### Crawling and scraping
@@ -42,7 +42,7 @@ docker run -it --rm --ipc=host mcr.microsoft.com/playwright/java:v1.60.0-noble /
On untrusted websites, it's recommended to use a separate user for launching the browsers in combination with the seccomp profile. Inside the container or if you are using the Docker image as a base image you have to use `adduser` for it.
```bash
-docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.60.0-noble /bin/bash
+docker run -it --rm --ipc=host --user pwuser --security-opt seccomp=seccomp_profile.json mcr.microsoft.com/playwright/java:v1.61.0-noble /bin/bash
```
[`seccomp_profile.json`](https://github.com/microsoft/playwright/blob/main/utils/docker/seccomp_profile.json) is needed to run Chromium with sandbox. This is a [default Docker seccomp profile](https://github.com/docker/engine/blob/d0d99b04cf6e00ed3fc27e81fc3d94e7eda70af3/profiles/seccomp/default.json) with extra user namespace cloning permissions:
@@ -82,7 +82,7 @@ You can run Playwright Server in Docker while keeping your tests running on the
Start the Playwright Server in Docker:
```bash
-docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.60.0-noble /bin/sh -c "npx -y playwright@1.60.0 run-server --port 3000 --host 0.0.0.0"
+docker run -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.61.0-noble /bin/sh -c "npx -y playwright@1.61.0 run-server --port 3000 --host 0.0.0.0"
```
#### Connecting to the Server
@@ -107,7 +107,7 @@ public class App {
If you need to access local servers from within the Docker container:
```bash
-docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.60.0-noble /bin/sh -c "npx -y playwright@1.60.0 run-server --port 3000 --host 0.0.0.0"
+docker run --add-host=hostmachine:host-gateway -p 3000:3000 --rm --init -it --workdir /home/pwuser --user pwuser mcr.microsoft.com/playwright:v1.61.0-noble /bin/sh -c "npx -y playwright@1.61.0 run-server --port 3000 --host 0.0.0.0"
```
This makes `hostmachine` point to the host's localhost. Your tests should use `hostmachine` instead of `localhost` when accessing local servers.
@@ -140,10 +140,10 @@ Once this is enabled you can open the port specified in a new browser tab and yo
See [all available image tags].
We currently publish images with the following tags:
-- `:v1.60.0` - Playwright v1.60.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
-- `:v1.60.0-noble` - Playwright v1.60.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
-- `:v1.60.0-jammy` - Playwright v1.60.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
-- `:v1.60.0-resolute` - Playwright v1.60.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon).
+- `:v1.61.0` - Playwright v1.61.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
+- `:v1.61.0-noble` - Playwright v1.61.0 release docker image based on Ubuntu 24.04 LTS (Noble Numbat).
+- `:v1.61.0-jammy` - Playwright v1.61.0 release docker image based on Ubuntu 22.04 LTS (Jammy Jellyfish).
+- `:v1.61.0-resolute` - Playwright v1.61.0 release docker image based on Ubuntu 26.04 LTS (Resolute Raccoon).
:::note
diff --git a/java/docs/getting-started-cli.mdx b/java/docs/getting-started-cli.mdx
index 7813f6fc7a..10bd768b9b 100644
--- a/java/docs/getting-started-cli.mdx
+++ b/java/docs/getting-started-cli.mdx
@@ -17,7 +17,7 @@ Playwright comes with `playwright-cli`, a command-line interface for browser aut
## Prerequisites
Before you begin, make sure you have the following installed:
-- [Node.js](https://nodejs.org/) 18 or newer
+- [Node.js](https://nodejs.org/) 20 or newer
- A coding agent: Claude Code, GitHub Copilot, or similar
## Installation
@@ -132,6 +132,7 @@ playwright-cli snapshot --filename=f # save snapshot to specific file
playwright-cli screenshot # screenshot of the current page
playwright-cli screenshot [ref] # screenshot of a specific element
playwright-cli screenshot --filename=f # save with specific filename
+playwright-cli screenshot --hires # capture using device pixels
playwright-cli pdf # save page as PDF
```
diff --git a/java/docs/getting-started-mcp.mdx b/java/docs/getting-started-mcp.mdx
index c1d766e4cf..999c3eb16b 100644
--- a/java/docs/getting-started-mcp.mdx
+++ b/java/docs/getting-started-mcp.mdx
@@ -13,7 +13,7 @@ The Playwright MCP server provides browser automation capabilities through the [
## Prerequisites
Before you begin, make sure you have the following installed:
-- [Node.js](https://nodejs.org/) 18 or newer
+- [Node.js](https://nodejs.org/) 20 or newer
- An MCP client: VS Code, Cursor, Windsurf, Claude Code, Claude Desktop, or similar
## Getting Started
@@ -194,6 +194,8 @@ When running a headed browser on a system without a display or from IDE worker p
npx @playwright/mcp@latest --port 8931
```
+HTTP sessions use a five-second heartbeat timeout. If your MCP client or proxy does not answer server-initiated pings, set `PLAYWRIGHT_MCP_PING_TIMEOUT_MS` to a longer timeout in milliseconds. Set it to `0` to disable the heartbeat.
+
Then point your MCP client to the HTTP endpoint:
```json
diff --git a/java/docs/intro.mdx b/java/docs/intro.mdx
index cf3766a4c8..512c32c5b4 100644
--- a/java/docs/intro.mdx
+++ b/java/docs/intro.mdx
@@ -58,7 +58,7 @@ public class App {
com.microsoft.playwright
playwright
- 1.60.0
+ 1.61.0
diff --git a/java/docs/test-runners.mdx b/java/docs/test-runners.mdx
index 7a2f856cf5..1bde5a455c 100644
--- a/java/docs/test-runners.mdx
+++ b/java/docs/test-runners.mdx
@@ -198,7 +198,7 @@ repositories {
}
dependencies {
- implementation 'com.microsoft.playwright:playwright:1.60.0'
+ implementation 'com.microsoft.playwright:playwright:1.61.0'
}
application {
@@ -231,7 +231,7 @@ repositories {
}
dependencies {
- implementation("com.microsoft.playwright:playwright:1.60.0")
+ implementation("com.microsoft.playwright:playwright:1.61.0")
}
application {
diff --git a/nodejs/docs/api/class-browsercontext.mdx b/nodejs/docs/api/class-browsercontext.mdx
index 496bd41de6..7f69c88185 100644
--- a/nodejs/docs/api/class-browsercontext.mdx
+++ b/nodejs/docs/api/class-browsercontext.mdx
@@ -623,6 +623,9 @@ await browserContext.routeFromHAR(har, options);
Path to a [HAR](http://www.softwareishard.com/blog/har-12-spec) file with prerecorded network data. If `path` is a relative path, then it is resolved relative to the current working directory.
- `options` [Object] *(optional)*
+ - `interceptAPIRequests` [boolean] *(optional)* Added in: v1.62#
+
+ If set to `true`, requests made via [APIRequestContext] (such as [browserContext.request](/api/class-browsercontext.mdx#browser-context-request) or [page.request](/api/class-page.mdx#page-request)) are also served from the HAR file. By default these requests are sent to the network, matching the behavior prior to v1.62. Defaults to `false` for backward compatibility.
- `notFound` "abort" | "fallback" *(optional)*#
* If set to 'abort' any request not found in the HAR file will be aborted.
* If set to 'fallback' falls through to the next route handler in the handler chain.
@@ -1057,7 +1060,7 @@ const page = await pagePromise;
Receives the event data and resolves to truthy value when the waiting should resolve.
- `signal` [AbortSignal] *(optional)* Added in: v1.61#
- Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout; pass `timeout: 0` to disable the timeout entirely.
+ Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
**Returns**
- [Promise]<[Object]>#
diff --git a/nodejs/docs/api/class-coverage.mdx b/nodejs/docs/api/class-coverage.mdx
index cfb2327fcc..b4a52cb7a7 100644
--- a/nodejs/docs/api/class-coverage.mdx
+++ b/nodejs/docs/api/class-coverage.mdx
@@ -90,7 +90,12 @@ await coverage.startJSCoverage(options);
Whether anonymous scripts generated by the page should be reported. Defaults to `false`.
- `resetOnNavigation` [boolean] *(optional)*#
- Whether to reset coverage on every navigation. Defaults to `true`.
+ :::warning[Discouraged]
+ Settings this to `false` may still reset on navigations.
+ :::
+
+
+ Whether to reset coverage on every navigation. Defaults to `true`. Note that passing `false` does not guarantee that coverage persists through navigations, due to browser architecture limitations.
**Returns**
- [Promise]<[void]>#
diff --git a/nodejs/docs/api/class-elementhandle.mdx b/nodejs/docs/api/class-elementhandle.mdx
index fca9fe2de8..b384e3b67a 100644
--- a/nodejs/docs/api/class-elementhandle.mdx
+++ b/nodejs/docs/api/class-elementhandle.mdx
@@ -147,6 +147,9 @@ await elementHandle.waitForElementState(state, options);
A state to wait for, see below for more details.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -359,6 +362,9 @@ await elementHandle.check(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -435,6 +441,9 @@ await elementHandle.click(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `steps` [number] *(optional)* Added in: v1.57#
Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -515,6 +524,9 @@ await elementHandle.dblclick(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `steps` [number] *(optional)* Added in: v1.57#
Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -624,6 +636,9 @@ await elementHandle.fill(value, options);
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -740,6 +755,9 @@ await elementHandle.hover(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1025,6 +1043,9 @@ await elementHandle.press(key, options);
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1090,6 +1111,9 @@ await elementHandle.screenshot(options);
When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger.
Defaults to `"device"`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `style` [string] *(optional)* Added in: v1.41#
Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces the Shadow DOM and applies to the inner frames.
@@ -1131,6 +1155,9 @@ await elementHandle.scrollIntoViewIfNeeded(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1197,6 +1224,9 @@ handle.selectOption(['red', 'green', 'blue']);
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1233,6 +1263,9 @@ await elementHandle.selectText(options);
- `force` [boolean] *(optional)* Added in: v1.13#
Whether to bypass the [actionability](../actionability.mdx) checks. Defaults to `false`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1297,6 +1330,9 @@ await elementHandle.setChecked(checked, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1351,6 +1387,9 @@ await elementHandle.setInputFiles(files, options);
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1419,6 +1458,9 @@ await elementHandle.tap(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1488,6 +1530,9 @@ To press a special key, like `Control` or `ArrowDown`, use [elementHandle.press(
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1550,6 +1595,9 @@ await elementHandle.uncheck(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1595,6 +1643,9 @@ This method does not work across navigations, use [page.waitForSelector()](/api/
A selector to query for.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `state` "attached" | "detached" | "visible" | "hidden" *(optional)*#
Defaults to `'visible'`. Can be either:
diff --git a/nodejs/docs/api/class-filechooser.mdx b/nodejs/docs/api/class-filechooser.mdx
index f4bc7d6a8b..2e9b451084 100644
--- a/nodejs/docs/api/class-filechooser.mdx
+++ b/nodejs/docs/api/class-filechooser.mdx
@@ -106,6 +106,9 @@ await fileChooser.setFiles(files, options);
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
diff --git a/nodejs/docs/api/class-frame.mdx b/nodejs/docs/api/class-frame.mdx
index a89bdbc3f8..b058890c11 100644
--- a/nodejs/docs/api/class-frame.mdx
+++ b/nodejs/docs/api/class-frame.mdx
@@ -171,6 +171,9 @@ await frame.dragAndDrop(source, target, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `sourcePosition` [Object] *(optional)* Added in: v1.14#
- `x` [number]
@@ -728,6 +731,9 @@ await frame.goto(url, options);
- `referer` [string] *(optional)*#
Referer header value. If provided it will take preference over the referer header value set by [page.setExtraHTTPHeaders()](/api/class-page.mdx#page-set-extra-http-headers).
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -779,6 +785,9 @@ await frame.isEnabled(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -913,6 +922,9 @@ await frame.setContent(html, options);
HTML markup to assign to the page.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1004,6 +1016,9 @@ await frame.waitForFunction(selector => !!document.querySelector(selector), sele
- `polling` [number] | "raf" *(optional)*#
If [polling](/api/class-frame.mdx#frame-wait-for-function-option-polling) is `'raf'`, then [pageFunction](/api/class-frame.mdx#frame-wait-for-function-option-expression) is constantly executed in `requestAnimationFrame` callback. If [polling](/api/class-frame.mdx#frame-wait-for-function-option-polling) is a number, then it is treated as an interval in milliseconds at which the function would be executed. Defaults to `raf`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `timeout` [number] *(optional)*#
Maximum time to wait for 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.
@@ -1043,7 +1058,7 @@ await frame.waitForLoadState(); // Waits for 'load' state by default.
- `options` [Object] *(optional)*
- `signal` [AbortSignal] *(optional)* Added in: v1.61#
- Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout; pass `timeout: 0` to disable the timeout entirely.
+ Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1073,7 +1088,7 @@ await frame.waitForURL('**/target.html');
- `options` [Object] *(optional)*
- `signal` [AbortSignal] *(optional)* Added in: v1.61#
- Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout; pass `timeout: 0` to disable the timeout entirely.
+ Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1308,6 +1323,9 @@ await frame.check(selector, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1389,6 +1407,9 @@ await frame.click(selector, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1471,6 +1492,9 @@ await frame.dblclick(selector, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1538,6 +1562,9 @@ await frame.dispatchEvent('#source', 'dragstart', { dataTransfer });
Optional event-specific initialization properties.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1593,6 +1620,9 @@ await frame.fill(selector, value, options);
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1630,6 +1660,9 @@ await frame.focus(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1670,6 +1703,9 @@ await frame.getAttribute(selector, name, options);
Attribute name to get the value for.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1738,6 +1774,9 @@ await frame.hover(selector, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1778,6 +1817,9 @@ await frame.innerHTML(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1815,6 +1857,9 @@ await frame.innerText(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1854,6 +1899,9 @@ await frame.inputValue(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1891,6 +1939,9 @@ await frame.isChecked(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1928,6 +1979,9 @@ await frame.isDisabled(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -1965,6 +2019,9 @@ await frame.isEditable(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2106,6 +2163,9 @@ await frame.press(selector, key, options);
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2178,6 +2238,9 @@ frame.selectOption('select#colors', 'red', 'green', 'blue');
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2249,6 +2312,9 @@ await frame.setChecked(selector, checked, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)*#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2309,6 +2375,9 @@ await frame.setInputFiles(selector, files, options);
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2382,6 +2451,9 @@ await frame.tap(selector, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2422,6 +2494,9 @@ await frame.textContent(selector, options);
A selector to search for an element. If there are multiple elements satisfying the selector, the first will be used.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2470,6 +2545,9 @@ To press a special key, like `Control` or `ArrowDown`, use [keyboard.press()](/a
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2537,6 +2615,9 @@ await frame.uncheck(selector, options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `strict` [boolean] *(optional)* Added in: v1.14#
When true, the call requires selector to resolve to a single element. If given selector resolves to more than one element, the call throws an exception.
@@ -2584,7 +2665,7 @@ Usage of the [History API](https://developer.mozilla.org/en-US/docs/Web/API/Hist
- `options` [Object] *(optional)*
- `signal` [AbortSignal] *(optional)* Added in: v1.61#
- Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout; pass `timeout: 0` to disable the timeout entirely.
+ Allows to cancel the waiting using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2648,6 +2729,9 @@ const { chromium } = require('playwright'); // Or 'firefox' or 'webkit'.
A selector to query for.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `state` "attached" | "detached" | "visible" | "hidden" *(optional)*#
Defaults to `'visible'`. Can be either:
diff --git a/nodejs/docs/api/class-locator.mdx b/nodejs/docs/api/class-locator.mdx
index 7299475e61..2bb081709d 100644
--- a/nodejs/docs/api/class-locator.mdx
+++ b/nodejs/docs/api/class-locator.mdx
@@ -134,6 +134,9 @@ await page.getByRole('link').ariaSnapshot();
- `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.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -187,6 +190,9 @@ await locator.blur(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -211,6 +217,9 @@ await page.mouse.click(box.x + box.width / 2, box.y + box.height / 2);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -276,6 +285,9 @@ await page.getByRole('checkbox').check();
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -326,6 +338,9 @@ await page.getByRole('textbox').clear();
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -401,6 +416,9 @@ await page.locator('canvas').click({
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `steps` [number] *(optional)* Added in: v1.57#
Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -520,6 +538,9 @@ await locator.dblclick(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `steps` [number] *(optional)* Added in: v1.57#
Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -615,6 +636,9 @@ await locator.dispatchEvent('click');
Optional event-specific initialization properties.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -688,6 +712,9 @@ await source.dragTo(target, {
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `sourcePosition` [Object] *(optional)*#
- `x` [number]
@@ -777,6 +804,9 @@ await page.locator('#dropzone').drop({
A point to use relative to the top-left corner of element padding box. If not specified, uses some visible point of the element.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -938,6 +968,9 @@ await page.getByRole('textbox').fill('example value');
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1033,6 +1066,9 @@ await locator.focus(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1088,6 +1124,9 @@ await locator.getAttribute(name, options);
Attribute name to get the value for.
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1523,6 +1562,9 @@ await page.getByRole('link').hover();
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1561,6 +1603,9 @@ await locator.innerHTML(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1590,6 +1635,9 @@ await locator.innerText(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1618,6 +1666,9 @@ const value = await page.getByRole('textbox').inputValue();
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1650,6 +1701,9 @@ const checked = await page.getByRole('checkbox').isChecked();
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1678,6 +1732,9 @@ const disabled = await page.getByRole('button').isDisabled();
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1706,6 +1763,9 @@ const editable = await page.getByRole('textbox').isEditable();
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1734,6 +1794,9 @@ const enabled = await page.getByRole('button').isEnabled();
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -1984,6 +2047,9 @@ await page.getByRole('textbox').press('Backspace');
Actions that initiate navigations are waiting for these navigations to happen and for pages to start loading. You can opt out of waiting via setting this flag. You would only need this option in the exceptional cases such as navigating to inaccessible pages. Defaults to `false`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2053,6 +2119,9 @@ await locator.press('Enter');
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2112,6 +2181,9 @@ await page.getByRole('link').screenshot({ animations: 'disabled', path: 'link.pn
When set to `"css"`, screenshot will have a single pixel per each css pixel on the page. For high-dpi devices, this will keep screenshots small. Using `"device"` option will produce a single pixel per each device pixel, so screenshots of high-dpi devices will be twice as large or even larger.
Defaults to `"device"`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `style` [string] *(optional)* Added in: v1.41#
Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces the Shadow DOM and applies to the inner frames.
@@ -2152,6 +2224,9 @@ await locator.scrollIntoViewIfNeeded(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2213,6 +2288,9 @@ element.selectOption(['red', 'green', 'blue']);
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2252,6 +2330,9 @@ await locator.selectText(options);
- `force` [boolean] *(optional)*#
Whether to bypass the [actionability](../actionability.mdx) checks. Defaults to `false`.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2300,6 +2381,9 @@ await page.getByRole('checkbox').setChecked(true);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2376,6 +2460,9 @@ await page.getByLabel('Upload file').setInputFiles({
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2431,6 +2518,9 @@ await locator.tap(options);
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2479,6 +2569,9 @@ await locator.textContent(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2541,6 +2634,9 @@ await page.getByRole('checkbox').uncheck();
- `scroll` "auto" | "none" *(optional)* Added in: v1.62#
Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2583,6 +2679,9 @@ await orderSent.waitFor();
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `state` "attached" | "detached" | "visible" | "hidden" *(optional)*#
Defaults to `'visible'`. Can be either:
@@ -2637,6 +2736,9 @@ await page.getByTestId('status').waitForFunction((element, value) => {
Optional argument to pass to [pageFunction](/api/class-locator.mdx#locator-wait-for-function-option-expression).
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `timeout` [number] *(optional)*#
Maximum time to wait for 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.
@@ -2670,6 +2772,9 @@ await locator.elementHandle(options);
**Arguments**
- `options` [Object] *(optional)*
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
@@ -2736,6 +2841,9 @@ To press a special key, like `Control` or `ArrowDown`, use [locator.press()](/ap
This option has no effect.
+ - `signal` [AbortSignal] *(optional)* Added in: v1.61#
+
+ Allows to cancel the operation using an [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout, which can be changed using [browserContext.setDefaultTimeout()](/api/class-browsercontext.mdx#browser-context-set-default-timeout) or [page.setDefaultTimeout()](/api/class-page.mdx#page-set-default-timeout); pass `timeout: 0` to disable the timeout entirely.
- `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.
diff --git a/nodejs/docs/api/class-page.mdx b/nodejs/docs/api/class-page.mdx
index ef02dd82d7..61c004a586 100644
--- a/nodejs/docs/api/class-page.mdx
+++ b/nodejs/docs/api/class-page.mdx
@@ -281,6 +281,9 @@ await page.ariaSnapshot(options);
- `mode` "ai" | "default" *(optional)*#
When set to `"ai"`, returns a snapshot optimized for AI consumption: including element references like `[ref=e2]` and snapshots of `