venetian 0.2.0-aarch64-linux → 0.2.2-aarch64-linux

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -1
  3. data/exe/aarch64-linux/LICENSE +202 -202
  4. data/exe/aarch64-linux/node +0 -0
  5. data/exe/aarch64-linux/package/browsers.json +12 -18
  6. data/exe/aarch64-linux/package/lib/bootstrap.js +1 -1
  7. data/exe/aarch64-linux/package/lib/coreBundle.js +11344 -9900
  8. data/exe/aarch64-linux/package/lib/server/electron/loader.js +5 -2
  9. data/exe/aarch64-linux/package/lib/serverRegistry.js +5 -1
  10. data/exe/aarch64-linux/package/lib/tools/cli-client/help.json +21 -6
  11. data/exe/aarch64-linux/package/lib/tools/cli-client/program.js +1 -1
  12. data/exe/aarch64-linux/package/lib/tools/cli-client/session.js +4 -0
  13. data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/SKILL.md +21 -5
  14. data/exe/aarch64-linux/package/lib/tools/{cli-client/skill/references/spec-driven-testing.md → skills/playwright-cli/references/test-generation.md} +135 -7
  15. data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/SKILL.md +143 -0
  16. data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/gallery-spec.md +144 -0
  17. data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/migration.md +85 -0
  18. data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/react.md +67 -0
  19. data/exe/aarch64-linux/package/lib/tools/skills/playwright-component-testing/references/vue.md +75 -0
  20. data/exe/aarch64-linux/package/lib/tools/utils/extension.js +31 -8
  21. data/exe/aarch64-linux/package/lib/utilsBundle.js +37698 -33670
  22. data/exe/aarch64-linux/package/lib/utilsBundle.js.LICENSE +391 -268
  23. data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-CyWAfh-p.js +11 -0
  24. data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-DhC616m4.css +1 -0
  25. data/exe/aarch64-linux/package/lib/vite/dashboard/index.html +2 -2
  26. data/exe/aarch64-linux/package/lib/vite/htmlReport/report.css +2 -1
  27. data/exe/aarch64-linux/package/lib/vite/htmlReport/report.js +15 -55
  28. data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule--QdMvsKi.css +1 -0
  29. data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-CwYYHbcZ.js +32 -0
  30. data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-DYjdXIbE.js +129 -0
  31. data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-l_lX622x.css +1 -0
  32. data/exe/aarch64-linux/package/lib/vite/recorder/index.html +2 -2
  33. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-rXmQmLUY.js +32 -0
  34. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-B-dXF5JN.js +181 -0
  35. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/urlMatch-L3liM589.js +1 -0
  36. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-BuZfJS5v.js +7 -0
  37. data/exe/aarch64-linux/package/lib/vite/traceViewer/codeMirrorModule.-QdMvsKi.css +1 -0
  38. data/exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.BLFoOugd.css +1 -0
  39. data/exe/aarch64-linux/package/lib/vite/traceViewer/index.B_TqY17P.css +1 -0
  40. data/exe/aarch64-linux/package/lib/vite/traceViewer/index.KZ4wOW1K.js +1 -0
  41. data/exe/aarch64-linux/package/lib/vite/traceViewer/index.html +5 -5
  42. data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.B_Jk1wbt.js +1 -0
  43. data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.html +2 -2
  44. data/exe/aarch64-linux/package/lib/vite/traceViewer/sw.bundle.js +3 -4
  45. data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.C7UW1sC9.css +1 -0
  46. data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.Dzuouizj.js +5 -0
  47. data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.html +5 -5
  48. data/exe/aarch64-linux/package/lib/vite/traceViewer/xtermModule.kHJ-D0s7.css +1 -0
  49. data/exe/aarch64-linux/package/lib/webp_codec.LICENSE +173 -0
  50. data/exe/aarch64-linux/package/lib/webp_codec.wasm +0 -0
  51. data/exe/aarch64-linux/package/lib/xdg-open +338 -137
  52. data/exe/aarch64-linux/package/package.json +2 -2
  53. data/exe/aarch64-linux/package/types/protocol.d.ts +249 -36
  54. data/exe/aarch64-linux/package/types/structs.d.ts +8 -1
  55. data/exe/aarch64-linux/package/types/types.d.ts +2009 -266
  56. data/lib/venetian/executable.rb +6 -2
  57. data/lib/venetian/upstream.rb +35 -18
  58. data/lib/venetian/version.rb +2 -2
  59. metadata +41 -38
  60. data/exe/aarch64-linux/package/api.json +0 -1
  61. data/exe/aarch64-linux/package/lib/server/deviceDescriptorsSource.json +0 -2739
  62. data/exe/aarch64-linux/package/lib/tools/cli-client/skill/references/test-generation.md +0 -134
  63. data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-BY2S1tHT.css +0 -1
  64. data/exe/aarch64-linux/package/lib/vite/dashboard/assets/index-C_5TMfeg.js +0 -52
  65. data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-DYBRYzYX.css +0 -1
  66. data/exe/aarch64-linux/package/lib/vite/recorder/assets/codeMirrorModule-DeBYQozu.js +0 -32
  67. data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-4ZiSSCmn.css +0 -1
  68. data/exe/aarch64-linux/package/lib/vite/recorder/assets/index-Bq-mQf8S.js +0 -193
  69. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/codeMirrorModule-LEHpjmcn.js +0 -32
  70. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/defaultSettingsView-BNmKHKpQ.js +0 -264
  71. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/urlMatch-BYQrIQwR.js +0 -1
  72. data/exe/aarch64-linux/package/lib/vite/traceViewer/assets/xtermModule-CsJ4vdCR.js +0 -9
  73. data/exe/aarch64-linux/package/lib/vite/traceViewer/codeMirrorModule.DYBRYzYX.css +0 -1
  74. data/exe/aarch64-linux/package/lib/vite/traceViewer/defaultSettingsView.CjdS-WJx.css +0 -1
  75. data/exe/aarch64-linux/package/lib/vite/traceViewer/index.CzXZzn5A.css +0 -1
  76. data/exe/aarch64-linux/package/lib/vite/traceViewer/index.DMMX1gXU.js +0 -2
  77. data/exe/aarch64-linux/package/lib/vite/traceViewer/snapshot.v8KI4P3m.js +0 -2
  78. data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.BZQ54Kgt.css +0 -1
  79. data/exe/aarch64-linux/package/lib/vite/traceViewer/uiMode.Ut8wwJNp.js +0 -6
  80. data/exe/aarch64-linux/package/lib/vite/traceViewer/xtermModule.DYP7pi_n.css +0 -32
  81. data/exe/aarch64-linux/package/protocol.yml +0 -4991
  82. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/element-attributes.md +0 -0
  83. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/playwright-tests.md +0 -0
  84. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/request-mocking.md +0 -0
  85. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/running-code.md +0 -0
  86. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/session-management.md +0 -0
  87. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/storage-state.md +0 -0
  88. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/tracing.md +0 -0
  89. /data/exe/aarch64-linux/package/lib/tools/{cli-client/skill → skills/playwright-cli}/references/video-recording.md +0 -0
  90. /data/exe/aarch64-linux/package/lib/tools/{trace → skills/playwright-trace}/SKILL.md +0 -0
@@ -87,14 +87,15 @@ export interface Page {
87
87
  * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
88
88
  *
89
89
  * If the function passed to the
90
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
91
- * then [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait for
92
- * the promise to resolve and return its value.
90
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
91
+ * [Promise], then
92
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait
93
+ * for the promise to resolve and return its value.
93
94
  *
94
95
  * If the function passed to the
95
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
96
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
96
97
  * non-[Serializable] value, then
97
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
98
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
98
99
  * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
99
100
  * `-0`, `NaN`, `Infinity`, `-Infinity`.
100
101
  *
@@ -118,7 +119,7 @@ export interface Page {
118
119
  * ```
119
120
  *
120
121
  * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
121
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
122
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate):
122
123
  *
123
124
  * ```js
124
125
  * const bodyHandle = await page.evaluateHandle('document.body');
@@ -131,21 +132,23 @@ export interface Page {
131
132
  * @param pageFunction Function to be evaluated in the page context.
132
133
  * @param arg Optional argument to pass to
133
134
  * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
135
+ * @param options
134
136
  */
135
- evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
137
+ evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: { exposeFunctions?: boolean }): Promise<R>;
136
138
  /**
137
139
  * Returns the value of the
138
140
  * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression) invocation.
139
141
  *
140
142
  * If the function passed to the
141
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a [Promise],
142
- * then [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait for
143
- * the promise to resolve and return its value.
143
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
144
+ * [Promise], then
145
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) would wait
146
+ * for the promise to resolve and return its value.
144
147
  *
145
148
  * If the function passed to the
146
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
149
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) returns a
147
150
  * non-[Serializable] value, then
148
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
151
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) resolves to
149
152
  * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
150
153
  * `-0`, `NaN`, `Infinity`, `-Infinity`.
151
154
  *
@@ -169,7 +172,7 @@ export interface Page {
169
172
  * ```
170
173
  *
171
174
  * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
172
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate):
175
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate):
173
176
  *
174
177
  * ```js
175
178
  * const bodyHandle = await page.evaluateHandle('document.body');
@@ -182,8 +185,9 @@ export interface Page {
182
185
  * @param pageFunction Function to be evaluated in the page context.
183
186
  * @param arg Optional argument to pass to
184
187
  * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-option-expression).
188
+ * @param options
185
189
  */
186
- evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
190
+ evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: { exposeFunctions?: boolean }): Promise<R>;
187
191
 
188
192
  /**
189
193
  * Returns the value of the
@@ -191,16 +195,17 @@ export interface Page {
191
195
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
192
196
  *
193
197
  * The only difference between
194
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
195
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
196
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
197
- * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
198
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) and
199
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
200
+ * is that
201
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
202
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
198
203
  *
199
204
  * If the function passed to the
200
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
201
- * a [Promise], then
202
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) would
203
- * wait for the promise to resolve and return its value.
205
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
206
+ * returns a [Promise], then
207
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
208
+ * would wait for the promise to resolve and return its value.
204
209
  *
205
210
  * **Usage**
206
211
  *
@@ -216,7 +221,7 @@ export interface Page {
216
221
  * ```
217
222
  *
218
223
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
219
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
224
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
220
225
  *
221
226
  * ```js
222
227
  * const aHandle = await page.evaluateHandle(() => document.body);
@@ -228,24 +233,26 @@ export interface Page {
228
233
  * @param pageFunction Function to be evaluated in the page context.
229
234
  * @param arg Optional argument to pass to
230
235
  * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
236
+ * @param options
231
237
  */
232
- evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
238
+ evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: { exposeFunctions?: boolean }): Promise<SmartHandle<R>>;
233
239
  /**
234
240
  * Returns the value of the
235
241
  * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression) invocation as a
236
242
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
237
243
  *
238
244
  * The only difference between
239
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
240
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) is that
241
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
242
- * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
245
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) and
246
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
247
+ * is that
248
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
249
+ * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
243
250
  *
244
251
  * If the function passed to the
245
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) returns
246
- * a [Promise], then
247
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) would
248
- * wait for the promise to resolve and return its value.
252
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
253
+ * returns a [Promise], then
254
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
255
+ * would wait for the promise to resolve and return its value.
249
256
  *
250
257
  * **Usage**
251
258
  *
@@ -261,7 +268,7 @@ export interface Page {
261
268
  * ```
262
269
  *
263
270
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
264
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
271
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle):
265
272
  *
266
273
  * ```js
267
274
  * const aHandle = await page.evaluateHandle(() => document.body);
@@ -273,8 +280,9 @@ export interface Page {
273
280
  * @param pageFunction Function to be evaluated in the page context.
274
281
  * @param arg Optional argument to pass to
275
282
  * [`pageFunction`](https://playwright.dev/docs/api/class-page#page-evaluate-handle-option-expression).
283
+ * @param options
276
284
  */
277
- evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
285
+ evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: { exposeFunctions?: boolean }): Promise<SmartHandle<R>>;
278
286
 
279
287
  /**
280
288
  * Adds a script which would be evaluated in one of the following scenarios:
@@ -306,16 +314,17 @@ export interface Page {
306
314
  * ```
307
315
  *
308
316
  * **NOTE** The order of evaluation of multiple scripts installed via
309
- * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
310
- * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
311
- * defined.
317
+ * [browserContext.addInitScript(script[, arg, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
318
+ * and [page.addInitScript(script[, arg, options])](https://playwright.dev/docs/api/class-page#page-add-init-script)
319
+ * is not defined.
312
320
  *
313
321
  * @param script Script to be evaluated in the page.
314
322
  * @param arg Optional argument to pass to
315
323
  * [`script`](https://playwright.dev/docs/api/class-page#page-add-init-script-option-script) (only supported when
316
324
  * passing a function).
325
+ * @param options
317
326
  */
318
- addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<Disposable>;
327
+ addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg, options?: { exposeFunctions?: boolean }): Promise<Disposable>;
319
328
 
320
329
  /**
321
330
  * **NOTE** Use locator-based [page.locator(selector[, options])](https://playwright.dev/docs/api/class-page#page-locator)
@@ -2070,6 +2079,17 @@ export interface Page {
2070
2079
  */
2071
2080
  mode?: "ai"|"default";
2072
2081
 
2082
+ /**
2083
+ * Allows to cancel the operation using an
2084
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2085
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2086
+ * which can be changed using
2087
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2088
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2089
+ * `timeout: 0` to disable the timeout entirely.
2090
+ */
2091
+ signal?: AbortSignal;
2092
+
2073
2093
  /**
2074
2094
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
2075
2095
  * option in the config, or by using the
@@ -2138,6 +2158,25 @@ export interface Page {
2138
2158
  y: number;
2139
2159
  };
2140
2160
 
2161
+ /**
2162
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
2163
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
2164
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
2165
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
2166
+ */
2167
+ scroll?: "auto"|"none";
2168
+
2169
+ /**
2170
+ * Allows to cancel the operation using an
2171
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2172
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2173
+ * which can be changed using
2174
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2175
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2176
+ * `timeout: 0` to disable the timeout entirely.
2177
+ */
2178
+ signal?: AbortSignal;
2179
+
2141
2180
  /**
2142
2181
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2143
2182
  * element, the call throws an exception.
@@ -2245,6 +2284,25 @@ export interface Page {
2245
2284
  y: number;
2246
2285
  };
2247
2286
 
2287
+ /**
2288
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
2289
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
2290
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
2291
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
2292
+ */
2293
+ scroll?: "auto"|"none";
2294
+
2295
+ /**
2296
+ * Allows to cancel the operation using an
2297
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2298
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2299
+ * which can be changed using
2300
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2301
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2302
+ * `timeout: 0` to disable the timeout entirely.
2303
+ */
2304
+ signal?: AbortSignal;
2305
+
2248
2306
  /**
2249
2307
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2250
2308
  * element, the call throws an exception.
@@ -2384,6 +2442,25 @@ export interface Page {
2384
2442
  y: number;
2385
2443
  };
2386
2444
 
2445
+ /**
2446
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
2447
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
2448
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
2449
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
2450
+ */
2451
+ scroll?: "auto"|"none";
2452
+
2453
+ /**
2454
+ * Allows to cancel the operation using an
2455
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2456
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2457
+ * which can be changed using
2458
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2459
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2460
+ * `timeout: 0` to disable the timeout entirely.
2461
+ */
2462
+ signal?: AbortSignal;
2463
+
2387
2464
  /**
2388
2465
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2389
2466
  * element, the call throws an exception.
@@ -2455,6 +2532,17 @@ export interface Page {
2455
2532
  * @param options
2456
2533
  */
2457
2534
  dispatchEvent(selector: string, type: string, eventInit?: EvaluationArgument, options?: {
2535
+ /**
2536
+ * Allows to cancel the operation using an
2537
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2538
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2539
+ * which can be changed using
2540
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2541
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2542
+ * `timeout: 0` to disable the timeout entirely.
2543
+ */
2544
+ signal?: AbortSignal;
2545
+
2458
2546
  /**
2459
2547
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2460
2548
  * element, the call throws an exception.
@@ -2503,6 +2591,25 @@ export interface Page {
2503
2591
  */
2504
2592
  noWaitAfter?: boolean;
2505
2593
 
2594
+ /**
2595
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
2596
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
2597
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
2598
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
2599
+ */
2600
+ scroll?: "auto"|"none";
2601
+
2602
+ /**
2603
+ * Allows to cancel the operation using an
2604
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2605
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2606
+ * which can be changed using
2607
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2608
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2609
+ * `timeout: 0` to disable the timeout entirely.
2610
+ */
2611
+ signal?: AbortSignal;
2612
+
2506
2613
  /**
2507
2614
  * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
2508
2615
  * specified, some visible point of the element is used.
@@ -2702,6 +2809,17 @@ export interface Page {
2702
2809
  */
2703
2810
  noWaitAfter?: boolean;
2704
2811
 
2812
+ /**
2813
+ * Allows to cancel the operation using an
2814
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2815
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2816
+ * which can be changed using
2817
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2818
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2819
+ * `timeout: 0` to disable the timeout entirely.
2820
+ */
2821
+ signal?: AbortSignal;
2822
+
2705
2823
  /**
2706
2824
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2707
2825
  * element, the call throws an exception.
@@ -2730,6 +2848,17 @@ export interface Page {
2730
2848
  * @param options
2731
2849
  */
2732
2850
  focus(selector: string, options?: {
2851
+ /**
2852
+ * Allows to cancel the operation using an
2853
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2854
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2855
+ * which can be changed using
2856
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2857
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2858
+ * `timeout: 0` to disable the timeout entirely.
2859
+ */
2860
+ signal?: AbortSignal;
2861
+
2733
2862
  /**
2734
2863
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2735
2864
  * element, the call throws an exception.
@@ -2807,6 +2936,17 @@ export interface Page {
2807
2936
  * @param options
2808
2937
  */
2809
2938
  getAttribute(selector: string, name: string, options?: {
2939
+ /**
2940
+ * Allows to cancel the operation using an
2941
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
2942
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
2943
+ * which can be changed using
2944
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
2945
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
2946
+ * `timeout: 0` to disable the timeout entirely.
2947
+ */
2948
+ signal?: AbortSignal;
2949
+
2810
2950
  /**
2811
2951
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
2812
2952
  * element, the call throws an exception.
@@ -3152,9 +3292,27 @@ export interface Page {
3152
3292
  * the last redirect. If cannot go back, returns `null`.
3153
3293
  *
3154
3294
  * Navigate to the previous page in history.
3295
+ *
3296
+ * **NOTE** **Testing Back/Forward Cache (BFCache) is not supported.** By default, Playwright disables the
3297
+ * Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on
3298
+ * network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using
3299
+ * `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized
3300
+ * `Page` state.
3301
+ *
3155
3302
  * @param options
3156
3303
  */
3157
3304
  goBack(options?: {
3305
+ /**
3306
+ * Allows to cancel the operation using an
3307
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3308
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3309
+ * which can be changed using
3310
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3311
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3312
+ * `timeout: 0` to disable the timeout entirely.
3313
+ */
3314
+ signal?: AbortSignal;
3315
+
3158
3316
  /**
3159
3317
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3160
3318
  * `navigationTimeout` option in the config, or by using the
@@ -3182,9 +3340,27 @@ export interface Page {
3182
3340
  * the last redirect. If cannot go forward, returns `null`.
3183
3341
  *
3184
3342
  * Navigate to the next page in history.
3343
+ *
3344
+ * **NOTE** **Testing Back/Forward Cache (BFCache) is not supported.** By default, Playwright disables the
3345
+ * Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on
3346
+ * network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using
3347
+ * `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized
3348
+ * `Page` state.
3349
+ *
3185
3350
  * @param options
3186
3351
  */
3187
3352
  goForward(options?: {
3353
+ /**
3354
+ * Allows to cancel the operation using an
3355
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3356
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3357
+ * which can be changed using
3358
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3359
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3360
+ * `timeout: 0` to disable the timeout entirely.
3361
+ */
3362
+ signal?: AbortSignal;
3363
+
3188
3364
  /**
3189
3365
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3190
3366
  * `navigationTimeout` option in the config, or by using the
@@ -3242,6 +3418,17 @@ export interface Page {
3242
3418
  */
3243
3419
  referer?: string;
3244
3420
 
3421
+ /**
3422
+ * Allows to cancel the operation using an
3423
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3424
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3425
+ * which can be changed using
3426
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3427
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3428
+ * `timeout: 0` to disable the timeout entirely.
3429
+ */
3430
+ signal?: AbortSignal;
3431
+
3245
3432
  /**
3246
3433
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3247
3434
  * `navigationTimeout` option in the config, or by using the
@@ -3323,6 +3510,25 @@ export interface Page {
3323
3510
  y: number;
3324
3511
  };
3325
3512
 
3513
+ /**
3514
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
3515
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
3516
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
3517
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
3518
+ */
3519
+ scroll?: "auto"|"none";
3520
+
3521
+ /**
3522
+ * Allows to cancel the operation using an
3523
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3524
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3525
+ * which can be changed using
3526
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3527
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3528
+ * `timeout: 0` to disable the timeout entirely.
3529
+ */
3530
+ signal?: AbortSignal;
3531
+
3326
3532
  /**
3327
3533
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3328
3534
  * element, the call throws an exception.
@@ -3356,6 +3562,17 @@ export interface Page {
3356
3562
  * @param options
3357
3563
  */
3358
3564
  innerHTML(selector: string, options?: {
3565
+ /**
3566
+ * Allows to cancel the operation using an
3567
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3568
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3569
+ * which can be changed using
3570
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3571
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3572
+ * `timeout: 0` to disable the timeout entirely.
3573
+ */
3574
+ signal?: AbortSignal;
3575
+
3359
3576
  /**
3360
3577
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3361
3578
  * element, the call throws an exception.
@@ -3381,6 +3598,17 @@ export interface Page {
3381
3598
  * @param options
3382
3599
  */
3383
3600
  innerText(selector: string, options?: {
3601
+ /**
3602
+ * Allows to cancel the operation using an
3603
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3604
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3605
+ * which can be changed using
3606
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3607
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3608
+ * `timeout: 0` to disable the timeout entirely.
3609
+ */
3610
+ signal?: AbortSignal;
3611
+
3384
3612
  /**
3385
3613
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3386
3614
  * element, the call throws an exception.
@@ -3411,6 +3639,17 @@ export interface Page {
3411
3639
  * @param options
3412
3640
  */
3413
3641
  inputValue(selector: string, options?: {
3642
+ /**
3643
+ * Allows to cancel the operation using an
3644
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3645
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3646
+ * which can be changed using
3647
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3648
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3649
+ * `timeout: 0` to disable the timeout entirely.
3650
+ */
3651
+ signal?: AbortSignal;
3652
+
3414
3653
  /**
3415
3654
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3416
3655
  * element, the call throws an exception.
@@ -3436,6 +3675,17 @@ export interface Page {
3436
3675
  * @param options
3437
3676
  */
3438
3677
  isChecked(selector: string, options?: {
3678
+ /**
3679
+ * Allows to cancel the operation using an
3680
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3681
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3682
+ * which can be changed using
3683
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3684
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3685
+ * `timeout: 0` to disable the timeout entirely.
3686
+ */
3687
+ signal?: AbortSignal;
3688
+
3439
3689
  /**
3440
3690
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3441
3691
  * element, the call throws an exception.
@@ -3467,6 +3717,17 @@ export interface Page {
3467
3717
  * @param options
3468
3718
  */
3469
3719
  isDisabled(selector: string, options?: {
3720
+ /**
3721
+ * Allows to cancel the operation using an
3722
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3723
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3724
+ * which can be changed using
3725
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3726
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3727
+ * `timeout: 0` to disable the timeout entirely.
3728
+ */
3729
+ signal?: AbortSignal;
3730
+
3470
3731
  /**
3471
3732
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3472
3733
  * element, the call throws an exception.
@@ -3493,6 +3754,17 @@ export interface Page {
3493
3754
  * @param options
3494
3755
  */
3495
3756
  isEditable(selector: string, options?: {
3757
+ /**
3758
+ * Allows to cancel the operation using an
3759
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3760
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3761
+ * which can be changed using
3762
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3763
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3764
+ * `timeout: 0` to disable the timeout entirely.
3765
+ */
3766
+ signal?: AbortSignal;
3767
+
3496
3768
  /**
3497
3769
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3498
3770
  * element, the call throws an exception.
@@ -3518,6 +3790,17 @@ export interface Page {
3518
3790
  * @param options
3519
3791
  */
3520
3792
  isEnabled(selector: string, options?: {
3793
+ /**
3794
+ * Allows to cancel the operation using an
3795
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
3796
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
3797
+ * which can be changed using
3798
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
3799
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
3800
+ * `timeout: 0` to disable the timeout entirely.
3801
+ */
3802
+ signal?: AbortSignal;
3803
+
3521
3804
  /**
3522
3805
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3523
3806
  * element, the call throws an exception.
@@ -3912,6 +4195,17 @@ export interface Page {
3912
4195
  */
3913
4196
  noWaitAfter?: boolean;
3914
4197
 
4198
+ /**
4199
+ * Allows to cancel the operation using an
4200
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4201
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4202
+ * which can be changed using
4203
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4204
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4205
+ * `timeout: 0` to disable the timeout entirely.
4206
+ */
4207
+ signal?: AbortSignal;
4208
+
3915
4209
  /**
3916
4210
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
3917
4211
  * element, the call throws an exception.
@@ -3934,6 +4228,17 @@ export interface Page {
3934
4228
  * @param options
3935
4229
  */
3936
4230
  reload(options?: {
4231
+ /**
4232
+ * Allows to cancel the operation using an
4233
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4234
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4235
+ * which can be changed using
4236
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4237
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4238
+ * `timeout: 0` to disable the timeout entirely.
4239
+ */
4240
+ signal?: AbortSignal;
4241
+
3937
4242
  /**
3938
4243
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
3939
4244
  * `navigationTimeout` option in the config, or by using the
@@ -4240,6 +4545,17 @@ export interface Page {
4240
4545
  */
4241
4546
  noWaitAfter?: boolean;
4242
4547
 
4548
+ /**
4549
+ * Allows to cancel the operation using an
4550
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4551
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4552
+ * which can be changed using
4553
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4554
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4555
+ * `timeout: 0` to disable the timeout entirely.
4556
+ */
4557
+ signal?: AbortSignal;
4558
+
4243
4559
  /**
4244
4560
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4245
4561
  * element, the call throws an exception.
@@ -4306,6 +4622,25 @@ export interface Page {
4306
4622
  y: number;
4307
4623
  };
4308
4624
 
4625
+ /**
4626
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
4627
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
4628
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
4629
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
4630
+ */
4631
+ scroll?: "auto"|"none";
4632
+
4633
+ /**
4634
+ * Allows to cancel the operation using an
4635
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4636
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4637
+ * which can be changed using
4638
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4639
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4640
+ * `timeout: 0` to disable the timeout entirely.
4641
+ */
4642
+ signal?: AbortSignal;
4643
+
4309
4644
  /**
4310
4645
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4311
4646
  * element, the call throws an exception.
@@ -4334,6 +4669,17 @@ export interface Page {
4334
4669
  * @param options
4335
4670
  */
4336
4671
  setContent(html: string, options?: {
4672
+ /**
4673
+ * Allows to cancel the operation using an
4674
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4675
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4676
+ * which can be changed using
4677
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4678
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4679
+ * `timeout: 0` to disable the timeout entirely.
4680
+ */
4681
+ signal?: AbortSignal;
4682
+
4337
4683
  /**
4338
4684
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
4339
4685
  * `navigationTimeout` option in the config, or by using the
@@ -4457,6 +4803,17 @@ export interface Page {
4457
4803
  */
4458
4804
  noWaitAfter?: boolean;
4459
4805
 
4806
+ /**
4807
+ * Allows to cancel the operation using an
4808
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4809
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4810
+ * which can be changed using
4811
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4812
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4813
+ * `timeout: 0` to disable the timeout entirely.
4814
+ */
4815
+ signal?: AbortSignal;
4816
+
4460
4817
  /**
4461
4818
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4462
4819
  * element, the call throws an exception.
@@ -4567,6 +4924,25 @@ export interface Page {
4567
4924
  y: number;
4568
4925
  };
4569
4926
 
4927
+ /**
4928
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
4929
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
4930
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
4931
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
4932
+ */
4933
+ scroll?: "auto"|"none";
4934
+
4935
+ /**
4936
+ * Allows to cancel the operation using an
4937
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4938
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4939
+ * which can be changed using
4940
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4941
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4942
+ * `timeout: 0` to disable the timeout entirely.
4943
+ */
4944
+ signal?: AbortSignal;
4945
+
4570
4946
  /**
4571
4947
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4572
4948
  * element, the call throws an exception.
@@ -4601,6 +4977,17 @@ export interface Page {
4601
4977
  * @param options
4602
4978
  */
4603
4979
  textContent(selector: string, options?: {
4980
+ /**
4981
+ * Allows to cancel the operation using an
4982
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
4983
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
4984
+ * which can be changed using
4985
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
4986
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
4987
+ * `timeout: 0` to disable the timeout entirely.
4988
+ */
4989
+ signal?: AbortSignal;
4990
+
4604
4991
  /**
4605
4992
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4606
4993
  * element, the call throws an exception.
@@ -4651,6 +5038,17 @@ export interface Page {
4651
5038
  */
4652
5039
  noWaitAfter?: boolean;
4653
5040
 
5041
+ /**
5042
+ * Allows to cancel the operation using an
5043
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
5044
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
5045
+ * which can be changed using
5046
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
5047
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
5048
+ * `timeout: 0` to disable the timeout entirely.
5049
+ */
5050
+ signal?: AbortSignal;
5051
+
4654
5052
  /**
4655
5053
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4656
5054
  * element, the call throws an exception.
@@ -4715,6 +5113,25 @@ export interface Page {
4715
5113
  y: number;
4716
5114
  };
4717
5115
 
5116
+ /**
5117
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
5118
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
5119
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
5120
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
5121
+ */
5122
+ scroll?: "auto"|"none";
5123
+
5124
+ /**
5125
+ * Allows to cancel the operation using an
5126
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
5127
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
5128
+ * which can be changed using
5129
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
5130
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
5131
+ * `timeout: 0` to disable the timeout entirely.
5132
+ */
5133
+ signal?: AbortSignal;
5134
+
4718
5135
  /**
4719
5136
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
4720
5137
  * element, the call throws an exception.
@@ -4787,7 +5204,7 @@ export interface Page {
4787
5204
  /**
4788
5205
  * Emitted when the page closes.
4789
5206
  */
4790
- waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
5207
+ waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4791
5208
 
4792
5209
  /**
4793
5210
  * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
@@ -4808,7 +5225,7 @@ export interface Page {
4808
5225
  * ```
4809
5226
  *
4810
5227
  */
4811
- waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
5228
+ waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
4812
5229
 
4813
5230
  /**
4814
5231
  * Emitted when the page crashes. Browser pages might crash if they try to allocate too much memory. When the page
@@ -4828,7 +5245,7 @@ export interface Page {
4828
5245
  * ```
4829
5246
  *
4830
5247
  */
4831
- waitForEvent(event: 'crash', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
5248
+ waitForEvent(event: 'crash', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4832
5249
 
4833
5250
  /**
4834
5251
  * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
@@ -4848,19 +5265,19 @@ export interface Page {
4848
5265
  * listeners are present, all dialogs are automatically dismissed.
4849
5266
  *
4850
5267
  */
4851
- waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
5268
+ waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
4852
5269
 
4853
5270
  /**
4854
5271
  * Emitted when the JavaScript
4855
5272
  * [`DOMContentLoaded`](https://developer.mozilla.org/en-US/docs/Web/Events/DOMContentLoaded) event is dispatched.
4856
5273
  */
4857
- waitForEvent(event: 'domcontentloaded', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
5274
+ waitForEvent(event: 'domcontentloaded', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4858
5275
 
4859
5276
  /**
4860
5277
  * Emitted when attachment download started. User can access basic file operations on downloaded content via the
4861
5278
  * passed [Download](https://playwright.dev/docs/api/class-download) instance.
4862
5279
  */
4863
- waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
5280
+ waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
4864
5281
 
4865
5282
  /**
4866
5283
  * Emitted when a file chooser is supposed to appear, such as after clicking the `<input type=file>`. Playwright can
@@ -4875,27 +5292,27 @@ export interface Page {
4875
5292
  * ```
4876
5293
  *
4877
5294
  */
4878
- waitForEvent(event: 'filechooser', optionsOrPredicate?: { predicate?: (fileChooser: FileChooser) => boolean | Promise<boolean>, timeout?: number } | ((fileChooser: FileChooser) => boolean | Promise<boolean>)): Promise<FileChooser>;
5295
+ waitForEvent(event: 'filechooser', optionsOrPredicate?: { predicate?: (fileChooser: FileChooser) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((fileChooser: FileChooser) => boolean | Promise<boolean>)): Promise<FileChooser>;
4879
5296
 
4880
5297
  /**
4881
5298
  * Emitted when a frame is attached.
4882
5299
  */
4883
- waitForEvent(event: 'frameattached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
5300
+ waitForEvent(event: 'frameattached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4884
5301
 
4885
5302
  /**
4886
5303
  * Emitted when a frame is detached.
4887
5304
  */
4888
- waitForEvent(event: 'framedetached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
5305
+ waitForEvent(event: 'framedetached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4889
5306
 
4890
5307
  /**
4891
5308
  * Emitted when a frame is navigated to a new url.
4892
5309
  */
4893
- waitForEvent(event: 'framenavigated', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
5310
+ waitForEvent(event: 'framenavigated', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
4894
5311
 
4895
5312
  /**
4896
5313
  * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched.
4897
5314
  */
4898
- waitForEvent(event: 'load', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
5315
+ waitForEvent(event: 'load', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4899
5316
 
4900
5317
  /**
4901
5318
  * Emitted when an uncaught exception happens within the page.
@@ -4911,7 +5328,7 @@ export interface Page {
4911
5328
  * ```
4912
5329
  *
4913
5330
  */
4914
- waitForEvent(event: 'pageerror', optionsOrPredicate?: { predicate?: (error: Error) => boolean | Promise<boolean>, timeout?: number } | ((error: Error) => boolean | Promise<boolean>)): Promise<Error>;
5331
+ waitForEvent(event: 'pageerror', optionsOrPredicate?: { predicate?: (error: Error) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((error: Error) => boolean | Promise<boolean>)): Promise<Error>;
4915
5332
 
4916
5333
  /**
4917
5334
  * Emitted when the page opens a new tab or window. This event is emitted in addition to the
@@ -4940,14 +5357,14 @@ export interface Page {
4940
5357
  * wait until the page gets to a particular state (you should not need it in most cases).
4941
5358
  *
4942
5359
  */
4943
- waitForEvent(event: 'popup', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
5360
+ waitForEvent(event: 'popup', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
4944
5361
 
4945
5362
  /**
4946
5363
  * Emitted when a page issues a request. The [request] object is read-only. In order to intercept and mutate requests,
4947
5364
  * see [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route) or
4948
5365
  * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route).
4949
5366
  */
4950
- waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
5367
+ waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4951
5368
 
4952
5369
  /**
4953
5370
  * Emitted when a request fails, for example by timing out.
@@ -4966,30 +5383,30 @@ export interface Page {
4966
5383
  * error net::ERR_FAILED.
4967
5384
  *
4968
5385
  */
4969
- waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
5386
+ waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4970
5387
 
4971
5388
  /**
4972
5389
  * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
4973
5390
  * sequence of events is `request`, `response` and `requestfinished`.
4974
5391
  */
4975
- waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
5392
+ waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
4976
5393
 
4977
5394
  /**
4978
5395
  * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
4979
5396
  * events is `request`, `response` and `requestfinished`.
4980
5397
  */
4981
- waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
5398
+ waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
4982
5399
 
4983
5400
  /**
4984
5401
  * Emitted when [WebSocket](https://playwright.dev/docs/api/class-websocket) request is sent.
4985
5402
  */
4986
- waitForEvent(event: 'websocket', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
5403
+ waitForEvent(event: 'websocket', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
4987
5404
 
4988
5405
  /**
4989
5406
  * Emitted when a dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is spawned
4990
5407
  * by the page.
4991
5408
  */
4992
- waitForEvent(event: 'worker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
5409
+ waitForEvent(event: 'worker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
4993
5410
 
4994
5411
 
4995
5412
  /**
@@ -5026,6 +5443,16 @@ export interface Page {
5026
5443
  * @param options
5027
5444
  */
5028
5445
  waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
5446
+ /**
5447
+ * Allows to cancel the waiting using an
5448
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
5449
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
5450
+ * default timeout, which can be changed using
5451
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
5452
+ * pass `timeout: 0` to disable the timeout entirely.
5453
+ */
5454
+ signal?: AbortSignal;
5455
+
5029
5456
  /**
5030
5457
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
5031
5458
  * `navigationTimeout` option in the config, or by using the
@@ -5063,6 +5490,16 @@ export interface Page {
5063
5490
  * @param options
5064
5491
  */
5065
5492
  waitForNavigation(options?: {
5493
+ /**
5494
+ * Allows to cancel the waiting using an
5495
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
5496
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
5497
+ * default timeout, which can be changed using
5498
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
5499
+ * pass `timeout: 0` to disable the timeout entirely.
5500
+ */
5501
+ signal?: AbortSignal;
5502
+
5066
5503
  /**
5067
5504
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
5068
5505
  * `navigationTimeout` option in the config, or by using the
@@ -5116,6 +5553,16 @@ export interface Page {
5116
5553
  * @param options
5117
5554
  */
5118
5555
  waitForRequest(urlOrPredicate: string|RegExp|((request: Request) => boolean|Promise<boolean>), options?: {
5556
+ /**
5557
+ * Allows to cancel the waiting using an
5558
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
5559
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
5560
+ * default timeout, which can be changed using
5561
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
5562
+ * pass `timeout: 0` to disable the timeout entirely.
5563
+ */
5564
+ signal?: AbortSignal;
5565
+
5119
5566
  /**
5120
5567
  * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
5121
5568
  * be changed by using the
@@ -5152,6 +5599,16 @@ export interface Page {
5152
5599
  * @param options
5153
5600
  */
5154
5601
  waitForResponse(urlOrPredicate: string|RegExp|((response: Response) => boolean|Promise<boolean>), options?: {
5602
+ /**
5603
+ * Allows to cancel the waiting using an
5604
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
5605
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
5606
+ * default timeout, which can be changed using
5607
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
5608
+ * pass `timeout: 0` to disable the timeout entirely.
5609
+ */
5610
+ signal?: AbortSignal;
5611
+
5155
5612
  /**
5156
5613
  * Maximum wait time in milliseconds, defaults to 30 seconds, pass `0` to disable the timeout. The default value can
5157
5614
  * be changed by using the
@@ -5198,6 +5655,16 @@ export interface Page {
5198
5655
  * @param options
5199
5656
  */
5200
5657
  waitForURL(url: string|RegExp|URLPattern|((url: URL) => boolean), options?: {
5658
+ /**
5659
+ * Allows to cancel the waiting using an
5660
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
5661
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
5662
+ * default timeout, which can be changed using
5663
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
5664
+ * pass `timeout: 0` to disable the timeout entirely.
5665
+ */
5666
+ signal?: AbortSignal;
5667
+
5201
5668
  /**
5202
5669
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
5203
5670
  * `navigationTimeout` option in the config, or by using the
@@ -5342,14 +5809,15 @@ export interface Frame {
5342
5809
  * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5343
5810
  *
5344
5811
  * If the function passed to the
5345
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5346
- * [Promise], then [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate)
5347
- * would wait for the promise to resolve and return its value.
5812
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5813
+ * a [Promise], then
5814
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) would
5815
+ * wait for the promise to resolve and return its value.
5348
5816
  *
5349
5817
  * If the function passed to the
5350
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5351
- * non-[Serializable] value, then
5352
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5818
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5819
+ * a non-[Serializable] value, then
5820
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5353
5821
  * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
5354
5822
  * `-0`, `NaN`, `Infinity`, `-Infinity`.
5355
5823
  *
@@ -5369,7 +5837,7 @@ export interface Frame {
5369
5837
  * ```
5370
5838
  *
5371
5839
  * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
5372
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5840
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5373
5841
  *
5374
5842
  * ```js
5375
5843
  * const bodyHandle = await frame.evaluateHandle('document.body');
@@ -5382,21 +5850,23 @@ export interface Frame {
5382
5850
  * @param pageFunction Function to be evaluated in the page context.
5383
5851
  * @param arg Optional argument to pass to
5384
5852
  * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5853
+ * @param options
5385
5854
  */
5386
- evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<R>;
5855
+ evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: { exposeFunctions?: boolean }): Promise<R>;
5387
5856
  /**
5388
5857
  * Returns the return value of
5389
5858
  * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5390
5859
  *
5391
5860
  * If the function passed to the
5392
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5393
- * [Promise], then [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate)
5394
- * would wait for the promise to resolve and return its value.
5861
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5862
+ * a [Promise], then
5863
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) would
5864
+ * wait for the promise to resolve and return its value.
5395
5865
  *
5396
5866
  * If the function passed to the
5397
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns a
5398
- * non-[Serializable] value, then
5399
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5867
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5868
+ * a non-[Serializable] value, then
5869
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) returns
5400
5870
  * `undefined`. Playwright also supports transferring some additional values that are not serializable by `JSON`:
5401
5871
  * `-0`, `NaN`, `Infinity`, `-Infinity`.
5402
5872
  *
@@ -5416,7 +5886,7 @@ export interface Frame {
5416
5886
  * ```
5417
5887
  *
5418
5888
  * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle) instances can be passed as an argument to the
5419
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5889
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate):
5420
5890
  *
5421
5891
  * ```js
5422
5892
  * const bodyHandle = await frame.evaluateHandle('document.body');
@@ -5429,8 +5899,9 @@ export interface Frame {
5429
5899
  * @param pageFunction Function to be evaluated in the page context.
5430
5900
  * @param arg Optional argument to pass to
5431
5901
  * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-option-expression).
5902
+ * @param options
5432
5903
  */
5433
- evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<R>;
5904
+ evaluate<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: { exposeFunctions?: boolean }): Promise<R>;
5434
5905
 
5435
5906
  /**
5436
5907
  * Returns the return value of
@@ -5438,15 +5909,16 @@ export interface Frame {
5438
5909
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5439
5910
  *
5440
5911
  * The only difference between
5441
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5442
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
5443
- * that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5912
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5913
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5914
+ * is that
5915
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5444
5916
  * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5445
5917
  *
5446
5918
  * If the function, passed to the
5447
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5919
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5448
5920
  * returns a [Promise], then
5449
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5921
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5450
5922
  * would wait for the promise to resolve and return its value.
5451
5923
  *
5452
5924
  * **Usage**
@@ -5463,7 +5935,7 @@ export interface Frame {
5463
5935
  * ```
5464
5936
  *
5465
5937
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
5466
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5938
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5467
5939
  *
5468
5940
  * ```js
5469
5941
  * const aHandle = await frame.evaluateHandle(() => document.body);
@@ -5477,23 +5949,25 @@ export interface Frame {
5477
5949
  * @param pageFunction Function to be evaluated in the page context.
5478
5950
  * @param arg Optional argument to pass to
5479
5951
  * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
5952
+ * @param options
5480
5953
  */
5481
- evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
5954
+ evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg: Arg, options?: { exposeFunctions?: boolean }): Promise<SmartHandle<R>>;
5482
5955
  /**
5483
5956
  * Returns the return value of
5484
5957
  * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression) as a
5485
5958
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5486
5959
  *
5487
5960
  * The only difference between
5488
- * [frame.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5489
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle) is
5490
- * that [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5961
+ * [frame.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate) and
5962
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5963
+ * is that
5964
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5491
5965
  * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
5492
5966
  *
5493
5967
  * If the function, passed to the
5494
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5968
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle),
5495
5969
  * returns a [Promise], then
5496
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5970
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle)
5497
5971
  * would wait for the promise to resolve and return its value.
5498
5972
  *
5499
5973
  * **Usage**
@@ -5510,7 +5984,7 @@ export interface Frame {
5510
5984
  * ```
5511
5985
  *
5512
5986
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle) instances can be passed as an argument to the
5513
- * [frame.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5987
+ * [frame.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle):
5514
5988
  *
5515
5989
  * ```js
5516
5990
  * const aHandle = await frame.evaluateHandle(() => document.body);
@@ -5524,8 +5998,9 @@ export interface Frame {
5524
5998
  * @param pageFunction Function to be evaluated in the page context.
5525
5999
  * @param arg Optional argument to pass to
5526
6000
  * [`pageFunction`](https://playwright.dev/docs/api/class-frame#frame-evaluate-handle-option-expression).
6001
+ * @param options
5527
6002
  */
5528
- evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any): Promise<SmartHandle<R>>;
6003
+ evaluateHandle<R>(pageFunction: PageFunction<void, R>, arg?: any, options?: { exposeFunctions?: boolean }): Promise<SmartHandle<R>>;
5529
6004
 
5530
6005
  /**
5531
6006
  * **NOTE** Use locator-based [frame.locator(selector[, options])](https://playwright.dev/docs/api/class-frame#frame-locator)
@@ -6196,6 +6671,25 @@ export interface Frame {
6196
6671
  y: number;
6197
6672
  };
6198
6673
 
6674
+ /**
6675
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
6676
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
6677
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
6678
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
6679
+ */
6680
+ scroll?: "auto"|"none";
6681
+
6682
+ /**
6683
+ * Allows to cancel the operation using an
6684
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
6685
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
6686
+ * which can be changed using
6687
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6688
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
6689
+ * `timeout: 0` to disable the timeout entirely.
6690
+ */
6691
+ signal?: AbortSignal;
6692
+
6199
6693
  /**
6200
6694
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6201
6695
  * element, the call throws an exception.
@@ -6292,6 +6786,25 @@ export interface Frame {
6292
6786
  y: number;
6293
6787
  };
6294
6788
 
6789
+ /**
6790
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
6791
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
6792
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
6793
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
6794
+ */
6795
+ scroll?: "auto"|"none";
6796
+
6797
+ /**
6798
+ * Allows to cancel the operation using an
6799
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
6800
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
6801
+ * which can be changed using
6802
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6803
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
6804
+ * `timeout: 0` to disable the timeout entirely.
6805
+ */
6806
+ signal?: AbortSignal;
6807
+
6295
6808
  /**
6296
6809
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6297
6810
  * element, the call throws an exception.
@@ -6388,6 +6901,25 @@ export interface Frame {
6388
6901
  y: number;
6389
6902
  };
6390
6903
 
6904
+ /**
6905
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
6906
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
6907
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
6908
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
6909
+ */
6910
+ scroll?: "auto"|"none";
6911
+
6912
+ /**
6913
+ * Allows to cancel the operation using an
6914
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
6915
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
6916
+ * which can be changed using
6917
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
6918
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
6919
+ * `timeout: 0` to disable the timeout entirely.
6920
+ */
6921
+ signal?: AbortSignal;
6922
+
6391
6923
  /**
6392
6924
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6393
6925
  * element, the call throws an exception.
@@ -6459,6 +6991,17 @@ export interface Frame {
6459
6991
  * @param options
6460
6992
  */
6461
6993
  dispatchEvent(selector: string, type: string, eventInit?: EvaluationArgument, options?: {
6994
+ /**
6995
+ * Allows to cancel the operation using an
6996
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
6997
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
6998
+ * which can be changed using
6999
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7000
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7001
+ * `timeout: 0` to disable the timeout entirely.
7002
+ */
7003
+ signal?: AbortSignal;
7004
+
6462
7005
  /**
6463
7006
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6464
7007
  * element, the call throws an exception.
@@ -6493,6 +7036,25 @@ export interface Frame {
6493
7036
  */
6494
7037
  noWaitAfter?: boolean;
6495
7038
 
7039
+ /**
7040
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
7041
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
7042
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
7043
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
7044
+ */
7045
+ scroll?: "auto"|"none";
7046
+
7047
+ /**
7048
+ * Allows to cancel the operation using an
7049
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7050
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7051
+ * which can be changed using
7052
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7053
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7054
+ * `timeout: 0` to disable the timeout entirely.
7055
+ */
7056
+ signal?: AbortSignal;
7057
+
6496
7058
  /**
6497
7059
  * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
6498
7060
  * specified, some visible point of the element is used.
@@ -6573,6 +7135,17 @@ export interface Frame {
6573
7135
  */
6574
7136
  noWaitAfter?: boolean;
6575
7137
 
7138
+ /**
7139
+ * Allows to cancel the operation using an
7140
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7141
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7142
+ * which can be changed using
7143
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7144
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7145
+ * `timeout: 0` to disable the timeout entirely.
7146
+ */
7147
+ signal?: AbortSignal;
7148
+
6576
7149
  /**
6577
7150
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6578
7151
  * element, the call throws an exception.
@@ -6601,6 +7174,17 @@ export interface Frame {
6601
7174
  * @param options
6602
7175
  */
6603
7176
  focus(selector: string, options?: {
7177
+ /**
7178
+ * Allows to cancel the operation using an
7179
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7180
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7181
+ * which can be changed using
7182
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7183
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7184
+ * `timeout: 0` to disable the timeout entirely.
7185
+ */
7186
+ signal?: AbortSignal;
7187
+
6604
7188
  /**
6605
7189
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6606
7190
  * element, the call throws an exception.
@@ -6666,6 +7250,17 @@ export interface Frame {
6666
7250
  * @param options
6667
7251
  */
6668
7252
  getAttribute(selector: string, name: string, options?: {
7253
+ /**
7254
+ * Allows to cancel the operation using an
7255
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7256
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7257
+ * which can be changed using
7258
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7259
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7260
+ * `timeout: 0` to disable the timeout entirely.
7261
+ */
7262
+ signal?: AbortSignal;
7263
+
6669
7264
  /**
6670
7265
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
6671
7266
  * element, the call throws an exception.
@@ -7038,6 +7633,17 @@ export interface Frame {
7038
7633
  */
7039
7634
  referer?: string;
7040
7635
 
7636
+ /**
7637
+ * Allows to cancel the operation using an
7638
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7639
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7640
+ * which can be changed using
7641
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7642
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7643
+ * `timeout: 0` to disable the timeout entirely.
7644
+ */
7645
+ signal?: AbortSignal;
7646
+
7041
7647
  /**
7042
7648
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7043
7649
  * `navigationTimeout` option in the config, or by using the
@@ -7114,6 +7720,25 @@ export interface Frame {
7114
7720
  y: number;
7115
7721
  };
7116
7722
 
7723
+ /**
7724
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
7725
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
7726
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
7727
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
7728
+ */
7729
+ scroll?: "auto"|"none";
7730
+
7731
+ /**
7732
+ * Allows to cancel the operation using an
7733
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7734
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7735
+ * which can be changed using
7736
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7737
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7738
+ * `timeout: 0` to disable the timeout entirely.
7739
+ */
7740
+ signal?: AbortSignal;
7741
+
7117
7742
  /**
7118
7743
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7119
7744
  * element, the call throws an exception.
@@ -7147,6 +7772,17 @@ export interface Frame {
7147
7772
  * @param options
7148
7773
  */
7149
7774
  innerHTML(selector: string, options?: {
7775
+ /**
7776
+ * Allows to cancel the operation using an
7777
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7778
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7779
+ * which can be changed using
7780
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7781
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7782
+ * `timeout: 0` to disable the timeout entirely.
7783
+ */
7784
+ signal?: AbortSignal;
7785
+
7150
7786
  /**
7151
7787
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7152
7788
  * element, the call throws an exception.
@@ -7172,6 +7808,17 @@ export interface Frame {
7172
7808
  * @param options
7173
7809
  */
7174
7810
  innerText(selector: string, options?: {
7811
+ /**
7812
+ * Allows to cancel the operation using an
7813
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7814
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7815
+ * which can be changed using
7816
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7817
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7818
+ * `timeout: 0` to disable the timeout entirely.
7819
+ */
7820
+ signal?: AbortSignal;
7821
+
7175
7822
  /**
7176
7823
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7177
7824
  * element, the call throws an exception.
@@ -7202,6 +7849,17 @@ export interface Frame {
7202
7849
  * @param options
7203
7850
  */
7204
7851
  inputValue(selector: string, options?: {
7852
+ /**
7853
+ * Allows to cancel the operation using an
7854
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7855
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7856
+ * which can be changed using
7857
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7858
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7859
+ * `timeout: 0` to disable the timeout entirely.
7860
+ */
7861
+ signal?: AbortSignal;
7862
+
7205
7863
  /**
7206
7864
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7207
7865
  * element, the call throws an exception.
@@ -7227,6 +7885,17 @@ export interface Frame {
7227
7885
  * @param options
7228
7886
  */
7229
7887
  isChecked(selector: string, options?: {
7888
+ /**
7889
+ * Allows to cancel the operation using an
7890
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7891
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7892
+ * which can be changed using
7893
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7894
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7895
+ * `timeout: 0` to disable the timeout entirely.
7896
+ */
7897
+ signal?: AbortSignal;
7898
+
7230
7899
  /**
7231
7900
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7232
7901
  * element, the call throws an exception.
@@ -7258,6 +7927,17 @@ export interface Frame {
7258
7927
  * @param options
7259
7928
  */
7260
7929
  isDisabled(selector: string, options?: {
7930
+ /**
7931
+ * Allows to cancel the operation using an
7932
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7933
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7934
+ * which can be changed using
7935
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7936
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7937
+ * `timeout: 0` to disable the timeout entirely.
7938
+ */
7939
+ signal?: AbortSignal;
7940
+
7261
7941
  /**
7262
7942
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7263
7943
  * element, the call throws an exception.
@@ -7284,6 +7964,17 @@ export interface Frame {
7284
7964
  * @param options
7285
7965
  */
7286
7966
  isEditable(selector: string, options?: {
7967
+ /**
7968
+ * Allows to cancel the operation using an
7969
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
7970
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
7971
+ * which can be changed using
7972
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
7973
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
7974
+ * `timeout: 0` to disable the timeout entirely.
7975
+ */
7976
+ signal?: AbortSignal;
7977
+
7287
7978
  /**
7288
7979
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7289
7980
  * element, the call throws an exception.
@@ -7306,6 +7997,17 @@ export interface Frame {
7306
7997
  * @param options
7307
7998
  */
7308
7999
  isEnabled(selector: string, options?: {
8000
+ /**
8001
+ * Allows to cancel the operation using an
8002
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8003
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8004
+ * which can be changed using
8005
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8006
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8007
+ * `timeout: 0` to disable the timeout entirely.
8008
+ */
8009
+ signal?: AbortSignal;
8010
+
7309
8011
  /**
7310
8012
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7311
8013
  * element, the call throws an exception.
@@ -7487,6 +8189,17 @@ export interface Frame {
7487
8189
  */
7488
8190
  noWaitAfter?: boolean;
7489
8191
 
8192
+ /**
8193
+ * Allows to cancel the operation using an
8194
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8195
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8196
+ * which can be changed using
8197
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8198
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8199
+ * `timeout: 0` to disable the timeout entirely.
8200
+ */
8201
+ signal?: AbortSignal;
8202
+
7490
8203
  /**
7491
8204
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7492
8205
  * element, the call throws an exception.
@@ -7582,6 +8295,17 @@ export interface Frame {
7582
8295
  */
7583
8296
  noWaitAfter?: boolean;
7584
8297
 
8298
+ /**
8299
+ * Allows to cancel the operation using an
8300
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8301
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8302
+ * which can be changed using
8303
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8304
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8305
+ * `timeout: 0` to disable the timeout entirely.
8306
+ */
8307
+ signal?: AbortSignal;
8308
+
7585
8309
  /**
7586
8310
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7587
8311
  * element, the call throws an exception.
@@ -7648,6 +8372,25 @@ export interface Frame {
7648
8372
  y: number;
7649
8373
  };
7650
8374
 
8375
+ /**
8376
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
8377
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
8378
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
8379
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
8380
+ */
8381
+ scroll?: "auto"|"none";
8382
+
8383
+ /**
8384
+ * Allows to cancel the operation using an
8385
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8386
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8387
+ * which can be changed using
8388
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8389
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8390
+ * `timeout: 0` to disable the timeout entirely.
8391
+ */
8392
+ signal?: AbortSignal;
8393
+
7651
8394
  /**
7652
8395
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7653
8396
  * element, the call throws an exception.
@@ -7676,6 +8419,17 @@ export interface Frame {
7676
8419
  * @param options
7677
8420
  */
7678
8421
  setContent(html: string, options?: {
8422
+ /**
8423
+ * Allows to cancel the operation using an
8424
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8425
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8426
+ * which can be changed using
8427
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8428
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8429
+ * `timeout: 0` to disable the timeout entirely.
8430
+ */
8431
+ signal?: AbortSignal;
8432
+
7679
8433
  /**
7680
8434
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
7681
8435
  * `navigationTimeout` option in the config, or by using the
@@ -7752,6 +8506,17 @@ export interface Frame {
7752
8506
  */
7753
8507
  noWaitAfter?: boolean;
7754
8508
 
8509
+ /**
8510
+ * Allows to cancel the operation using an
8511
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8512
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8513
+ * which can be changed using
8514
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8515
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8516
+ * `timeout: 0` to disable the timeout entirely.
8517
+ */
8518
+ signal?: AbortSignal;
8519
+
7755
8520
  /**
7756
8521
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7757
8522
  * element, the call throws an exception.
@@ -7823,6 +8588,25 @@ export interface Frame {
7823
8588
  y: number;
7824
8589
  };
7825
8590
 
8591
+ /**
8592
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
8593
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
8594
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
8595
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
8596
+ */
8597
+ scroll?: "auto"|"none";
8598
+
8599
+ /**
8600
+ * Allows to cancel the operation using an
8601
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8602
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8603
+ * which can be changed using
8604
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8605
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8606
+ * `timeout: 0` to disable the timeout entirely.
8607
+ */
8608
+ signal?: AbortSignal;
8609
+
7826
8610
  /**
7827
8611
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7828
8612
  * element, the call throws an exception.
@@ -7857,6 +8641,17 @@ export interface Frame {
7857
8641
  * @param options
7858
8642
  */
7859
8643
  textContent(selector: string, options?: {
8644
+ /**
8645
+ * Allows to cancel the operation using an
8646
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8647
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8648
+ * which can be changed using
8649
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8650
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8651
+ * `timeout: 0` to disable the timeout entirely.
8652
+ */
8653
+ signal?: AbortSignal;
8654
+
7860
8655
  /**
7861
8656
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7862
8657
  * element, the call throws an exception.
@@ -7907,6 +8702,17 @@ export interface Frame {
7907
8702
  */
7908
8703
  noWaitAfter?: boolean;
7909
8704
 
8705
+ /**
8706
+ * Allows to cancel the operation using an
8707
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8708
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8709
+ * which can be changed using
8710
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8711
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8712
+ * `timeout: 0` to disable the timeout entirely.
8713
+ */
8714
+ signal?: AbortSignal;
8715
+
7910
8716
  /**
7911
8717
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7912
8718
  * element, the call throws an exception.
@@ -7971,6 +8777,25 @@ export interface Frame {
7971
8777
  y: number;
7972
8778
  };
7973
8779
 
8780
+ /**
8781
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
8782
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
8783
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
8784
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
8785
+ */
8786
+ scroll?: "auto"|"none";
8787
+
8788
+ /**
8789
+ * Allows to cancel the operation using an
8790
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8791
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
8792
+ * which can be changed using
8793
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
8794
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
8795
+ * `timeout: 0` to disable the timeout entirely.
8796
+ */
8797
+ signal?: AbortSignal;
8798
+
7974
8799
  /**
7975
8800
  * When true, the call requires selector to resolve to a single element. If given selector resolves to more than one
7976
8801
  * element, the call throws an exception.
@@ -8023,6 +8848,16 @@ export interface Frame {
8023
8848
  * @param options
8024
8849
  */
8025
8850
  waitForLoadState(state?: "load"|"domcontentloaded"|"networkidle", options?: {
8851
+ /**
8852
+ * Allows to cancel the waiting using an
8853
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8854
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
8855
+ * default timeout, which can be changed using
8856
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
8857
+ * pass `timeout: 0` to disable the timeout entirely.
8858
+ */
8859
+ signal?: AbortSignal;
8860
+
8026
8861
  /**
8027
8862
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
8028
8863
  * `navigationTimeout` option in the config, or by using the
@@ -8059,6 +8894,16 @@ export interface Frame {
8059
8894
  * @param options
8060
8895
  */
8061
8896
  waitForNavigation(options?: {
8897
+ /**
8898
+ * Allows to cancel the waiting using an
8899
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8900
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
8901
+ * default timeout, which can be changed using
8902
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
8903
+ * pass `timeout: 0` to disable the timeout entirely.
8904
+ */
8905
+ signal?: AbortSignal;
8906
+
8062
8907
  /**
8063
8908
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
8064
8909
  * `navigationTimeout` option in the config, or by using the
@@ -8117,6 +8962,16 @@ export interface Frame {
8117
8962
  * @param options
8118
8963
  */
8119
8964
  waitForURL(url: string|RegExp|URLPattern|((url: URL) => boolean), options?: {
8965
+ /**
8966
+ * Allows to cancel the waiting using an
8967
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
8968
+ * waiting will be aborted and the operation will throw an error. Note that providing a signal does not disable the
8969
+ * default timeout, which can be changed using
8970
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout);
8971
+ * pass `timeout: 0` to disable the timeout entirely.
8972
+ */
8973
+ signal?: AbortSignal;
8974
+
8120
8975
  /**
8121
8976
  * Maximum operation time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
8122
8977
  * `navigationTimeout` option in the config, or by using the
@@ -8236,16 +9091,17 @@ export interface BrowserContext {
8236
9091
  * ```
8237
9092
  *
8238
9093
  * **NOTE** The order of evaluation of multiple scripts installed via
8239
- * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
8240
- * and [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) is not
8241
- * defined.
9094
+ * [browserContext.addInitScript(script[, arg, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script)
9095
+ * and [page.addInitScript(script[, arg, options])](https://playwright.dev/docs/api/class-page#page-add-init-script)
9096
+ * is not defined.
8242
9097
  *
8243
9098
  * @param script Script to be evaluated in all pages in the browser context.
8244
9099
  * @param arg Optional argument to pass to
8245
9100
  * [`script`](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script-option-script)
8246
9101
  * (only supported when passing a function).
9102
+ * @param options
8247
9103
  */
8248
- addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg): Promise<Disposable>;
9104
+ addInitScript<Arg>(script: PageFunction<Arg, any> | { path?: string, content?: string }, arg?: Arg, options?: { exposeFunctions?: boolean }): Promise<Disposable>;
8249
9105
 
8250
9106
  /**
8251
9107
  * Removes all the listeners of the given type (or all registered listeners if no type given). Allows to wait for
@@ -9571,7 +10427,10 @@ export interface BrowserContext {
9571
10427
  setOffline(offline: boolean): Promise<void>;
9572
10428
 
9573
10429
  /**
9574
- * Clears the existing cookies, local storage and IndexedDB entries for all origins and sets the new storage state.
10430
+ * Clears the existing cookies, local storage, IndexedDB entries and virtual WebAuthn credentials, and sets the new
10431
+ * storage state. When the storage state contains credentials, the virtual WebAuthn authenticator is installed
10432
+ * (equivalent to [credentials.install()](https://playwright.dev/docs/api/class-credentials#credentials-install)),
10433
+ * preventing all real authenticators from working in this context.
9575
10434
  *
9576
10435
  * **Usage**
9577
10436
  *
@@ -9636,11 +10495,24 @@ export interface BrowserContext {
9636
10495
  }): Promise<void>;
9637
10496
 
9638
10497
  /**
9639
- * Returns storage state for this browser context, contains current cookies, local storage snapshot and IndexedDB
9640
- * snapshot.
10498
+ * Returns storage state for this browser context, contains current cookies, local storage snapshot, IndexedDB
10499
+ * snapshot and virtual WebAuthn credentials.
9641
10500
  * @param options
9642
10501
  */
9643
10502
  storageState(options?: {
10503
+ /**
10504
+ * Set to `true` to include the context's virtual WebAuthn
10505
+ * [browserContext.credentials](https://playwright.dev/docs/api/class-browsercontext#browser-context-credentials)
10506
+ * (passkeys) in the storage state snapshot. The captured credentials carry their private keys, so they can be
10507
+ * re-seeded into a later context via the
10508
+ * [`storageState`](https://playwright.dev/docs/api/class-browser#browser-new-context-option-storage-state) option or
10509
+ * [browserContext.setStorageState(storageState)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-storage-state).
10510
+ * Note that restoring the storage state that contains credentials will automatically install the virtual WebAuthn
10511
+ * authenticator (see [credentials.install()](https://playwright.dev/docs/api/class-credentials#credentials-install)),
10512
+ * and prevent all real authenticators from working in this context.
10513
+ */
10514
+ credentials?: boolean;
10515
+
9644
10516
  /**
9645
10517
  * Set to `true` to include [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) in the storage
9646
10518
  * state snapshot. If your application uses IndexedDB to store authentication tokens, like Firebase Authentication,
@@ -9723,7 +10595,7 @@ export interface BrowserContext {
9723
10595
  /**
9724
10596
  * This event is not emitted.
9725
10597
  */
9726
- waitForEvent(event: 'backgroundpage', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
10598
+ waitForEvent(event: 'backgroundpage', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9727
10599
 
9728
10600
  /**
9729
10601
  * Emitted when Browser context gets closed. This might happen because of one of the following:
@@ -9731,7 +10603,7 @@ export interface BrowserContext {
9731
10603
  * - Browser application is closed or crashed.
9732
10604
  * - The [browser.close([options])](https://playwright.dev/docs/api/class-browser#browser-close) method was called.
9733
10605
  */
9734
- waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (browserContext: BrowserContext) => boolean | Promise<boolean>, timeout?: number } | ((browserContext: BrowserContext) => boolean | Promise<boolean>)): Promise<BrowserContext>;
10606
+ waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (browserContext: BrowserContext) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((browserContext: BrowserContext) => boolean | Promise<boolean>)): Promise<BrowserContext>;
9735
10607
 
9736
10608
  /**
9737
10609
  * Emitted when JavaScript within the page calls one of console API methods, e.g. `console.log` or `console.dir`.
@@ -9752,7 +10624,7 @@ export interface BrowserContext {
9752
10624
  * ```
9753
10625
  *
9754
10626
  */
9755
- waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
10627
+ waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
9756
10628
 
9757
10629
  /**
9758
10630
  * Emitted when a JavaScript dialog appears, such as `alert`, `prompt`, `confirm` or `beforeunload`. Listener **must**
@@ -9774,7 +10646,7 @@ export interface BrowserContext {
9774
10646
  * listeners are present, all dialogs are automatically dismissed.
9775
10647
  *
9776
10648
  */
9777
- waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
10649
+ waitForEvent(event: 'dialog', optionsOrPredicate?: { predicate?: (dialog: Dialog) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((dialog: Dialog) => boolean | Promise<boolean>)): Promise<Dialog>;
9778
10650
 
9779
10651
  /**
9780
10652
  * Emitted when attachment download started in any page belonging to this context. User can access basic file
@@ -9782,28 +10654,28 @@ export interface BrowserContext {
9782
10654
  * instance. See also [page.on('download')](https://playwright.dev/docs/api/class-page#page-event-download) to receive
9783
10655
  * events about a specific page.
9784
10656
  */
9785
- waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
10657
+ waitForEvent(event: 'download', optionsOrPredicate?: { predicate?: (download: Download) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((download: Download) => boolean | Promise<boolean>)): Promise<Download>;
9786
10658
 
9787
10659
  /**
9788
10660
  * Emitted when a frame is attached in any page belonging to this context. See also
9789
10661
  * [page.on('frameattached')](https://playwright.dev/docs/api/class-page#page-event-frame-attached) to receive events
9790
10662
  * about a specific page.
9791
10663
  */
9792
- waitForEvent(event: 'frameattached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
10664
+ waitForEvent(event: 'frameattached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
9793
10665
 
9794
10666
  /**
9795
10667
  * Emitted when a frame is detached in any page belonging to this context. See also
9796
10668
  * [page.on('framedetached')](https://playwright.dev/docs/api/class-page#page-event-frame-detached) to receive events
9797
10669
  * about a specific page.
9798
10670
  */
9799
- waitForEvent(event: 'framedetached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
10671
+ waitForEvent(event: 'framedetached', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
9800
10672
 
9801
10673
  /**
9802
10674
  * Emitted when a frame is navigated to a new url in any page belonging to this context. See also
9803
10675
  * [page.on('framenavigated')](https://playwright.dev/docs/api/class-page#page-event-frame-navigated) to receive
9804
10676
  * events about navigations in a specific page.
9805
10677
  */
9806
- waitForEvent(event: 'framenavigated', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
10678
+ waitForEvent(event: 'framenavigated', optionsOrPredicate?: { predicate?: (frame: Frame) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((frame: Frame) => boolean | Promise<boolean>)): Promise<Frame>;
9807
10679
 
9808
10680
  /**
9809
10681
  * The event is emitted when a new Page is created in the BrowserContext. The page may still be loading. The event
@@ -9832,14 +10704,14 @@ export interface BrowserContext {
9832
10704
  * wait until the page gets to a particular state (you should not need it in most cases).
9833
10705
  *
9834
10706
  */
9835
- waitForEvent(event: 'page', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
10707
+ waitForEvent(event: 'page', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9836
10708
 
9837
10709
  /**
9838
10710
  * Emitted when a page in this context is closed. See also
9839
10711
  * [page.on('close')](https://playwright.dev/docs/api/class-page#page-event-close) to receive events about a specific
9840
10712
  * page.
9841
10713
  */
9842
- waitForEvent(event: 'pageclose', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
10714
+ waitForEvent(event: 'pageclose', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9843
10715
 
9844
10716
  /**
9845
10717
  * Emitted when the JavaScript [`load`](https://developer.mozilla.org/en-US/docs/Web/Events/load) event is dispatched
@@ -9847,7 +10719,7 @@ export interface BrowserContext {
9847
10719
  * [page.on('load')](https://playwright.dev/docs/api/class-page#page-event-load) to receive events about a specific
9848
10720
  * page.
9849
10721
  */
9850
- waitForEvent(event: 'pageload', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
10722
+ waitForEvent(event: 'pageload', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
9851
10723
 
9852
10724
  /**
9853
10725
  * Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
@@ -9858,7 +10730,7 @@ export interface BrowserContext {
9858
10730
  * [browserContext.route(url, handler[, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-route)
9859
10731
  * or [page.route(url, handler[, options])](https://playwright.dev/docs/api/class-page#page-route).
9860
10732
  */
9861
- waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
10733
+ waitForEvent(event: 'request', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9862
10734
 
9863
10735
  /**
9864
10736
  * Emitted when a request fails, for example by timing out. To only listen for failed requests from a particular page,
@@ -9871,7 +10743,7 @@ export interface BrowserContext {
9871
10743
  * [browserContext.on('requestfailed')](https://playwright.dev/docs/api/class-browsercontext#browser-context-event-request-failed).
9872
10744
  *
9873
10745
  */
9874
- waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
10746
+ waitForEvent(event: 'requestfailed', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9875
10747
 
9876
10748
  /**
9877
10749
  * Emitted when a request finishes successfully after downloading the response body. For a successful response, the
@@ -9879,27 +10751,27 @@ export interface BrowserContext {
9879
10751
  * particular page, use
9880
10752
  * [page.on('requestfinished')](https://playwright.dev/docs/api/class-page#page-event-request-finished).
9881
10753
  */
9882
- waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
10754
+ waitForEvent(event: 'requestfinished', optionsOrPredicate?: { predicate?: (request: Request) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((request: Request) => boolean | Promise<boolean>)): Promise<Request>;
9883
10755
 
9884
10756
  /**
9885
10757
  * Emitted when [response] status and headers are received for a request. For a successful response, the sequence of
9886
10758
  * events is `request`, `response` and `requestfinished`. To listen for response events from a particular page, use
9887
10759
  * [page.on('response')](https://playwright.dev/docs/api/class-page#page-event-response).
9888
10760
  */
9889
- waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
10761
+ waitForEvent(event: 'response', optionsOrPredicate?: { predicate?: (response: Response) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((response: Response) => boolean | Promise<boolean>)): Promise<Response>;
9890
10762
 
9891
10763
  /**
9892
10764
  * **NOTE** Service workers are only supported on Chromium-based browsers.
9893
10765
  *
9894
10766
  * Emitted when new service worker is created in the context.
9895
10767
  */
9896
- waitForEvent(event: 'serviceworker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
10768
+ waitForEvent(event: 'serviceworker', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
9897
10769
 
9898
10770
  /**
9899
10771
  * Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
9900
10772
  * page, use [page.on('pageerror')](https://playwright.dev/docs/api/class-page#page-event-page-error) instead.
9901
10773
  */
9902
- waitForEvent(event: 'weberror', optionsOrPredicate?: { predicate?: (webError: WebError) => boolean | Promise<boolean>, timeout?: number } | ((webError: WebError) => boolean | Promise<boolean>)): Promise<WebError>;
10774
+ waitForEvent(event: 'weberror', optionsOrPredicate?: { predicate?: (webError: WebError) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((webError: WebError) => boolean | Promise<boolean>)): Promise<WebError>;
9903
10775
 
9904
10776
 
9905
10777
  /**
@@ -10498,6 +11370,12 @@ export interface Browser {
10498
11370
  * Font size of the action title in pixels. Defaults to `24`.
10499
11371
  */
10500
11372
  fontSize?: number;
11373
+
11374
+ /**
11375
+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from
11376
+ * the previous action point to the next one. `"none"` disables the cursor decoration.
11377
+ */
11378
+ cursor?: "none"|"pointer";
10501
11379
  };
10502
11380
  };
10503
11381
 
@@ -10866,18 +11744,19 @@ export interface Worker {
10866
11744
  * Emitted when this dedicated [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API) is
10867
11745
  * terminated.
10868
11746
  */
10869
- waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
11747
+ waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (worker: Worker) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((worker: Worker) => boolean | Promise<boolean>)): Promise<Worker>;
10870
11748
 
10871
11749
  /**
10872
11750
  * Emitted when JavaScript within the worker calls one of console API methods, e.g. `console.log` or `console.dir`.
10873
11751
  */
10874
- waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
11752
+ waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
10875
11753
 
10876
11754
  }
10877
11755
 
10878
11756
  /**
10879
11757
  * JSHandle represents an in-page JavaScript object. JSHandles can be created with the
10880
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) method.
11758
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
11759
+ * method.
10881
11760
  *
10882
11761
  * ```js
10883
11762
  * const windowHandle = await page.evaluateHandle(() => window);
@@ -10890,8 +11769,8 @@ export interface Worker {
10890
11769
  *
10891
11770
  * JSHandle instances can be used as an argument in
10892
11771
  * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector),
10893
- * [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) and
10894
- * [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
11772
+ * [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate) and
11773
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
10895
11774
  * methods.
10896
11775
  */
10897
11776
  export interface JSHandle<T = any> {
@@ -10915,8 +11794,9 @@ export interface JSHandle<T = any> {
10915
11794
  * @param pageFunction Function to be evaluated in the page context.
10916
11795
  * @param arg Optional argument to pass to
10917
11796
  * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
11797
+ * @param options
10918
11798
  */
10919
- evaluate<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<R>;
11799
+ evaluate<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg, options?: { exposeFunctions?: boolean }): Promise<R>;
10920
11800
  /**
10921
11801
  * Returns the return value of
10922
11802
  * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
@@ -10937,8 +11817,9 @@ export interface JSHandle<T = any> {
10937
11817
  * @param pageFunction Function to be evaluated in the page context.
10938
11818
  * @param arg Optional argument to pass to
10939
11819
  * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-option-expression).
11820
+ * @param options
10940
11821
  */
10941
- evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<R>;
11822
+ evaluate<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any, options?: { exposeFunctions?: boolean }): Promise<R>;
10942
11823
 
10943
11824
  /**
10944
11825
  * Returns the return value of
@@ -10954,13 +11835,15 @@ export interface JSHandle<T = any> {
10954
11835
  * If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
10955
11836
  * wait for the promise to resolve and return its value.
10956
11837
  *
10957
- * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
10958
- * more details.
11838
+ * See
11839
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
11840
+ * for more details.
10959
11841
  * @param pageFunction Function to be evaluated in the page context.
10960
11842
  * @param arg Optional argument to pass to
10961
11843
  * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
11844
+ * @param options
10962
11845
  */
10963
- evaluateHandle<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
11846
+ evaluateHandle<R, Arg, O extends T = T>(pageFunction: PageFunctionOn<O, Arg, R>, arg: Arg, options?: { exposeFunctions?: boolean }): Promise<SmartHandle<R>>;
10964
11847
  /**
10965
11848
  * Returns the return value of
10966
11849
  * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression)
@@ -10975,13 +11858,15 @@ export interface JSHandle<T = any> {
10975
11858
  * If the function passed to the `jsHandle.evaluateHandle` returns a [Promise], then `jsHandle.evaluateHandle` would
10976
11859
  * wait for the promise to resolve and return its value.
10977
11860
  *
10978
- * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
10979
- * more details.
11861
+ * See
11862
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
11863
+ * for more details.
10980
11864
  * @param pageFunction Function to be evaluated in the page context.
10981
11865
  * @param arg Optional argument to pass to
10982
11866
  * [`pageFunction`](https://playwright.dev/docs/api/class-elementhandle#element-handle-evaluate-handle-option-expression).
11867
+ * @param options
10983
11868
  */
10984
- evaluateHandle<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any): Promise<SmartHandle<R>>;
11869
+ evaluateHandle<R, O extends T = T>(pageFunction: PageFunctionOn<O, void, R>, arg?: any, options?: { exposeFunctions?: boolean }): Promise<SmartHandle<R>>;
10985
11870
 
10986
11871
  /**
10987
11872
  * Returns a JSON representation of the object. If the object has a `toJSON` function, it **will not be called**.
@@ -11046,7 +11931,8 @@ export interface JSHandle<T = any> {
11046
11931
  *
11047
11932
  * ElementHandle instances can be used as an argument in
11048
11933
  * [page.$eval(selector, pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-eval-on-selector)
11049
- * and [page.evaluate(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate) methods.
11934
+ * and [page.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate)
11935
+ * methods.
11050
11936
  *
11051
11937
  * The difference between the [Locator](https://playwright.dev/docs/api/class-locator) and ElementHandle is that the
11052
11938
  * ElementHandle points to a particular element, while [Locator](https://playwright.dev/docs/api/class-locator)
@@ -11647,6 +12533,25 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
11647
12533
  y: number;
11648
12534
  };
11649
12535
 
12536
+ /**
12537
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
12538
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
12539
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
12540
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
12541
+ */
12542
+ scroll?: "auto"|"none";
12543
+
12544
+ /**
12545
+ * Allows to cancel the operation using an
12546
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
12547
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
12548
+ * which can be changed using
12549
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12550
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
12551
+ * `timeout: 0` to disable the timeout entirely.
12552
+ */
12553
+ signal?: AbortSignal;
12554
+
11650
12555
  /**
11651
12556
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11652
12557
  * option in the config, or by using the
@@ -11731,6 +12636,25 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
11731
12636
  y: number;
11732
12637
  };
11733
12638
 
12639
+ /**
12640
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
12641
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
12642
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
12643
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
12644
+ */
12645
+ scroll?: "auto"|"none";
12646
+
12647
+ /**
12648
+ * Allows to cancel the operation using an
12649
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
12650
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
12651
+ * which can be changed using
12652
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12653
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
12654
+ * `timeout: 0` to disable the timeout entirely.
12655
+ */
12656
+ signal?: AbortSignal;
12657
+
11734
12658
  /**
11735
12659
  * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
11736
12660
  * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -11820,6 +12744,25 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
11820
12744
  y: number;
11821
12745
  };
11822
12746
 
12747
+ /**
12748
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
12749
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
12750
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
12751
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
12752
+ */
12753
+ scroll?: "auto"|"none";
12754
+
12755
+ /**
12756
+ * Allows to cancel the operation using an
12757
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
12758
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
12759
+ * which can be changed using
12760
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12761
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
12762
+ * `timeout: 0` to disable the timeout entirely.
12763
+ */
12764
+ signal?: AbortSignal;
12765
+
11823
12766
  /**
11824
12767
  * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
11825
12768
  * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -11918,6 +12861,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
11918
12861
  */
11919
12862
  noWaitAfter?: boolean;
11920
12863
 
12864
+ /**
12865
+ * Allows to cancel the operation using an
12866
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
12867
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
12868
+ * which can be changed using
12869
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12870
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
12871
+ * `timeout: 0` to disable the timeout entirely.
12872
+ */
12873
+ signal?: AbortSignal;
12874
+
11921
12875
  /**
11922
12876
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11923
12877
  * option in the config, or by using the
@@ -11994,6 +12948,25 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
11994
12948
  y: number;
11995
12949
  };
11996
12950
 
12951
+ /**
12952
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
12953
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
12954
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
12955
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
12956
+ */
12957
+ scroll?: "auto"|"none";
12958
+
12959
+ /**
12960
+ * Allows to cancel the operation using an
12961
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
12962
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
12963
+ * which can be changed using
12964
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12965
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
12966
+ * `timeout: 0` to disable the timeout entirely.
12967
+ */
12968
+ signal?: AbortSignal;
12969
+
11997
12970
  /**
11998
12971
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
11999
12972
  * option in the config, or by using the
@@ -12039,10 +13012,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12039
13012
  */
12040
13013
  inputValue(options?: {
12041
13014
  /**
12042
- * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12043
- * option in the config, or by using the
12044
- * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
12045
- * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout) methods.
13015
+ * @deprecated This option is ignored. The value is returned immediately.
12046
13016
  */
12047
13017
  timeout?: number;
12048
13018
  }): Promise<string>;
@@ -12148,6 +13118,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12148
13118
  */
12149
13119
  noWaitAfter?: boolean;
12150
13120
 
13121
+ /**
13122
+ * Allows to cancel the operation using an
13123
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13124
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13125
+ * which can be changed using
13126
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13127
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13128
+ * `timeout: 0` to disable the timeout entirely.
13129
+ */
13130
+ signal?: AbortSignal;
13131
+
12151
13132
  /**
12152
13133
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12153
13134
  * option in the config, or by using the
@@ -12218,7 +13199,8 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12218
13199
  path?: string;
12219
13200
 
12220
13201
  /**
12221
- * The quality of the image, between 0-100. Not applicable to `png` images.
13202
+ * The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For
13203
+ * `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression.
12222
13204
  */
12223
13205
  quality?: number;
12224
13206
 
@@ -12231,6 +13213,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12231
13213
  */
12232
13214
  scale?: "css"|"device";
12233
13215
 
13216
+ /**
13217
+ * Allows to cancel the operation using an
13218
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13219
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13220
+ * which can be changed using
13221
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13222
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13223
+ * `timeout: 0` to disable the timeout entirely.
13224
+ */
13225
+ signal?: AbortSignal;
13226
+
12234
13227
  /**
12235
13228
  * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
12236
13229
  * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
@@ -12249,7 +13242,7 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12249
13242
  /**
12250
13243
  * Specify screenshot type, defaults to `png`.
12251
13244
  */
12252
- type?: "png"|"jpeg";
13245
+ type?: "png"|"jpeg"|"webp";
12253
13246
  }): Promise<Buffer>;
12254
13247
 
12255
13248
  /**
@@ -12268,6 +13261,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12268
13261
  * @param options
12269
13262
  */
12270
13263
  scrollIntoViewIfNeeded(options?: {
13264
+ /**
13265
+ * Allows to cancel the operation using an
13266
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13267
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13268
+ * which can be changed using
13269
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13270
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13271
+ * `timeout: 0` to disable the timeout entirely.
13272
+ */
13273
+ signal?: AbortSignal;
13274
+
12271
13275
  /**
12272
13276
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12273
13277
  * option in the config, or by using the
@@ -12354,6 +13358,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12354
13358
  */
12355
13359
  noWaitAfter?: boolean;
12356
13360
 
13361
+ /**
13362
+ * Allows to cancel the operation using an
13363
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13364
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13365
+ * which can be changed using
13366
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13367
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13368
+ * `timeout: 0` to disable the timeout entirely.
13369
+ */
13370
+ signal?: AbortSignal;
13371
+
12357
13372
  /**
12358
13373
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12359
13374
  * option in the config, or by using the
@@ -12382,6 +13397,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12382
13397
  */
12383
13398
  force?: boolean;
12384
13399
 
13400
+ /**
13401
+ * Allows to cancel the operation using an
13402
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13403
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13404
+ * which can be changed using
13405
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13406
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13407
+ * `timeout: 0` to disable the timeout entirely.
13408
+ */
13409
+ signal?: AbortSignal;
13410
+
12385
13411
  /**
12386
13412
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12387
13413
  * option in the config, or by using the
@@ -12436,6 +13462,25 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12436
13462
  y: number;
12437
13463
  };
12438
13464
 
13465
+ /**
13466
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
13467
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
13468
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
13469
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
13470
+ */
13471
+ scroll?: "auto"|"none";
13472
+
13473
+ /**
13474
+ * Allows to cancel the operation using an
13475
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13476
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13477
+ * which can be changed using
13478
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13479
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13480
+ * `timeout: 0` to disable the timeout entirely.
13481
+ */
13482
+ signal?: AbortSignal;
13483
+
12439
13484
  /**
12440
13485
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12441
13486
  * option in the config, or by using the
@@ -12504,6 +13549,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12504
13549
  */
12505
13550
  noWaitAfter?: boolean;
12506
13551
 
13552
+ /**
13553
+ * Allows to cancel the operation using an
13554
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13555
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13556
+ * which can be changed using
13557
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13558
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13559
+ * `timeout: 0` to disable the timeout entirely.
13560
+ */
13561
+ signal?: AbortSignal;
13562
+
12507
13563
  /**
12508
13564
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12509
13565
  * option in the config, or by using the
@@ -12564,6 +13620,25 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12564
13620
  y: number;
12565
13621
  };
12566
13622
 
13623
+ /**
13624
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
13625
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
13626
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
13627
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
13628
+ */
13629
+ scroll?: "auto"|"none";
13630
+
13631
+ /**
13632
+ * Allows to cancel the operation using an
13633
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13634
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13635
+ * which can be changed using
13636
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13637
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13638
+ * `timeout: 0` to disable the timeout entirely.
13639
+ */
13640
+ signal?: AbortSignal;
13641
+
12567
13642
  /**
12568
13643
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12569
13644
  * option in the config, or by using the
@@ -12615,6 +13690,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12615
13690
  */
12616
13691
  noWaitAfter?: boolean;
12617
13692
 
13693
+ /**
13694
+ * Allows to cancel the operation using an
13695
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13696
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13697
+ * which can be changed using
13698
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13699
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13700
+ * `timeout: 0` to disable the timeout entirely.
13701
+ */
13702
+ signal?: AbortSignal;
13703
+
12618
13704
  /**
12619
13705
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12620
13706
  * option in the config, or by using the
@@ -12668,6 +13754,25 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12668
13754
  y: number;
12669
13755
  };
12670
13756
 
13757
+ /**
13758
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
13759
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
13760
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
13761
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
13762
+ */
13763
+ scroll?: "auto"|"none";
13764
+
13765
+ /**
13766
+ * Allows to cancel the operation using an
13767
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13768
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13769
+ * which can be changed using
13770
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13771
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13772
+ * `timeout: 0` to disable the timeout entirely.
13773
+ */
13774
+ signal?: AbortSignal;
13775
+
12671
13776
  /**
12672
13777
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12673
13778
  * option in the config, or by using the
@@ -12707,6 +13812,17 @@ export interface ElementHandle<T=Node> extends JSHandle<T> {
12707
13812
  * @param options
12708
13813
  */
12709
13814
  waitForElementState(state: "visible"|"hidden"|"stable"|"enabled"|"disabled"|"editable", options?: {
13815
+ /**
13816
+ * Allows to cancel the operation using an
13817
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
13818
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
13819
+ * which can be changed using
13820
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
13821
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
13822
+ * `timeout: 0` to disable the timeout entirely.
13823
+ */
13824
+ signal?: AbortSignal;
13825
+
12710
13826
  /**
12711
13827
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
12712
13828
  * option in the config, or by using the
@@ -12758,78 +13874,7 @@ export interface Locator {
12758
13874
  * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
12759
13875
  * @param options
12760
13876
  */
12761
- evaluate<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg, options?: {
12762
- timeout?: number;
12763
- }): Promise<R>;
12764
- /**
12765
- * Execute JavaScript code in the page, taking the matching element as an argument.
12766
- *
12767
- * **Details**
12768
- *
12769
- * Returns the return value of
12770
- * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression), called with the
12771
- * matching element as a first argument, and
12772
- * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-arg) as a second argument.
12773
- *
12774
- * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) returns a
12775
- * [Promise], this method will wait for the promise to resolve and return its value.
12776
- *
12777
- * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression) throws or
12778
- * rejects, this method throws.
12779
- *
12780
- * **Usage**
12781
- *
12782
- * Passing argument to
12783
- * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression):
12784
- *
12785
- * ```js
12786
- * const result = await page.getByTestId('myId').evaluate((element, [x, y]) => {
12787
- * return element.textContent + ' ' + x * y;
12788
- * }, [7, 8]);
12789
- * console.log(result); // prints "myId text 56"
12790
- * ```
12791
- *
12792
- * @param pageFunction Function to be evaluated in the page context.
12793
- * @param arg Optional argument to pass to
12794
- * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-option-expression).
12795
- * @param options
12796
- */
12797
- evaluate<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>, options?: {
12798
- timeout?: number;
12799
- }): Promise<R>;
12800
- /**
12801
- * Execute JavaScript code in the page, taking the matching element as an argument, and return a
12802
- * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
12803
- *
12804
- * **Details**
12805
- *
12806
- * Returns the return value of
12807
- * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) as
12808
- * a[JSHandle](https://playwright.dev/docs/api/class-jshandle), called with the matching element as a first argument,
12809
- * and [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-arg) as a second argument.
12810
- *
12811
- * The only difference between
12812
- * [locator.evaluate(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate)
12813
- * and
12814
- * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12815
- * is that
12816
- * [locator.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle)
12817
- * returns [JSHandle](https://playwright.dev/docs/api/class-jshandle).
12818
- *
12819
- * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression)
12820
- * returns a [Promise], this method will wait for the promise to resolve and return its value.
12821
- *
12822
- * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
12823
- * or rejects, this method throws.
12824
- *
12825
- * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
12826
- * more details.
12827
- * @param pageFunction Function to be evaluated in the page context.
12828
- * @param arg Optional argument to pass to
12829
- * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
12830
- * @param options
12831
- */
12832
- evaluateHandle<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg: Arg): Promise<SmartHandle<R>>;
13877
+ evaluate<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg?: Arg, options?: { timeout?: number, signal?: AbortSignal, exposeFunctions?: boolean }): Promise<R>;
12833
13878
  /**
12834
13879
  * Execute JavaScript code in the page, taking the matching element as an argument, and return a
12835
13880
  * [JSHandle](https://playwright.dev/docs/api/class-jshandle) with the result.
@@ -12855,14 +13900,15 @@ export interface Locator {
12855
13900
  * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression) throws
12856
13901
  * or rejects, this method throws.
12857
13902
  *
12858
- * See [page.evaluateHandle(pageFunction[, arg])](https://playwright.dev/docs/api/class-page#page-evaluate-handle) for
12859
- * more details.
13903
+ * See
13904
+ * [page.evaluateHandle(pageFunction[, arg, options])](https://playwright.dev/docs/api/class-page#page-evaluate-handle)
13905
+ * for more details.
12860
13906
  * @param pageFunction Function to be evaluated in the page context.
12861
13907
  * @param arg Optional argument to pass to
12862
13908
  * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-handle-option-expression).
12863
13909
  * @param options
12864
13910
  */
12865
- evaluateHandle<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, void, R>): Promise<SmartHandle<R>>;
13911
+ evaluateHandle<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, R>, arg?: Arg, options?: { timeout?: number, signal?: AbortSignal, exposeFunctions?: boolean }): Promise<SmartHandle<R>>;
12866
13912
  /**
12867
13913
  * Execute JavaScript code in the page, taking all matching elements as an argument.
12868
13914
  *
@@ -12890,35 +13936,47 @@ export interface Locator {
12890
13936
  * @param arg Optional argument to pass to
12891
13937
  * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
12892
13938
  */
12893
- evaluateAll<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], Arg, R>, arg: Arg): Promise<R>;
13939
+ evaluateAll<R, Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], Arg, R>, arg?: Arg): Promise<R>;
12894
13940
  /**
12895
- * Execute JavaScript code in the page, taking all matching elements as an argument.
13941
+ * Returns when
13942
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function-option-expression) returns
13943
+ * a truthy value, called with the matching element as a first argument, and
13944
+ * [`arg`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function-option-arg) as a second argument.
12896
13945
  *
12897
- * **Details**
13946
+ * This is a generic way to wait for an element to reach a custom condition without asserting it. The locator is
13947
+ * re-resolved on each retry, so it tolerates the element being re-rendered while waiting.
12898
13948
  *
12899
- * Returns the return value of
12900
- * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression), called with
12901
- * an array of all matching elements as a first argument, and
12902
- * [`arg`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-arg) as a second argument.
13949
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function-option-expression)
13950
+ * returns a [Promise], this method will wait for the promise to resolve before checking its value.
12903
13951
  *
12904
- * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) returns a
12905
- * [Promise], this method will wait for the promise to resolve and return its value.
12906
- *
12907
- * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression) throws or
12908
- * rejects, this method throws.
13952
+ * If [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function-option-expression)
13953
+ * throws or rejects, this method throws.
12909
13954
  *
12910
13955
  * **Usage**
12911
13956
  *
13957
+ * Wait for an attribute to appear:
13958
+ *
12912
13959
  * ```js
12913
- * const locator = page.locator('div');
12914
- * const moreThanTen = await locator.evaluateAll((divs, min) => divs.length > min, 10);
13960
+ * const toggle = page.getByRole('button', { name: 'Menu' });
13961
+ * await toggle.click();
13962
+ * await toggle.waitForFunction(element => element.hasAttribute('aria-expanded'));
13963
+ * ```
13964
+ *
13965
+ * Passing argument to
13966
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function-option-expression):
13967
+ *
13968
+ * ```js
13969
+ * await page.getByTestId('status').waitForFunction((element, value) => {
13970
+ * return element.textContent === value;
13971
+ * }, 'Ready');
12915
13972
  * ```
12916
13973
  *
12917
13974
  * @param pageFunction Function to be evaluated in the page context.
12918
13975
  * @param arg Optional argument to pass to
12919
- * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-evaluate-all-option-expression).
13976
+ * [`pageFunction`](https://playwright.dev/docs/api/class-locator#locator-wait-for-function-option-expression).
13977
+ * @param options
12920
13978
  */
12921
- evaluateAll<R, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E[], void, R>): Promise<R>;
13979
+ waitForFunction<Arg, E extends SVGElement | HTMLElement = SVGElement | HTMLElement>(pageFunction: PageFunctionOn<E, Arg, any>, arg?: Arg, options?: { timeout?: number, signal?: AbortSignal }): Promise<void>;
12922
13980
  /**
12923
13981
  * **NOTE** Always prefer using [Locator](https://playwright.dev/docs/api/class-locator)s and web assertions over
12924
13982
  * [ElementHandle](https://playwright.dev/docs/api/class-elementhandle)s because latter are inherently racy.
@@ -12927,17 +13985,13 @@ export interface Locator {
12927
13985
  * multiple elements match the locator, throws.
12928
13986
  * @param options
12929
13987
  */
12930
- elementHandle(options?: {
12931
- timeout?: number;
12932
- }): Promise<null|ElementHandle<SVGElement | HTMLElement>>;
13988
+ elementHandle(options?: { timeout?: number }): Promise<ElementHandle<SVGElement | HTMLElement>>;
12933
13989
  /**
12934
13990
  * Highlight the corresponding element(s) on the screen. Useful for debugging, don't commit the code that uses
12935
13991
  * [locator.highlight([options])](https://playwright.dev/docs/api/class-locator#locator-highlight).
12936
13992
  * @param options
12937
13993
  */
12938
- highlight(options?: {
12939
- style?: string | { [key: string]: string | number };
12940
- }): Promise<Disposable>;
13994
+ highlight(options?: { style?: string | { [key: string]: string | number } }): Promise<Disposable>;
12941
13995
  /**
12942
13996
  * Returns a human-readable representation of the locator, using the
12943
13997
  * [locator.description()](https://playwright.dev/docs/api/class-locator#locator-description) if one exists;
@@ -13083,6 +14137,17 @@ export interface Locator {
13083
14137
  */
13084
14138
  mode?: "ai"|"default";
13085
14139
 
14140
+ /**
14141
+ * Allows to cancel the operation using an
14142
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14143
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14144
+ * which can be changed using
14145
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14146
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14147
+ * `timeout: 0` to disable the timeout entirely.
14148
+ */
14149
+ signal?: AbortSignal;
14150
+
13086
14151
  /**
13087
14152
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13088
14153
  * option in the config, or by using the
@@ -13097,6 +14162,17 @@ export interface Locator {
13097
14162
  * @param options
13098
14163
  */
13099
14164
  blur(options?: {
14165
+ /**
14166
+ * Allows to cancel the operation using an
14167
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14168
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14169
+ * which can be changed using
14170
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14171
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14172
+ * `timeout: 0` to disable the timeout entirely.
14173
+ */
14174
+ signal?: AbortSignal;
14175
+
13100
14176
  /**
13101
14177
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13102
14178
  * option in the config, or by using the
@@ -13133,6 +14209,17 @@ export interface Locator {
13133
14209
  * @param options
13134
14210
  */
13135
14211
  boundingBox(options?: {
14212
+ /**
14213
+ * Allows to cancel the operation using an
14214
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14215
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14216
+ * which can be changed using
14217
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14218
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14219
+ * `timeout: 0` to disable the timeout entirely.
14220
+ */
14221
+ signal?: AbortSignal;
14222
+
13136
14223
  /**
13137
14224
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13138
14225
  * option in the config, or by using the
@@ -13213,6 +14300,25 @@ export interface Locator {
13213
14300
  y: number;
13214
14301
  };
13215
14302
 
14303
+ /**
14304
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
14305
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
14306
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
14307
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
14308
+ */
14309
+ scroll?: "auto"|"none";
14310
+
14311
+ /**
14312
+ * Allows to cancel the operation using an
14313
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14314
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14315
+ * which can be changed using
14316
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14317
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14318
+ * `timeout: 0` to disable the timeout entirely.
14319
+ */
14320
+ signal?: AbortSignal;
14321
+
13216
14322
  /**
13217
14323
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13218
14324
  * option in the config, or by using the
@@ -13261,6 +14367,17 @@ export interface Locator {
13261
14367
  */
13262
14368
  noWaitAfter?: boolean;
13263
14369
 
14370
+ /**
14371
+ * Allows to cancel the operation using an
14372
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14373
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14374
+ * which can be changed using
14375
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14376
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14377
+ * `timeout: 0` to disable the timeout entirely.
14378
+ */
14379
+ signal?: AbortSignal;
14380
+
13264
14381
  /**
13265
14382
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13266
14383
  * option in the config, or by using the
@@ -13358,6 +14475,25 @@ export interface Locator {
13358
14475
  y: number;
13359
14476
  };
13360
14477
 
14478
+ /**
14479
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
14480
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
14481
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
14482
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
14483
+ */
14484
+ scroll?: "auto"|"none";
14485
+
14486
+ /**
14487
+ * Allows to cancel the operation using an
14488
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14489
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14490
+ * which can be changed using
14491
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14492
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14493
+ * `timeout: 0` to disable the timeout entirely.
14494
+ */
14495
+ signal?: AbortSignal;
14496
+
13361
14497
  /**
13362
14498
  * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
13363
14499
  * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -13481,6 +14617,25 @@ export interface Locator {
13481
14617
  y: number;
13482
14618
  };
13483
14619
 
14620
+ /**
14621
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
14622
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
14623
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
14624
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
14625
+ */
14626
+ scroll?: "auto"|"none";
14627
+
14628
+ /**
14629
+ * Allows to cancel the operation using an
14630
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14631
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14632
+ * which can be changed using
14633
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14634
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14635
+ * `timeout: 0` to disable the timeout entirely.
14636
+ */
14637
+ signal?: AbortSignal;
14638
+
13484
14639
  /**
13485
14640
  * Defaults to 1. Sends `n` interpolated `mousemove` events to represent travel between Playwright's current cursor
13486
14641
  * position and the provided destination. When set to 1, emits a single `mousemove` event at the destination location.
@@ -13585,6 +14740,17 @@ export interface Locator {
13585
14740
  * @param options
13586
14741
  */
13587
14742
  dispatchEvent(type: string, eventInit?: EvaluationArgument, options?: {
14743
+ /**
14744
+ * Allows to cancel the operation using an
14745
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14746
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14747
+ * which can be changed using
14748
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14749
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14750
+ * `timeout: 0` to disable the timeout entirely.
14751
+ */
14752
+ signal?: AbortSignal;
14753
+
13588
14754
  /**
13589
14755
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13590
14756
  * option in the config, or by using the
@@ -13631,6 +14797,25 @@ export interface Locator {
13631
14797
  */
13632
14798
  noWaitAfter?: boolean;
13633
14799
 
14800
+ /**
14801
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
14802
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
14803
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
14804
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
14805
+ */
14806
+ scroll?: "auto"|"none";
14807
+
14808
+ /**
14809
+ * Allows to cancel the operation using an
14810
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14811
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14812
+ * which can be changed using
14813
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14814
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14815
+ * `timeout: 0` to disable the timeout entirely.
14816
+ */
14817
+ signal?: AbortSignal;
14818
+
13634
14819
  /**
13635
14820
  * Clicks on the source element at this point relative to the top-left corner of the element's padding box. If not
13636
14821
  * specified, some visible point of the element is used.
@@ -13754,6 +14939,17 @@ export interface Locator {
13754
14939
  y: number;
13755
14940
  };
13756
14941
 
14942
+ /**
14943
+ * Allows to cancel the operation using an
14944
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
14945
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
14946
+ * which can be changed using
14947
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
14948
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
14949
+ * `timeout: 0` to disable the timeout entirely.
14950
+ */
14951
+ signal?: AbortSignal;
14952
+
13757
14953
  /**
13758
14954
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13759
14955
  * option in the config, or by using the
@@ -13807,6 +15003,17 @@ export interface Locator {
13807
15003
  */
13808
15004
  noWaitAfter?: boolean;
13809
15005
 
15006
+ /**
15007
+ * Allows to cancel the operation using an
15008
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15009
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15010
+ * which can be changed using
15011
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15012
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15013
+ * `timeout: 0` to disable the timeout entirely.
15014
+ */
15015
+ signal?: AbortSignal;
15016
+
13810
15017
  /**
13811
15018
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13812
15019
  * option in the config, or by using the
@@ -13886,6 +15093,17 @@ export interface Locator {
13886
15093
  * @param options
13887
15094
  */
13888
15095
  focus(options?: {
15096
+ /**
15097
+ * Allows to cancel the operation using an
15098
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15099
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15100
+ * which can be changed using
15101
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15102
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15103
+ * `timeout: 0` to disable the timeout entirely.
15104
+ */
15105
+ signal?: AbortSignal;
15106
+
13889
15107
  /**
13890
15108
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13891
15109
  * option in the config, or by using the
@@ -13921,6 +15139,17 @@ export interface Locator {
13921
15139
  * @param options
13922
15140
  */
13923
15141
  getAttribute(name: string, options?: {
15142
+ /**
15143
+ * Allows to cancel the operation using an
15144
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15145
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15146
+ * which can be changed using
15147
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15148
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15149
+ * `timeout: 0` to disable the timeout entirely.
15150
+ */
15151
+ signal?: AbortSignal;
15152
+
13924
15153
  /**
13925
15154
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
13926
15155
  * option in the config, or by using the
@@ -14316,6 +15545,25 @@ export interface Locator {
14316
15545
  y: number;
14317
15546
  };
14318
15547
 
15548
+ /**
15549
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
15550
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
15551
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
15552
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
15553
+ */
15554
+ scroll?: "auto"|"none";
15555
+
15556
+ /**
15557
+ * Allows to cancel the operation using an
15558
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15559
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15560
+ * which can be changed using
15561
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15562
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15563
+ * `timeout: 0` to disable the timeout entirely.
15564
+ */
15565
+ signal?: AbortSignal;
15566
+
14319
15567
  /**
14320
15568
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14321
15569
  * option in the config, or by using the
@@ -14338,6 +15586,17 @@ export interface Locator {
14338
15586
  * @param options
14339
15587
  */
14340
15588
  innerHTML(options?: {
15589
+ /**
15590
+ * Allows to cancel the operation using an
15591
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15592
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15593
+ * which can be changed using
15594
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15595
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15596
+ * `timeout: 0` to disable the timeout entirely.
15597
+ */
15598
+ signal?: AbortSignal;
15599
+
14341
15600
  /**
14342
15601
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14343
15602
  * option in the config, or by using the
@@ -14359,6 +15618,17 @@ export interface Locator {
14359
15618
  * @param options
14360
15619
  */
14361
15620
  innerText(options?: {
15621
+ /**
15622
+ * Allows to cancel the operation using an
15623
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15624
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15625
+ * which can be changed using
15626
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15627
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15628
+ * `timeout: 0` to disable the timeout entirely.
15629
+ */
15630
+ signal?: AbortSignal;
15631
+
14362
15632
  /**
14363
15633
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14364
15634
  * option in the config, or by using the
@@ -14390,6 +15660,17 @@ export interface Locator {
14390
15660
  * @param options
14391
15661
  */
14392
15662
  inputValue(options?: {
15663
+ /**
15664
+ * Allows to cancel the operation using an
15665
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15666
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15667
+ * which can be changed using
15668
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15669
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15670
+ * `timeout: 0` to disable the timeout entirely.
15671
+ */
15672
+ signal?: AbortSignal;
15673
+
14393
15674
  /**
14394
15675
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14395
15676
  * option in the config, or by using the
@@ -14415,6 +15696,17 @@ export interface Locator {
14415
15696
  * @param options
14416
15697
  */
14417
15698
  isChecked(options?: {
15699
+ /**
15700
+ * Allows to cancel the operation using an
15701
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15702
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15703
+ * which can be changed using
15704
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15705
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15706
+ * `timeout: 0` to disable the timeout entirely.
15707
+ */
15708
+ signal?: AbortSignal;
15709
+
14418
15710
  /**
14419
15711
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14420
15712
  * option in the config, or by using the
@@ -14440,6 +15732,17 @@ export interface Locator {
14440
15732
  * @param options
14441
15733
  */
14442
15734
  isDisabled(options?: {
15735
+ /**
15736
+ * Allows to cancel the operation using an
15737
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15738
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15739
+ * which can be changed using
15740
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15741
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15742
+ * `timeout: 0` to disable the timeout entirely.
15743
+ */
15744
+ signal?: AbortSignal;
15745
+
14443
15746
  /**
14444
15747
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14445
15748
  * option in the config, or by using the
@@ -14467,6 +15770,17 @@ export interface Locator {
14467
15770
  * @param options
14468
15771
  */
14469
15772
  isEditable(options?: {
15773
+ /**
15774
+ * Allows to cancel the operation using an
15775
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15776
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15777
+ * which can be changed using
15778
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15779
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15780
+ * `timeout: 0` to disable the timeout entirely.
15781
+ */
15782
+ signal?: AbortSignal;
15783
+
14470
15784
  /**
14471
15785
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14472
15786
  * option in the config, or by using the
@@ -14492,6 +15806,17 @@ export interface Locator {
14492
15806
  * @param options
14493
15807
  */
14494
15808
  isEnabled(options?: {
15809
+ /**
15810
+ * Allows to cancel the operation using an
15811
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
15812
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
15813
+ * which can be changed using
15814
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
15815
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
15816
+ * `timeout: 0` to disable the timeout entirely.
15817
+ */
15818
+ signal?: AbortSignal;
15819
+
14495
15820
  /**
14496
15821
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14497
15822
  * option in the config, or by using the
@@ -14714,6 +16039,17 @@ export interface Locator {
14714
16039
  */
14715
16040
  noWaitAfter?: boolean;
14716
16041
 
16042
+ /**
16043
+ * Allows to cancel the operation using an
16044
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16045
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16046
+ * which can be changed using
16047
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16048
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16049
+ * `timeout: 0` to disable the timeout entirely.
16050
+ */
16051
+ signal?: AbortSignal;
16052
+
14717
16053
  /**
14718
16054
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14719
16055
  * option in the config, or by using the
@@ -14764,6 +16100,17 @@ export interface Locator {
14764
16100
  */
14765
16101
  noWaitAfter?: boolean;
14766
16102
 
16103
+ /**
16104
+ * Allows to cancel the operation using an
16105
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16106
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16107
+ * which can be changed using
16108
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16109
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16110
+ * `timeout: 0` to disable the timeout entirely.
16111
+ */
16112
+ signal?: AbortSignal;
16113
+
14767
16114
  /**
14768
16115
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14769
16116
  * option in the config, or by using the
@@ -14811,6 +16158,17 @@ export interface Locator {
14811
16158
  * @param options
14812
16159
  */
14813
16160
  scrollIntoViewIfNeeded(options?: {
16161
+ /**
16162
+ * Allows to cancel the operation using an
16163
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16164
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16165
+ * which can be changed using
16166
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16167
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16168
+ * `timeout: 0` to disable the timeout entirely.
16169
+ */
16170
+ signal?: AbortSignal;
16171
+
14814
16172
  /**
14815
16173
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14816
16174
  * option in the config, or by using the
@@ -14905,6 +16263,17 @@ export interface Locator {
14905
16263
  */
14906
16264
  noWaitAfter?: boolean;
14907
16265
 
16266
+ /**
16267
+ * Allows to cancel the operation using an
16268
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16269
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16270
+ * which can be changed using
16271
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16272
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16273
+ * `timeout: 0` to disable the timeout entirely.
16274
+ */
16275
+ signal?: AbortSignal;
16276
+
14908
16277
  /**
14909
16278
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14910
16279
  * option in the config, or by using the
@@ -14929,6 +16298,17 @@ export interface Locator {
14929
16298
  */
14930
16299
  force?: boolean;
14931
16300
 
16301
+ /**
16302
+ * Allows to cancel the operation using an
16303
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16304
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16305
+ * which can be changed using
16306
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16307
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16308
+ * `timeout: 0` to disable the timeout entirely.
16309
+ */
16310
+ signal?: AbortSignal;
16311
+
14932
16312
  /**
14933
16313
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14934
16314
  * option in the config, or by using the
@@ -14988,6 +16368,25 @@ export interface Locator {
14988
16368
  y: number;
14989
16369
  };
14990
16370
 
16371
+ /**
16372
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
16373
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
16374
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
16375
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
16376
+ */
16377
+ scroll?: "auto"|"none";
16378
+
16379
+ /**
16380
+ * Allows to cancel the operation using an
16381
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16382
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16383
+ * which can be changed using
16384
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16385
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16386
+ * `timeout: 0` to disable the timeout entirely.
16387
+ */
16388
+ signal?: AbortSignal;
16389
+
14991
16390
  /**
14992
16391
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
14993
16392
  * option in the config, or by using the
@@ -15082,6 +16481,17 @@ export interface Locator {
15082
16481
  */
15083
16482
  noWaitAfter?: boolean;
15084
16483
 
16484
+ /**
16485
+ * Allows to cancel the operation using an
16486
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16487
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16488
+ * which can be changed using
16489
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16490
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16491
+ * `timeout: 0` to disable the timeout entirely.
16492
+ */
16493
+ signal?: AbortSignal;
16494
+
15085
16495
  /**
15086
16496
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
15087
16497
  * option in the config, or by using the
@@ -15144,6 +16554,25 @@ export interface Locator {
15144
16554
  y: number;
15145
16555
  };
15146
16556
 
16557
+ /**
16558
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
16559
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
16560
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
16561
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
16562
+ */
16563
+ scroll?: "auto"|"none";
16564
+
16565
+ /**
16566
+ * Allows to cancel the operation using an
16567
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16568
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16569
+ * which can be changed using
16570
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16571
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16572
+ * `timeout: 0` to disable the timeout entirely.
16573
+ */
16574
+ signal?: AbortSignal;
16575
+
15147
16576
  /**
15148
16577
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
15149
16578
  * option in the config, or by using the
@@ -15171,6 +16600,17 @@ export interface Locator {
15171
16600
  * @param options
15172
16601
  */
15173
16602
  textContent(options?: {
16603
+ /**
16604
+ * Allows to cancel the operation using an
16605
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16606
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16607
+ * which can be changed using
16608
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16609
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16610
+ * `timeout: 0` to disable the timeout entirely.
16611
+ */
16612
+ signal?: AbortSignal;
16613
+
15174
16614
  /**
15175
16615
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
15176
16616
  * option in the config, or by using the
@@ -15207,6 +16647,17 @@ export interface Locator {
15207
16647
  */
15208
16648
  noWaitAfter?: boolean;
15209
16649
 
16650
+ /**
16651
+ * Allows to cancel the operation using an
16652
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16653
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16654
+ * which can be changed using
16655
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16656
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16657
+ * `timeout: 0` to disable the timeout entirely.
16658
+ */
16659
+ signal?: AbortSignal;
16660
+
15210
16661
  /**
15211
16662
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
15212
16663
  * option in the config, or by using the
@@ -15266,6 +16717,25 @@ export interface Locator {
15266
16717
  y: number;
15267
16718
  };
15268
16719
 
16720
+ /**
16721
+ * Controls whether Playwright scrolls the element into view before performing the action. Defaults to `"auto"`, which
16722
+ * scrolls the element into view when necessary, including scrolling nested scrollable containers. When set to
16723
+ * `"none"`, Playwright does not scroll the element and the action fails if the element is not already in the
16724
+ * viewport. This is useful to assert that an element is reachable by the user without additional scrolling.
16725
+ */
16726
+ scroll?: "auto"|"none";
16727
+
16728
+ /**
16729
+ * Allows to cancel the operation using an
16730
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16731
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16732
+ * which can be changed using
16733
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16734
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16735
+ * `timeout: 0` to disable the timeout entirely.
16736
+ */
16737
+ signal?: AbortSignal;
16738
+
15269
16739
  /**
15270
16740
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
15271
16741
  * option in the config, or by using the
@@ -15299,6 +16769,17 @@ export interface Locator {
15299
16769
  * @param options
15300
16770
  */
15301
16771
  waitFor(options?: {
16772
+ /**
16773
+ * Allows to cancel the operation using an
16774
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
16775
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
16776
+ * which can be changed using
16777
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
16778
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
16779
+ * `timeout: 0` to disable the timeout entirely.
16780
+ */
16781
+ signal?: AbortSignal;
16782
+
15302
16783
  /**
15303
16784
  * Defaults to `'visible'`. Can be either:
15304
16785
  * - `'attached'` - wait for element to be present in DOM.
@@ -15351,6 +16832,10 @@ export interface BrowserType<Unused = {}> {
15351
16832
  * If you are experiencing issues or attempting to use advanced functionality, you probably want to use
15352
16833
  * [browserType.connect(endpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
15353
16834
  *
16835
+ * **NOTE** Playwright maintains a curated list of arguments for launching the browser. If you launch the browser
16836
+ * without Playwright and do not pass the exact same arguments, some of Playwright functionality may be broken upon
16837
+ * connecting to the browser.
16838
+ *
15354
16839
  * **Usage**
15355
16840
  *
15356
16841
  * ```js
@@ -15377,6 +16862,10 @@ export interface BrowserType<Unused = {}> {
15377
16862
  * If you are experiencing issues or attempting to use advanced functionality, you probably want to use
15378
16863
  * [browserType.connect(endpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
15379
16864
  *
16865
+ * **NOTE** Playwright maintains a curated list of arguments for launching the browser. If you launch the browser
16866
+ * without Playwright and do not pass the exact same arguments, some of Playwright functionality may be broken upon
16867
+ * connecting to the browser.
16868
+ *
15380
16869
  * **Usage**
15381
16870
  *
15382
16871
  * ```js
@@ -15407,6 +16896,10 @@ export interface BrowserType<Unused = {}> {
15407
16896
  * If you are experiencing issues or attempting to use advanced functionality, you probably want to use
15408
16897
  * [browserType.connect(endpoint[, options])](https://playwright.dev/docs/api/class-browsertype#browser-type-connect).
15409
16898
  *
16899
+ * **NOTE** Playwright maintains a curated list of arguments for launching the browser. If you launch the browser
16900
+ * without Playwright and do not pass the exact same arguments, some of Playwright functionality may be broken upon
16901
+ * connecting to the browser.
16902
+ *
15410
16903
  * **Usage**
15411
16904
  *
15412
16905
  * ```js
@@ -15926,6 +17419,12 @@ export interface BrowserType<Unused = {}> {
15926
17419
  * Font size of the action title in pixels. Defaults to `24`.
15927
17420
  */
15928
17421
  fontSize?: number;
17422
+
17423
+ /**
17424
+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from
17425
+ * the previous action point to the next one. `"none"` disables the cursor decoration.
17426
+ */
17427
+ cursor?: "none"|"pointer";
15929
17428
  };
15930
17429
  };
15931
17430
 
@@ -16258,8 +17757,8 @@ export interface CDPSession {
16258
17757
  * **Usage**
16259
17758
  *
16260
17759
  * ```js
16261
- * session.on('event', ({ name, params }) => {
16262
- * console.log(`CDP event: ${name}`, params);
17760
+ * session.on('event', ({ method, params }) => {
17761
+ * console.log(`CDP event: ${method}`, params);
16263
17762
  * });
16264
17763
  * ```
16265
17764
  *
@@ -16308,8 +17807,8 @@ export interface CDPSession {
16308
17807
  * **Usage**
16309
17808
  *
16310
17809
  * ```js
16311
- * session.on('event', ({ name, params }) => {
16312
- * console.log(`CDP event: ${name}`, params);
17810
+ * session.on('event', ({ method, params }) => {
17811
+ * console.log(`CDP event: ${method}`, params);
16313
17812
  * });
16314
17813
  * ```
16315
17814
  *
@@ -16378,8 +17877,8 @@ export interface CDPSession {
16378
17877
  * **Usage**
16379
17878
  *
16380
17879
  * ```js
16381
- * session.on('event', ({ name, params }) => {
16382
- * console.log(`CDP event: ${name}`, params);
17880
+ * session.on('event', ({ method, params }) => {
17881
+ * console.log(`CDP event: ${method}`, params);
16383
17882
  * });
16384
17883
  * ```
16385
17884
  *
@@ -17094,7 +18593,7 @@ export interface ElectronApplication {
17094
18593
  /**
17095
18594
  * This event is issued when the application process has been terminated.
17096
18595
  */
17097
- waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: () => boolean | Promise<boolean>, timeout?: number } | (() => boolean | Promise<boolean>)): Promise<void>;
18596
+ waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: () => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | (() => boolean | Promise<boolean>)): Promise<void>;
17098
18597
 
17099
18598
  /**
17100
18599
  * Emitted when JavaScript within the Electron main process calls one of console API methods, e.g. `console.log` or
@@ -17116,13 +18615,13 @@ export interface ElectronApplication {
17116
18615
  * ```
17117
18616
  *
17118
18617
  */
17119
- waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
18618
+ waitForEvent(event: 'console', optionsOrPredicate?: { predicate?: (consoleMessage: ConsoleMessage) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((consoleMessage: ConsoleMessage) => boolean | Promise<boolean>)): Promise<ConsoleMessage>;
17120
18619
 
17121
18620
  /**
17122
18621
  * This event is issued for every window that is created **and loaded** in Electron. It contains a
17123
18622
  * [Page](https://playwright.dev/docs/api/class-page) that can be used for Playwright automation.
17124
18623
  */
17125
- waitForEvent(event: 'window', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
18624
+ waitForEvent(event: 'window', optionsOrPredicate?: { predicate?: (page: Page) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((page: Page) => boolean | Promise<boolean>)): Promise<Page>;
17126
18625
 
17127
18626
 
17128
18627
  /**
@@ -17569,6 +19068,17 @@ export interface APIRequestContext {
17569
19068
  */
17570
19069
  params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17571
19070
 
19071
+ /**
19072
+ * Allows to cancel the operation using an
19073
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
19074
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
19075
+ * which can be changed using
19076
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19077
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
19078
+ * `timeout: 0` to disable the timeout entirely.
19079
+ */
19080
+ signal?: AbortSignal;
19081
+
17572
19082
  /**
17573
19083
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17574
19084
  */
@@ -17706,6 +19216,17 @@ export interface APIRequestContext {
17706
19216
  */
17707
19217
  params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17708
19218
 
19219
+ /**
19220
+ * Allows to cancel the operation using an
19221
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
19222
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
19223
+ * which can be changed using
19224
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19225
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
19226
+ * `timeout: 0` to disable the timeout entirely.
19227
+ */
19228
+ signal?: AbortSignal;
19229
+
17709
19230
  /**
17710
19231
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17711
19232
  */
@@ -17818,6 +19339,17 @@ export interface APIRequestContext {
17818
19339
  */
17819
19340
  params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17820
19341
 
19342
+ /**
19343
+ * Allows to cancel the operation using an
19344
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
19345
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
19346
+ * which can be changed using
19347
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19348
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
19349
+ * `timeout: 0` to disable the timeout entirely.
19350
+ */
19351
+ signal?: AbortSignal;
19352
+
17821
19353
  /**
17822
19354
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17823
19355
  */
@@ -17904,6 +19436,17 @@ export interface APIRequestContext {
17904
19436
  */
17905
19437
  params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17906
19438
 
19439
+ /**
19440
+ * Allows to cancel the operation using an
19441
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
19442
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
19443
+ * which can be changed using
19444
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19445
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
19446
+ * `timeout: 0` to disable the timeout entirely.
19447
+ */
19448
+ signal?: AbortSignal;
19449
+
17907
19450
  /**
17908
19451
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17909
19452
  */
@@ -17990,6 +19533,17 @@ export interface APIRequestContext {
17990
19533
  */
17991
19534
  params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
17992
19535
 
19536
+ /**
19537
+ * Allows to cancel the operation using an
19538
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
19539
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
19540
+ * which can be changed using
19541
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19542
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
19543
+ * `timeout: 0` to disable the timeout entirely.
19544
+ */
19545
+ signal?: AbortSignal;
19546
+
17993
19547
  /**
17994
19548
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
17995
19549
  */
@@ -18118,6 +19672,17 @@ export interface APIRequestContext {
18118
19672
  */
18119
19673
  params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18120
19674
 
19675
+ /**
19676
+ * Allows to cancel the operation using an
19677
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
19678
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
19679
+ * which can be changed using
19680
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19681
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
19682
+ * `timeout: 0` to disable the timeout entirely.
19683
+ */
19684
+ signal?: AbortSignal;
19685
+
18121
19686
  /**
18122
19687
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18123
19688
  */
@@ -18204,6 +19769,17 @@ export interface APIRequestContext {
18204
19769
  */
18205
19770
  params?: { [key: string]: string|number|boolean; }|URLSearchParams|string;
18206
19771
 
19772
+ /**
19773
+ * Allows to cancel the operation using an
19774
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
19775
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
19776
+ * which can be changed using
19777
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
19778
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
19779
+ * `timeout: 0` to disable the timeout entirely.
19780
+ */
19781
+ signal?: AbortSignal;
19782
+
18207
19783
  /**
18208
19784
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
18209
19785
  */
@@ -18376,6 +19952,68 @@ export interface APIResponse {
18376
19952
  */
18377
19953
  text(): Promise<string>;
18378
19954
 
19955
+ /**
19956
+ * Returns resource timing information for given response. For redirected requests, returns the information for the
19957
+ * last request in the redirect chain. When the response is served [from the HAR file](https://playwright.dev/docs/mock#replaying-from-har),
19958
+ * timing information is not available and all the values are -1. Find more information at
19959
+ * [Resource Timing API](https://developer.mozilla.org/en-US/docs/Web/API/PerformanceResourceTiming).
19960
+ */
19961
+ timing(): {
19962
+ /**
19963
+ * Request start time in milliseconds elapsed since January 1, 1970 00:00:00 UTC
19964
+ */
19965
+ startTime: number;
19966
+
19967
+ /**
19968
+ * Time immediately before the client starts the domain name lookup for the resource. The value is given in
19969
+ * milliseconds relative to `startTime`, -1 if not available.
19970
+ */
19971
+ domainLookupStart: number;
19972
+
19973
+ /**
19974
+ * Time immediately after the client ends the domain name lookup for the resource. The value is given in milliseconds
19975
+ * relative to `startTime`, -1 if not available.
19976
+ */
19977
+ domainLookupEnd: number;
19978
+
19979
+ /**
19980
+ * Time immediately before the client starts establishing the connection to the server to retrieve the resource. The
19981
+ * value is given in milliseconds relative to `startTime`, -1 if not available.
19982
+ */
19983
+ connectStart: number;
19984
+
19985
+ /**
19986
+ * Time immediately before the client starts the handshake process to secure the current connection. The value is
19987
+ * given in milliseconds relative to `startTime`, -1 if not available.
19988
+ */
19989
+ secureConnectionStart: number;
19990
+
19991
+ /**
19992
+ * Time immediately after the client establishes the connection to the server to retrieve the resource. The value is
19993
+ * given in milliseconds relative to `startTime`, -1 if not available.
19994
+ */
19995
+ connectEnd: number;
19996
+
19997
+ /**
19998
+ * Time immediately before the client starts requesting the resource from the server, cache, or local resource. The
19999
+ * value is given in milliseconds relative to `startTime`, -1 if not available.
20000
+ */
20001
+ requestStart: number;
20002
+
20003
+ /**
20004
+ * Time immediately after the client receives the first byte of the response from the server, cache, or local
20005
+ * resource. The value is given in milliseconds relative to `startTime`, -1 if not available.
20006
+ */
20007
+ responseStart: number;
20008
+
20009
+ /**
20010
+ * Time immediately after the client receives the last byte of the resource or immediately before the transport
20011
+ * connection is closed, whichever comes first. The value is given in milliseconds relative to `startTime`, -1 if not
20012
+ * available.
20013
+ */
20014
+ responseEnd: number;
20015
+ };
20016
+
18379
20017
  /**
18380
20018
  * Contains the URL of the response.
18381
20019
  */
@@ -18726,7 +20364,10 @@ export interface Coverage {
18726
20364
  reportAnonymousScripts?: boolean;
18727
20365
 
18728
20366
  /**
18729
- * Whether to reset coverage on every navigation. Defaults to `true`.
20367
+ * **NOTE** Settings this to `false` may still reset on navigations.
20368
+ *
20369
+ * Whether to reset coverage on every navigation. Defaults to `true`. Note that passing `false` does not guarantee
20370
+ * that coverage persists through navigations, due to browser architecture limitations.
18730
20371
  */
18731
20372
  resetOnNavigation?: boolean;
18732
20373
  }): Promise<void>;
@@ -18812,7 +20453,7 @@ export interface Coverage {
18812
20453
  * `navigator.credentials.create()` / `navigator.credentials.get()` ceremonies in the page, without a real
18813
20454
  * authenticator or hardware security key.
18814
20455
  *
18815
- * There are two common ways to use it:
20456
+ * There are three common ways to use it:
18816
20457
  *
18817
20458
  * **Usage: seed a known credential**
18818
20459
  *
@@ -18833,10 +20474,10 @@ export interface Coverage {
18833
20474
  * // The page's navigator.credentials.get() is answered with the seeded passkey.
18834
20475
  * ```
18835
20476
  *
18836
- * **Usage: capture a passkey, then reuse it**
20477
+ * **Usage: capture a credential, then reuse it**
18837
20478
  *
18838
20479
  * ```js
18839
- * // setup test: let the app register a passkey, then save it.
20480
+ * // setup test: let the app register a passkey, then save the storage state with it.
18840
20481
  * const context = await browser.newContext();
18841
20482
  * await context.credentials.install();
18842
20483
  *
@@ -18861,6 +20502,10 @@ export interface Coverage {
18861
20502
  * // navigator.credentials.get() resolves the captured passkey — already signed in.
18862
20503
  * ```
18863
20504
  *
20505
+ * **Usage: save credentials in the storage state, restore later**
20506
+ *
20507
+ * See [authentication guide](https://playwright.dev/docs/auth) for examples of using saving and resotring the storage state.
20508
+ *
18864
20509
  * **Defaults**
18865
20510
  */
18866
20511
  export interface Credentials {
@@ -19143,14 +20788,15 @@ export interface Dialog {
19143
20788
  /**
19144
20789
  * [Disposable](https://playwright.dev/docs/api/class-disposable) is returned from various methods to allow undoing
19145
20790
  * the corresponding action. For example,
19146
- * [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) returns a
19147
- * [Disposable](https://playwright.dev/docs/api/class-disposable) that can be used to remove the init script.
20791
+ * [page.addInitScript(script[, arg, options])](https://playwright.dev/docs/api/class-page#page-add-init-script)
20792
+ * returns a [Disposable](https://playwright.dev/docs/api/class-disposable) that can be used to remove the init
20793
+ * script.
19148
20794
  */
19149
20795
  export interface Disposable {
19150
20796
  /**
19151
20797
  * Removes the associated resource. For example, removes the init script installed via
19152
- * [page.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-page#page-add-init-script) or
19153
- * [browserContext.addInitScript(script[, arg])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script).
20798
+ * [page.addInitScript(script[, arg, options])](https://playwright.dev/docs/api/class-page#page-add-init-script) or
20799
+ * [browserContext.addInitScript(script[, arg, options])](https://playwright.dev/docs/api/class-browsercontext#browser-context-add-init-script).
19154
20800
  */
19155
20801
  dispose(): Promise<void>;
19156
20802
 
@@ -19317,6 +20963,17 @@ export interface FileChooser {
19317
20963
  */
19318
20964
  noWaitAfter?: boolean;
19319
20965
 
20966
+ /**
20967
+ * Allows to cancel the operation using an
20968
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
20969
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
20970
+ * which can be changed using
20971
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
20972
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
20973
+ * `timeout: 0` to disable the timeout entirely.
20974
+ */
20975
+ signal?: AbortSignal;
20976
+
19320
20977
  /**
19321
20978
  * Maximum time in milliseconds. Defaults to `0` - no timeout. The default value can be changed via `actionTimeout`
19322
20979
  * option in the config, or by using the
@@ -20441,49 +22098,49 @@ export interface Request {
20441
22098
  startTime: number;
20442
22099
 
20443
22100
  /**
20444
- * Time immediately before the browser starts the domain name lookup for the resource. The value is given in
22101
+ * Time immediately before the client starts the domain name lookup for the resource. The value is given in
20445
22102
  * milliseconds relative to `startTime`, -1 if not available.
20446
22103
  */
20447
22104
  domainLookupStart: number;
20448
22105
 
20449
22106
  /**
20450
- * Time immediately after the browser starts the domain name lookup for the resource. The value is given in
20451
- * milliseconds relative to `startTime`, -1 if not available.
22107
+ * Time immediately after the client ends the domain name lookup for the resource. The value is given in milliseconds
22108
+ * relative to `startTime`, -1 if not available.
20452
22109
  */
20453
22110
  domainLookupEnd: number;
20454
22111
 
20455
22112
  /**
20456
- * Time immediately before the user agent starts establishing the connection to the server to retrieve the resource.
20457
- * The value is given in milliseconds relative to `startTime`, -1 if not available.
22113
+ * Time immediately before the client starts establishing the connection to the server to retrieve the resource. The
22114
+ * value is given in milliseconds relative to `startTime`, -1 if not available.
20458
22115
  */
20459
22116
  connectStart: number;
20460
22117
 
20461
22118
  /**
20462
- * Time immediately before the browser starts the handshake process to secure the current connection. The value is
22119
+ * Time immediately before the client starts the handshake process to secure the current connection. The value is
20463
22120
  * given in milliseconds relative to `startTime`, -1 if not available.
20464
22121
  */
20465
22122
  secureConnectionStart: number;
20466
22123
 
20467
22124
  /**
20468
- * Time immediately before the user agent starts establishing the connection to the server to retrieve the resource.
20469
- * The value is given in milliseconds relative to `startTime`, -1 if not available.
22125
+ * Time immediately after the client establishes the connection to the server to retrieve the resource. The value is
22126
+ * given in milliseconds relative to `startTime`, -1 if not available.
20470
22127
  */
20471
22128
  connectEnd: number;
20472
22129
 
20473
22130
  /**
20474
- * Time immediately before the browser starts requesting the resource from the server, cache, or local resource. The
22131
+ * Time immediately before the client starts requesting the resource from the server, cache, or local resource. The
20475
22132
  * value is given in milliseconds relative to `startTime`, -1 if not available.
20476
22133
  */
20477
22134
  requestStart: number;
20478
22135
 
20479
22136
  /**
20480
- * Time immediately after the browser receives the first byte of the response from the server, cache, or local
22137
+ * Time immediately after the client receives the first byte of the response from the server, cache, or local
20481
22138
  * resource. The value is given in milliseconds relative to `startTime`, -1 if not available.
20482
22139
  */
20483
22140
  responseStart: number;
20484
22141
 
20485
22142
  /**
20486
- * Time immediately after the browser receives the last byte of the resource or immediately before the transport
22143
+ * Time immediately after the client receives the last byte of the resource or immediately before the transport
20487
22144
  * connection is closed, whichever comes first. The value is given in milliseconds relative to `startTime`, -1 if not
20488
22145
  * available.
20489
22146
  */
@@ -20894,6 +22551,17 @@ export interface Route {
20894
22551
  */
20895
22552
  postData?: string|Buffer|Serializable;
20896
22553
 
22554
+ /**
22555
+ * Allows to cancel the operation using an
22556
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
22557
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
22558
+ * which can be changed using
22559
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
22560
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
22561
+ * `timeout: 0` to disable the timeout entirely.
22562
+ */
22563
+ signal?: AbortSignal;
22564
+
20897
22565
  /**
20898
22566
  * Request timeout in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
20899
22567
  */
@@ -21611,7 +23279,7 @@ export interface WebSocket {
21611
23279
  /**
21612
23280
  * Fired when the websocket closes.
21613
23281
  */
21614
- waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
23282
+ waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (webSocket: WebSocket) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((webSocket: WebSocket) => boolean | Promise<boolean>)): Promise<WebSocket>;
21615
23283
 
21616
23284
  /**
21617
23285
  * Fired when the websocket receives a frame.
@@ -21621,7 +23289,7 @@ export interface WebSocket {
21621
23289
  * frame payload
21622
23290
  */
21623
23291
  payload: string|Buffer;
21624
- }) => boolean | Promise<boolean>, timeout?: number } | ((data: {
23292
+ }) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((data: {
21625
23293
  /**
21626
23294
  * frame payload
21627
23295
  */
@@ -21641,7 +23309,7 @@ export interface WebSocket {
21641
23309
  * frame payload
21642
23310
  */
21643
23311
  payload: string|Buffer;
21644
- }) => boolean | Promise<boolean>, timeout?: number } | ((data: {
23312
+ }) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((data: {
21645
23313
  /**
21646
23314
  * frame payload
21647
23315
  */
@@ -21656,7 +23324,7 @@ export interface WebSocket {
21656
23324
  /**
21657
23325
  * Fired when the websocket has an error.
21658
23326
  */
21659
- waitForEvent(event: 'socketerror', optionsOrPredicate?: { predicate?: (string: string) => boolean | Promise<boolean>, timeout?: number } | ((string: string) => boolean | Promise<boolean>)): Promise<string>;
23327
+ waitForEvent(event: 'socketerror', optionsOrPredicate?: { predicate?: (string: string) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((string: string) => boolean | Promise<boolean>)): Promise<string>;
21660
23328
 
21661
23329
  }
21662
23330
 
@@ -22009,6 +23677,12 @@ export interface Electron {
22009
23677
  * Font size of the action title in pixels. Defaults to `24`.
22010
23678
  */
22011
23679
  fontSize?: number;
23680
+
23681
+ /**
23682
+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from
23683
+ * the previous action point to the next one. `"none"` disables the cursor decoration.
23684
+ */
23685
+ cursor?: "none"|"pointer";
22012
23686
  };
22013
23687
  };
22014
23688
 
@@ -22697,6 +24371,12 @@ export interface AndroidDevice {
22697
24371
  * Font size of the action title in pixels. Defaults to `24`.
22698
24372
  */
22699
24373
  fontSize?: number;
24374
+
24375
+ /**
24376
+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from
24377
+ * the previous action point to the next one. `"none"` disables the cursor decoration.
24378
+ */
24379
+ cursor?: "none"|"pointer";
22700
24380
  };
22701
24381
  };
22702
24382
 
@@ -23008,12 +24688,12 @@ export interface AndroidDevice {
23008
24688
  /**
23009
24689
  * Emitted when the device connection gets closed.
23010
24690
  */
23011
- waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (androidDevice: AndroidDevice) => boolean | Promise<boolean>, timeout?: number } | ((androidDevice: AndroidDevice) => boolean | Promise<boolean>)): Promise<AndroidDevice>;
24691
+ waitForEvent(event: 'close', optionsOrPredicate?: { predicate?: (androidDevice: AndroidDevice) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((androidDevice: AndroidDevice) => boolean | Promise<boolean>)): Promise<AndroidDevice>;
23012
24692
 
23013
24693
  /**
23014
24694
  * Emitted when a new WebView instance is detected.
23015
24695
  */
23016
- waitForEvent(event: 'webview', optionsOrPredicate?: { predicate?: (androidWebView: AndroidWebView) => boolean | Promise<boolean>, timeout?: number } | ((androidWebView: AndroidWebView) => boolean | Promise<boolean>)): Promise<AndroidWebView>;
24696
+ waitForEvent(event: 'webview', optionsOrPredicate?: { predicate?: (androidWebView: AndroidWebView) => boolean | Promise<boolean>, timeout?: number, signal?: AbortSignal } | ((androidWebView: AndroidWebView) => boolean | Promise<boolean>)): Promise<AndroidWebView>;
23017
24697
 
23018
24698
 
23019
24699
  /**
@@ -23520,7 +25200,8 @@ export interface LocatorScreenshotOptions {
23520
25200
  path?: string;
23521
25201
 
23522
25202
  /**
23523
- * The quality of the image, between 0-100. Not applicable to `png` images.
25203
+ * The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For
25204
+ * `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression.
23524
25205
  */
23525
25206
  quality?: number;
23526
25207
 
@@ -23533,6 +25214,17 @@ export interface LocatorScreenshotOptions {
23533
25214
  */
23534
25215
  scale?: "css"|"device";
23535
25216
 
25217
+ /**
25218
+ * Allows to cancel the operation using an
25219
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
25220
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
25221
+ * which can be changed using
25222
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
25223
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
25224
+ * `timeout: 0` to disable the timeout entirely.
25225
+ */
25226
+ signal?: AbortSignal;
25227
+
23536
25228
  /**
23537
25229
  * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
23538
25230
  * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
@@ -23551,10 +25243,21 @@ export interface LocatorScreenshotOptions {
23551
25243
  /**
23552
25244
  * Specify screenshot type, defaults to `png`.
23553
25245
  */
23554
- type?: "png"|"jpeg";
25246
+ type?: "png"|"jpeg"|"webp";
23555
25247
  }
23556
25248
 
23557
25249
  interface ElementHandleWaitForSelectorOptions {
25250
+ /**
25251
+ * Allows to cancel the operation using an
25252
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
25253
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
25254
+ * which can be changed using
25255
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
25256
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
25257
+ * `timeout: 0` to disable the timeout entirely.
25258
+ */
25259
+ signal?: AbortSignal;
25260
+
23558
25261
  /**
23559
25262
  * Defaults to `'visible'`. Can be either:
23560
25263
  * - `'attached'` - wait for element to be present in DOM.
@@ -23877,6 +25580,12 @@ export interface BrowserContextOptions {
23877
25580
  * Font size of the action title in pixels. Defaults to `24`.
23878
25581
  */
23879
25582
  fontSize?: number;
25583
+
25584
+ /**
25585
+ * Cursor decoration shown for pointer actions. `"pointer"` (the default) renders a mouse pointer that animates from
25586
+ * the previous action point to the next one. `"none"` disables the cursor decoration.
25587
+ */
25588
+ cursor?: "none"|"pointer";
23880
25589
  };
23881
25590
  };
23882
25591
 
@@ -24071,6 +25780,17 @@ export interface Cookie {
24071
25780
  }
24072
25781
 
24073
25782
  interface PageWaitForSelectorOptions {
25783
+ /**
25784
+ * Allows to cancel the operation using an
25785
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
25786
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
25787
+ * which can be changed using
25788
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
25789
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
25790
+ * `timeout: 0` to disable the timeout entirely.
25791
+ */
25792
+ signal?: AbortSignal;
25793
+
24074
25794
  /**
24075
25795
  * Defaults to `'visible'`. Can be either:
24076
25796
  * - `'attached'` - wait for element to be present in DOM.
@@ -24107,6 +25827,17 @@ interface PageWaitForFunctionOptions {
24107
25827
  */
24108
25828
  polling?: number|"raf";
24109
25829
 
25830
+ /**
25831
+ * Allows to cancel the operation using an
25832
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
25833
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
25834
+ * which can be changed using
25835
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
25836
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
25837
+ * `timeout: 0` to disable the timeout entirely.
25838
+ */
25839
+ signal?: AbortSignal;
25840
+
24110
25841
  /**
24111
25842
  * Maximum time to wait for in milliseconds. Defaults to `0` - no timeout. The default value can be changed via
24112
25843
  * `actionTimeout` option in the config, or by using the
@@ -24193,7 +25924,8 @@ export interface PageScreenshotOptions {
24193
25924
  path?: string;
24194
25925
 
24195
25926
  /**
24196
- * The quality of the image, between 0-100. Not applicable to `png` images.
25927
+ * The quality of the image, between 0-100. Not applicable to `png` images. For `jpeg` the default is `80`. For
25928
+ * `webp`, a quality of `100` (the default) produces a lossless image, while lower values use lossy compression.
24197
25929
  */
24198
25930
  quality?: number;
24199
25931
 
@@ -24206,6 +25938,17 @@ export interface PageScreenshotOptions {
24206
25938
  */
24207
25939
  scale?: "css"|"device";
24208
25940
 
25941
+ /**
25942
+ * Allows to cancel the operation using an
25943
+ * [`AbortSignal`](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal). If the signal is aborted, the
25944
+ * operation will be aborted and throw an error. Note that providing a signal does not disable the default timeout,
25945
+ * which can be changed using
25946
+ * [browserContext.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-browsercontext#browser-context-set-default-timeout)
25947
+ * or [page.setDefaultTimeout(timeout)](https://playwright.dev/docs/api/class-page#page-set-default-timeout); pass
25948
+ * `timeout: 0` to disable the timeout entirely.
25949
+ */
25950
+ signal?: AbortSignal;
25951
+
24209
25952
  /**
24210
25953
  * Text of the stylesheet to apply while making the screenshot. This is where you can hide dynamic elements, make
24211
25954
  * elements invisible or change their properties to help you creating repeatable screenshots. This stylesheet pierces
@@ -24224,7 +25967,7 @@ export interface PageScreenshotOptions {
24224
25967
  /**
24225
25968
  * Specify screenshot type, defaults to `png`.
24226
25969
  */
24227
- type?: "png"|"jpeg";
25970
+ type?: "png"|"jpeg"|"webp";
24228
25971
  }
24229
25972
 
24230
25973
  type Devices = {