@types/k6 0.51.0 → 0.52.0
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.
- k6/README.md +1 -1
- k6/browser.d.ts +3913 -0
- k6/experimental/browser.d.ts +991 -11
- k6/http.d.ts +2 -2
- k6/index.d.ts +1 -0
- k6/package.json +3 -3
k6/experimental/browser.d.ts
CHANGED
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* - [PointerEvent](https://developer.mozilla.org/en-US/docs/Web/API/PointerEvent/PointerEvent)
|
|
9
9
|
* - [TouchEvent](https://developer.mozilla.org/en-US/docs/Web/API/TouchEvent/TouchEvent)
|
|
10
10
|
* - [Event](https://developer.mozilla.org/en-US/docs/Web/API/Event/Event)
|
|
11
|
+
*
|
|
12
|
+
* @deprecated Use "k6/browser" module instead.
|
|
11
13
|
*/
|
|
12
14
|
export type EvaluationArgument = object;
|
|
13
15
|
|
|
@@ -20,36 +22,48 @@ export type Unboxed<Arg> = Arg extends [infer A0, infer A1] ? [Unboxed<A0>, Unbo
|
|
|
20
22
|
: Arg extends object ? { [Key in keyof Arg]: Unboxed<Arg[Key]> }
|
|
21
23
|
: Arg;
|
|
22
24
|
|
|
23
|
-
|
|
25
|
+
/**
|
|
24
26
|
* CPUProfile is the mandatory input to be passed into {@link Page}'s
|
|
25
27
|
* `throttleCPU` method.
|
|
28
|
+
*
|
|
29
|
+
* @deprecated Use "k6/browser" module instead.
|
|
26
30
|
*/
|
|
27
31
|
export interface CPUProfile {
|
|
28
|
-
|
|
32
|
+
/**
|
|
29
33
|
* rate as a slowdown factor (1 is no throttle, 2 is 2x slowdown, etc).
|
|
34
|
+
*
|
|
35
|
+
* @deprecated Use "k6/browser" module instead.
|
|
30
36
|
*/
|
|
31
37
|
rate: number;
|
|
32
38
|
}
|
|
33
39
|
|
|
34
|
-
|
|
40
|
+
/**
|
|
35
41
|
* NetworkProfile is the mandatory input to be passed into {@link Page}'s
|
|
36
42
|
* `throttleNetwork` method.
|
|
43
|
+
*
|
|
44
|
+
* @deprecated Use "k6/browser" module instead.
|
|
37
45
|
*/
|
|
38
46
|
export interface NetworkProfile {
|
|
39
|
-
|
|
47
|
+
/**
|
|
40
48
|
* Minimum latency from request sent to response headers received (ms).
|
|
49
|
+
*
|
|
50
|
+
* @deprecated Use "k6/browser" module instead.
|
|
41
51
|
*/
|
|
42
52
|
latency: number;
|
|
43
53
|
|
|
44
|
-
|
|
54
|
+
/**
|
|
45
55
|
* Maximal aggregated download throughput (bytes/sec). -1 disables download
|
|
46
56
|
* throttling.
|
|
57
|
+
*
|
|
58
|
+
* @deprecated Use "k6/browser" module instead.
|
|
47
59
|
*/
|
|
48
60
|
download: number;
|
|
49
61
|
|
|
50
|
-
|
|
62
|
+
/**
|
|
51
63
|
* Maximal aggregated upload throughput (bytes/sec). -1 disables upload
|
|
52
64
|
* throttling.
|
|
65
|
+
*
|
|
66
|
+
* @deprecated Use "k6/browser" module instead.
|
|
53
67
|
*/
|
|
54
68
|
upload: number;
|
|
55
69
|
}
|
|
@@ -57,16 +71,22 @@ export interface NetworkProfile {
|
|
|
57
71
|
export interface SelectOptionsObject {
|
|
58
72
|
/**
|
|
59
73
|
* Matches by `option.value`.
|
|
74
|
+
*
|
|
75
|
+
* @deprecated Use "k6/browser" module instead.
|
|
60
76
|
*/
|
|
61
77
|
value?: string;
|
|
62
78
|
|
|
63
79
|
/**
|
|
64
80
|
* Matches by `option.label`.
|
|
81
|
+
*
|
|
82
|
+
* @deprecated Use "k6/browser" module instead.
|
|
65
83
|
*/
|
|
66
84
|
label?: string;
|
|
67
85
|
|
|
68
86
|
/**
|
|
69
87
|
* Matches by the index.
|
|
88
|
+
*
|
|
89
|
+
* @deprecated Use "k6/browser" module instead.
|
|
70
90
|
*/
|
|
71
91
|
index?: number;
|
|
72
92
|
}
|
|
@@ -95,6 +115,8 @@ export interface TimeoutOptions {
|
|
|
95
115
|
/**
|
|
96
116
|
* Maximum time in milliseconds. Pass 0 to disable the timeout. Default is overridden by the setDefaultTimeout option on `BrowserContext` or `Page`.
|
|
97
117
|
* Defaults to 30000.
|
|
118
|
+
*
|
|
119
|
+
* @deprecated Use "k6/browser" module instead.
|
|
98
120
|
*/
|
|
99
121
|
timeout?: number;
|
|
100
122
|
}
|
|
@@ -104,6 +126,8 @@ export interface StrictnessOptions {
|
|
|
104
126
|
* When `true`, the call requires selector to resolve to a single element.
|
|
105
127
|
* If given selector resolves to more than one element, the call throws
|
|
106
128
|
* an exception. Defaults to `false`.
|
|
129
|
+
*
|
|
130
|
+
* @deprecated Use "k6/browser" module instead.
|
|
107
131
|
*/
|
|
108
132
|
strict?: boolean;
|
|
109
133
|
}
|
|
@@ -111,6 +135,8 @@ export interface StrictnessOptions {
|
|
|
111
135
|
export interface EventSequenceOptions {
|
|
112
136
|
/**
|
|
113
137
|
* Delay between events in milliseconds. Defaults to 0.
|
|
138
|
+
*
|
|
139
|
+
* @deprecated Use "k6/browser" module instead.
|
|
114
140
|
*/
|
|
115
141
|
delay?: number;
|
|
116
142
|
}
|
|
@@ -118,16 +144,22 @@ export interface EventSequenceOptions {
|
|
|
118
144
|
export interface File {
|
|
119
145
|
/**
|
|
120
146
|
* File name
|
|
147
|
+
*
|
|
148
|
+
* @deprecated Use "k6/browser" module instead.
|
|
121
149
|
*/
|
|
122
150
|
name: string;
|
|
123
151
|
|
|
124
152
|
/**
|
|
125
153
|
* File type
|
|
154
|
+
*
|
|
155
|
+
* @deprecated Use "k6/browser" module instead.
|
|
126
156
|
*/
|
|
127
157
|
mimeType: string;
|
|
128
158
|
|
|
129
159
|
/**
|
|
130
160
|
* File content
|
|
161
|
+
*
|
|
162
|
+
* @deprecated Use "k6/browser" module instead.
|
|
131
163
|
*/
|
|
132
164
|
buffer: ArrayBuffer;
|
|
133
165
|
}
|
|
@@ -136,12 +168,16 @@ export type ElementHandleOptions = {
|
|
|
136
168
|
/**
|
|
137
169
|
* Setting this to `true` will bypass the actionability checks (visible,
|
|
138
170
|
* stable, enabled). Defaults to `false`.
|
|
171
|
+
*
|
|
172
|
+
* @deprecated Use "k6/browser" module instead.
|
|
139
173
|
*/
|
|
140
174
|
force?: boolean;
|
|
141
175
|
|
|
142
176
|
/**
|
|
143
177
|
* If set to `true` and a navigation occurs from performing this action, it will not wait for it to complete.
|
|
144
178
|
* Defaults to `false`.
|
|
179
|
+
*
|
|
180
|
+
* @deprecated Use "k6/browser" module instead.
|
|
145
181
|
*/
|
|
146
182
|
noWaitAfter?: boolean;
|
|
147
183
|
} & TimeoutOptions;
|
|
@@ -151,6 +187,8 @@ export type ElementHandlePointerOptions = ElementHandleOptions & {
|
|
|
151
187
|
* Setting this to `true` will perform the actionability checks without
|
|
152
188
|
* performing the action. Useful to wait until the element is ready for the
|
|
153
189
|
* action without performing it. Defaults to `false`.
|
|
190
|
+
*
|
|
191
|
+
* @deprecated Use "k6/browser" module instead.
|
|
154
192
|
*/
|
|
155
193
|
trial?: boolean;
|
|
156
194
|
};
|
|
@@ -159,6 +197,8 @@ export type ElementClickOptions = ElementHandlePointerOptions & {
|
|
|
159
197
|
/**
|
|
160
198
|
* A point to use relative to the top left corner of the element. If not supplied,
|
|
161
199
|
* a visible point of the element is used.
|
|
200
|
+
*
|
|
201
|
+
* @deprecated Use "k6/browser" module instead.
|
|
162
202
|
*/
|
|
163
203
|
position?: { x: number; y: number };
|
|
164
204
|
};
|
|
@@ -167,6 +207,8 @@ export interface KeyboardModifierOptions {
|
|
|
167
207
|
/**
|
|
168
208
|
* `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the action.
|
|
169
209
|
* If not specified, currently pressed modifiers are used.
|
|
210
|
+
*
|
|
211
|
+
* @deprecated Use "k6/browser" module instead.
|
|
170
212
|
*/
|
|
171
213
|
modifiers?: KeyboardModifier[];
|
|
172
214
|
}
|
|
@@ -176,6 +218,8 @@ export type KeyboardPressOptions =
|
|
|
176
218
|
/**
|
|
177
219
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
178
220
|
* will not wait for it to complete. Defaults to `false`.
|
|
221
|
+
*
|
|
222
|
+
* @deprecated Use "k6/browser" module instead.
|
|
179
223
|
*/
|
|
180
224
|
noWaitAfter?: boolean;
|
|
181
225
|
}
|
|
@@ -188,6 +232,8 @@ export type MouseClickOptions = {
|
|
|
188
232
|
/**
|
|
189
233
|
* The mouse button to use during the action.
|
|
190
234
|
* Defaults to `left`.
|
|
235
|
+
*
|
|
236
|
+
* @deprecated Use "k6/browser" module instead.
|
|
191
237
|
*/
|
|
192
238
|
button?: MouseButton;
|
|
193
239
|
} & EventSequenceOptions;
|
|
@@ -196,6 +242,8 @@ export type MouseMultiClickOptions = MouseClickOptions & {
|
|
|
196
242
|
/**
|
|
197
243
|
* The number of times the action is performed.
|
|
198
244
|
* Defaults to 1.
|
|
245
|
+
*
|
|
246
|
+
* @deprecated Use "k6/browser" module instead.
|
|
199
247
|
*/
|
|
200
248
|
clickCount?: number;
|
|
201
249
|
};
|
|
@@ -204,11 +252,15 @@ export interface MouseDownUpOptions {
|
|
|
204
252
|
/**
|
|
205
253
|
* The mouse button to use during the action.
|
|
206
254
|
* Defaults to `left`.
|
|
255
|
+
*
|
|
256
|
+
* @deprecated Use "k6/browser" module instead.
|
|
207
257
|
*/
|
|
208
258
|
button?: MouseButton;
|
|
209
259
|
|
|
210
260
|
/**
|
|
211
261
|
* Defaults to 1.
|
|
262
|
+
*
|
|
263
|
+
* @deprecated Use "k6/browser" module instead.
|
|
212
264
|
*/
|
|
213
265
|
clickCount?: number;
|
|
214
266
|
}
|
|
@@ -225,6 +277,8 @@ export type ContentLoadOptions = {
|
|
|
225
277
|
* when there are no network connections for at least `500` ms. Don't use
|
|
226
278
|
* this method for testing especially with chatty websites where the event
|
|
227
279
|
* may never fire, rely on web assertions to assess readiness instead.
|
|
280
|
+
*
|
|
281
|
+
* @deprecated Use "k6/browser" module instead.
|
|
228
282
|
*/
|
|
229
283
|
waitUntil?: LifecycleEvent;
|
|
230
284
|
} & TimeoutOptions;
|
|
@@ -232,6 +286,8 @@ export type ContentLoadOptions = {
|
|
|
232
286
|
export type NavigationOptions = {
|
|
233
287
|
/**
|
|
234
288
|
* Referer header value.
|
|
289
|
+
*
|
|
290
|
+
* @deprecated Use "k6/browser" module instead.
|
|
235
291
|
*/
|
|
236
292
|
referer?: string;
|
|
237
293
|
} & ContentLoadOptions;
|
|
@@ -239,18 +295,24 @@ export type NavigationOptions = {
|
|
|
239
295
|
export interface ResourceTiming {
|
|
240
296
|
/**
|
|
241
297
|
* Request start time in milliseconds elapsed since January 1, 1970 00:00:00 UTC
|
|
298
|
+
*
|
|
299
|
+
* @deprecated Use "k6/browser" module instead.
|
|
242
300
|
*/
|
|
243
301
|
startTime: number;
|
|
244
302
|
|
|
245
303
|
/**
|
|
246
304
|
* Time immediately before the browser starts the domain name lookup for the resource.
|
|
247
305
|
* The value is given in milliseconds relative to `startTime`, -1 if not available.
|
|
306
|
+
*
|
|
307
|
+
* @deprecated Use "k6/browser" module instead.
|
|
248
308
|
*/
|
|
249
309
|
domainLookupStart: number;
|
|
250
310
|
|
|
251
311
|
/**
|
|
252
312
|
* Time immediately after the browser ends the domain name lookup for the resource.
|
|
253
313
|
* The value is given in milliseconds relative to `startTime`, -1 if not available.
|
|
314
|
+
*
|
|
315
|
+
* @deprecated Use "k6/browser" module instead.
|
|
254
316
|
*/
|
|
255
317
|
domainLookupEnd: number;
|
|
256
318
|
|
|
@@ -258,12 +320,16 @@ export interface ResourceTiming {
|
|
|
258
320
|
* Time immediately before the user agent starts establishing the connection to the server
|
|
259
321
|
* to retrieve the resource. The value is given in milliseconds relative to `startTime`,
|
|
260
322
|
* -1 if not available.
|
|
323
|
+
*
|
|
324
|
+
* @deprecated Use "k6/browser" module instead.
|
|
261
325
|
*/
|
|
262
326
|
connectStart: number;
|
|
263
327
|
|
|
264
328
|
/**
|
|
265
329
|
* Time immediately before the browser starts the handshake process to secure the current
|
|
266
330
|
* connection. The value is given in milliseconds relative to `startTime`, -1 if not available.
|
|
331
|
+
*
|
|
332
|
+
* @deprecated Use "k6/browser" module instead.
|
|
267
333
|
*/
|
|
268
334
|
secureConnectionStart: number;
|
|
269
335
|
|
|
@@ -271,6 +337,8 @@ export interface ResourceTiming {
|
|
|
271
337
|
* Time immediately after the user agent establishes the connection to the server
|
|
272
338
|
* to retrieve the resource. The value is given in milliseconds relative to `startTime`,
|
|
273
339
|
* -1 if not available.
|
|
340
|
+
*
|
|
341
|
+
* @deprecated Use "k6/browser" module instead.
|
|
274
342
|
*/
|
|
275
343
|
connectEnd: number;
|
|
276
344
|
|
|
@@ -278,6 +346,8 @@ export interface ResourceTiming {
|
|
|
278
346
|
* Time immediately before the browser starts requesting the resource from the server,
|
|
279
347
|
* cache, or local resource. The value is given in milliseconds relative to `startTime`,
|
|
280
348
|
* -1 if not available.
|
|
349
|
+
*
|
|
350
|
+
* @deprecated Use "k6/browser" module instead.
|
|
281
351
|
*/
|
|
282
352
|
requestStart: number;
|
|
283
353
|
|
|
@@ -285,6 +355,8 @@ export interface ResourceTiming {
|
|
|
285
355
|
* Time immediately after the browser receives the first byte of the response from the server,
|
|
286
356
|
* cache, or local resource. The value is given in milliseconds relative to `startTime`,
|
|
287
357
|
* -1 if not available.
|
|
358
|
+
*
|
|
359
|
+
* @deprecated Use "k6/browser" module instead.
|
|
288
360
|
*/
|
|
289
361
|
responseStart: number;
|
|
290
362
|
|
|
@@ -292,6 +364,8 @@ export interface ResourceTiming {
|
|
|
292
364
|
* Time immediately after the browser receives the last byte of the resource or immediately
|
|
293
365
|
* before the transport connection is closed, whichever comes first. The value is given
|
|
294
366
|
* in milliseconds relative to `startTime`, -1 if not available.
|
|
367
|
+
*
|
|
368
|
+
* @deprecated Use "k6/browser" module instead.
|
|
295
369
|
*/
|
|
296
370
|
responseEnd: number;
|
|
297
371
|
}
|
|
@@ -300,35 +374,47 @@ export interface SecurityDetailsObject {
|
|
|
300
374
|
/**
|
|
301
375
|
* Common Name component of the Issuer field. The value is extracted from the
|
|
302
376
|
* certificate. This should only be used for informational purposes.
|
|
377
|
+
*
|
|
378
|
+
* @deprecated Use "k6/browser" module instead.
|
|
303
379
|
*/
|
|
304
380
|
issuer?: string;
|
|
305
381
|
|
|
306
382
|
/**
|
|
307
383
|
* The specific TLS protocol used. For example `TLS 1.3`.
|
|
384
|
+
*
|
|
385
|
+
* @deprecated Use "k6/browser" module instead.
|
|
308
386
|
*/
|
|
309
387
|
protocol?: string;
|
|
310
388
|
|
|
311
389
|
/**
|
|
312
390
|
* Common Name component of the Subject field. The value is extracted from the
|
|
313
391
|
* certificate. This should only be used for informational purposes.
|
|
392
|
+
*
|
|
393
|
+
* @deprecated Use "k6/browser" module instead.
|
|
314
394
|
*/
|
|
315
395
|
subjectName?: string;
|
|
316
396
|
|
|
317
397
|
/**
|
|
318
398
|
* Unix timestamp (in seconds) specifying the exact date/time when this cert
|
|
319
399
|
* becomes valid.
|
|
400
|
+
*
|
|
401
|
+
* @deprecated Use "k6/browser" module instead.
|
|
320
402
|
*/
|
|
321
403
|
validFrom?: number;
|
|
322
404
|
|
|
323
405
|
/**
|
|
324
406
|
* Unix timestamp (in seconds) specifying the exact date/time when this cert
|
|
325
407
|
* becomes invalid.
|
|
408
|
+
*
|
|
409
|
+
* @deprecated Use "k6/browser" module instead.
|
|
326
410
|
*/
|
|
327
411
|
validTo?: number;
|
|
328
412
|
|
|
329
413
|
/**
|
|
330
414
|
* String with hex encoded SHA256 fingerprint of the certificate. The value is
|
|
331
415
|
* extracted from the certificate.
|
|
416
|
+
*
|
|
417
|
+
* @deprecated Use "k6/browser" module instead.
|
|
332
418
|
*/
|
|
333
419
|
sanList?: string[];
|
|
334
420
|
}
|
|
@@ -337,22 +423,30 @@ export interface Rect {
|
|
|
337
423
|
/**
|
|
338
424
|
* The x coordinate of the element in pixels.
|
|
339
425
|
* (0, 0) is the top left corner of the viewport.
|
|
426
|
+
*
|
|
427
|
+
* @deprecated Use "k6/browser" module instead.
|
|
340
428
|
*/
|
|
341
429
|
x: number;
|
|
342
430
|
|
|
343
431
|
/**
|
|
344
432
|
* The y coordinate of the element in pixels.
|
|
345
433
|
* (0, 0) is the top left corner of the viewport.
|
|
434
|
+
*
|
|
435
|
+
* @deprecated Use "k6/browser" module instead.
|
|
346
436
|
*/
|
|
347
437
|
y: number;
|
|
348
438
|
|
|
349
439
|
/**
|
|
350
440
|
* The width of the element in pixels.
|
|
441
|
+
*
|
|
442
|
+
* @deprecated Use "k6/browser" module instead.
|
|
351
443
|
*/
|
|
352
444
|
width: number;
|
|
353
445
|
|
|
354
446
|
/**
|
|
355
447
|
* The height of the element in pixels.
|
|
448
|
+
*
|
|
449
|
+
* @deprecated Use "k6/browser" module instead.
|
|
356
450
|
*/
|
|
357
451
|
height: number;
|
|
358
452
|
}
|
|
@@ -362,12 +456,16 @@ export type ImageFormat = "jpeg" | "png";
|
|
|
362
456
|
export interface ScreenshotOptions {
|
|
363
457
|
/**
|
|
364
458
|
* The file path to save the image to. The screenshot type will be inferred from file extension.
|
|
459
|
+
*
|
|
460
|
+
* @deprecated Use "k6/browser" module instead.
|
|
365
461
|
*/
|
|
366
462
|
path?: string;
|
|
367
463
|
|
|
368
464
|
/**
|
|
369
465
|
* The screenshot format.
|
|
370
466
|
* @default 'png'
|
|
467
|
+
*
|
|
468
|
+
* @deprecated Use "k6/browser" module instead.
|
|
371
469
|
*/
|
|
372
470
|
type?: ImageFormat;
|
|
373
471
|
|
|
@@ -375,12 +473,16 @@ export interface ScreenshotOptions {
|
|
|
375
473
|
* Hide default white background and allow capturing screenshots with transparency.
|
|
376
474
|
* Not applicable to `jpeg` images.
|
|
377
475
|
* @default false
|
|
476
|
+
*
|
|
477
|
+
* @deprecated Use "k6/browser" module instead.
|
|
378
478
|
*/
|
|
379
479
|
omitBackground?: boolean;
|
|
380
480
|
|
|
381
481
|
/**
|
|
382
482
|
* The quality of the image, between 0-100. Not applicable to `png` images.
|
|
383
483
|
* @default 100
|
|
484
|
+
*
|
|
485
|
+
* @deprecated Use "k6/browser" module instead.
|
|
384
486
|
*/
|
|
385
487
|
quality?: number;
|
|
386
488
|
}
|
|
@@ -390,6 +492,8 @@ export interface ScreenshotOptions {
|
|
|
390
492
|
* - `raf` - use `requestAnimationFrame` callback to poll
|
|
391
493
|
* - `mutation` - use a mutation observer
|
|
392
494
|
* - `interval` - use a polling interval
|
|
495
|
+
*
|
|
496
|
+
* @deprecated Use "k6/browser" module instead.
|
|
393
497
|
*/
|
|
394
498
|
export type PollingMethod = "raf" | "mutation" | "interval";
|
|
395
499
|
|
|
@@ -397,11 +501,15 @@ export interface PollingOptions {
|
|
|
397
501
|
/**
|
|
398
502
|
* Polling method to use.
|
|
399
503
|
* @default 'raf'
|
|
504
|
+
*
|
|
505
|
+
* @deprecated Use "k6/browser" module instead.
|
|
400
506
|
*/
|
|
401
507
|
polling?: "raf" | "mutation" | "interval";
|
|
402
508
|
|
|
403
509
|
/**
|
|
404
510
|
* Polling interval in milliseconds if `polling` is set to `interval`.
|
|
511
|
+
*
|
|
512
|
+
* @deprecated Use "k6/browser" module instead.
|
|
405
513
|
*/
|
|
406
514
|
interval?: number;
|
|
407
515
|
}
|
|
@@ -410,6 +518,8 @@ export interface ElementStateFilter {
|
|
|
410
518
|
/**
|
|
411
519
|
* The element state to filter for.
|
|
412
520
|
* @default 'visible'
|
|
521
|
+
*
|
|
522
|
+
* @deprecated Use "k6/browser" module instead.
|
|
413
523
|
*/
|
|
414
524
|
state?: ElementState;
|
|
415
525
|
}
|
|
@@ -417,6 +527,8 @@ export interface ElementStateFilter {
|
|
|
417
527
|
/**
|
|
418
528
|
* BrowserPermissions defines all the possible permissions that can be granted
|
|
419
529
|
* to the browser application.
|
|
530
|
+
*
|
|
531
|
+
* @deprecated Use "k6/browser" module instead.
|
|
420
532
|
*/
|
|
421
533
|
export type BrowserPermissions =
|
|
422
534
|
| "geolocation"
|
|
@@ -439,6 +551,8 @@ export interface NewBrowserContextOptions {
|
|
|
439
551
|
/**
|
|
440
552
|
* Setting this to `true` will bypass a page's Content-Security-Policy.
|
|
441
553
|
* Defaults to `false`.
|
|
554
|
+
*
|
|
555
|
+
* @deprecated Use "k6/browser" module instead.
|
|
442
556
|
*/
|
|
443
557
|
bypassCSP?: boolean;
|
|
444
558
|
|
|
@@ -446,6 +560,8 @@ export interface NewBrowserContextOptions {
|
|
|
446
560
|
* Emulates `'prefers-colors-scheme'` media feature, supported values
|
|
447
561
|
* are `'light'`, `'dark'`, and `'no-preference'`. Default to
|
|
448
562
|
* `'light'`.
|
|
563
|
+
*
|
|
564
|
+
* @deprecated Use "k6/browser" module instead.
|
|
449
565
|
*/
|
|
450
566
|
colorScheme?: "light" | "dark" | "no-preference";
|
|
451
567
|
|
|
@@ -453,6 +569,8 @@ export interface NewBrowserContextOptions {
|
|
|
453
569
|
* Sets the resolution ratio in physical pixels to the resolution in
|
|
454
570
|
* CSS pixels i.e. if set higher than 1, then images will look
|
|
455
571
|
* sharper on high pixel density screens. Defaults to 1.
|
|
572
|
+
*
|
|
573
|
+
* @deprecated Use "k6/browser" module instead.
|
|
456
574
|
*/
|
|
457
575
|
deviceScaleFactor?: number;
|
|
458
576
|
|
|
@@ -460,25 +578,35 @@ export interface NewBrowserContextOptions {
|
|
|
460
578
|
* Contains additional HTTP headers to be sent with every request,
|
|
461
579
|
* where the keys are HTTP headers and values are HTTP header
|
|
462
580
|
* values. Defaults to null.
|
|
581
|
+
*
|
|
582
|
+
* @deprecated Use "k6/browser" module instead.
|
|
463
583
|
*/
|
|
464
584
|
extraHTTPHeaders?: { [key: string]: string };
|
|
465
585
|
|
|
466
586
|
/**
|
|
467
587
|
* Sets the user's geographical location. Defaults to null.
|
|
588
|
+
*
|
|
589
|
+
* @deprecated Use "k6/browser" module instead.
|
|
468
590
|
*/
|
|
469
591
|
geolocation?: {
|
|
470
592
|
/**
|
|
471
593
|
* latitude should be between -90 and 90.
|
|
594
|
+
*
|
|
595
|
+
* @deprecated Use "k6/browser" module instead.
|
|
472
596
|
*/
|
|
473
597
|
latitude: number;
|
|
474
598
|
|
|
475
599
|
/**
|
|
476
600
|
* longitude should be between -180 and 180.
|
|
601
|
+
*
|
|
602
|
+
* @deprecated Use "k6/browser" module instead.
|
|
477
603
|
*/
|
|
478
604
|
longitude: number;
|
|
479
605
|
|
|
480
606
|
/**
|
|
481
607
|
* accuracy should only be a non-negative number. Defaults to 0.
|
|
608
|
+
*
|
|
609
|
+
* @deprecated Use "k6/browser" module instead.
|
|
482
610
|
*/
|
|
483
611
|
accuracy: number;
|
|
484
612
|
};
|
|
@@ -486,11 +614,15 @@ export interface NewBrowserContextOptions {
|
|
|
486
614
|
/**
|
|
487
615
|
* Whether to simulate a device with touch events. Defaults to
|
|
488
616
|
* `false`.
|
|
617
|
+
*
|
|
618
|
+
* @deprecated Use "k6/browser" module instead.
|
|
489
619
|
*/
|
|
490
620
|
hasTouch?: boolean;
|
|
491
621
|
|
|
492
622
|
/**
|
|
493
623
|
* Sets the credentials for HTTP authentication using Basic Auth.
|
|
624
|
+
*
|
|
625
|
+
* @deprecated Use "k6/browser" module instead.
|
|
494
626
|
*/
|
|
495
627
|
httpCredentials?: {
|
|
496
628
|
username: string;
|
|
@@ -501,34 +633,46 @@ export interface NewBrowserContextOptions {
|
|
|
501
633
|
/**
|
|
502
634
|
* Whether to ignore HTTPS errors that may be caused by invalid
|
|
503
635
|
* certificates. Defaults to `false`.
|
|
636
|
+
*
|
|
637
|
+
* @deprecated Use "k6/browser" module instead.
|
|
504
638
|
*/
|
|
505
639
|
ignoreHTTPSErrors?: boolean;
|
|
506
640
|
|
|
507
641
|
/**
|
|
508
642
|
* Whether to simulate a mobile device. Defaults to `false`.
|
|
643
|
+
*
|
|
644
|
+
* @deprecated Use "k6/browser" module instead.
|
|
509
645
|
*/
|
|
510
646
|
isMobile?: boolean;
|
|
511
647
|
|
|
512
648
|
/**
|
|
513
649
|
* Whether to activate JavaScript support for the context. Defaults
|
|
514
650
|
* to `false`.
|
|
651
|
+
*
|
|
652
|
+
* @deprecated Use "k6/browser" module instead.
|
|
515
653
|
*/
|
|
516
654
|
javaScriptEnabled?: boolean;
|
|
517
655
|
|
|
518
656
|
/**
|
|
519
657
|
* Specifies the user's locale following ICU locale (e.g. 'en_US').
|
|
520
658
|
* Defaults to host system locale.
|
|
659
|
+
*
|
|
660
|
+
* @deprecated Use "k6/browser" module instead.
|
|
521
661
|
*/
|
|
522
662
|
locale?: string;
|
|
523
663
|
|
|
524
664
|
/**
|
|
525
665
|
* Whether to emulate an offline network. Defaults to `false`.
|
|
666
|
+
*
|
|
667
|
+
* @deprecated Use "k6/browser" module instead.
|
|
526
668
|
*/
|
|
527
669
|
offline?: boolean;
|
|
528
670
|
|
|
529
671
|
/**
|
|
530
672
|
* Permissions to grant for the context's pages. Defaults to
|
|
531
673
|
* null.
|
|
674
|
+
*
|
|
675
|
+
* @deprecated Use "k6/browser" module instead.
|
|
532
676
|
*/
|
|
533
677
|
permissions?: BrowserPermissions[];
|
|
534
678
|
|
|
@@ -536,6 +680,8 @@ export interface NewBrowserContextOptions {
|
|
|
536
680
|
* Minimizes the amount of motion by emulating the
|
|
537
681
|
* 'prefers-reduced-motion' media feature. Defaults to
|
|
538
682
|
* `'no-preference'`.
|
|
683
|
+
*
|
|
684
|
+
* @deprecated Use "k6/browser" module instead.
|
|
539
685
|
*/
|
|
540
686
|
reducedMotion?: "reduce" | "no-preference";
|
|
541
687
|
|
|
@@ -543,15 +689,21 @@ export interface NewBrowserContextOptions {
|
|
|
543
689
|
* Sets a window screen size for all pages in the context. It can
|
|
544
690
|
* only be used when the viewport is set. Defaults to
|
|
545
691
|
* `{'width': 1280, 'height': 720}`.
|
|
692
|
+
*
|
|
693
|
+
* @deprecated Use "k6/browser" module instead.
|
|
546
694
|
*/
|
|
547
695
|
screen?: {
|
|
548
696
|
/**
|
|
549
697
|
* Page width in pixels.
|
|
698
|
+
*
|
|
699
|
+
* @deprecated Use "k6/browser" module instead.
|
|
550
700
|
*/
|
|
551
701
|
width: number;
|
|
552
702
|
|
|
553
703
|
/**
|
|
554
704
|
* Page height in pixels.
|
|
705
|
+
*
|
|
706
|
+
* @deprecated Use "k6/browser" module instead.
|
|
555
707
|
*/
|
|
556
708
|
height: number;
|
|
557
709
|
};
|
|
@@ -560,27 +712,37 @@ export interface NewBrowserContextOptions {
|
|
|
560
712
|
* Changes the context's timezone. See ICU's metaZones.txt for a
|
|
561
713
|
* list of supported timezone IDs. Defaults to what is set on the
|
|
562
714
|
* system.
|
|
715
|
+
*
|
|
716
|
+
* @deprecated Use "k6/browser" module instead.
|
|
563
717
|
*/
|
|
564
718
|
timezoneID?: string;
|
|
565
719
|
|
|
566
720
|
/**
|
|
567
721
|
* Specifies the user agent to use in the context. Defaults to what
|
|
568
722
|
* is set on the by the browser.
|
|
723
|
+
*
|
|
724
|
+
* @deprecated Use "k6/browser" module instead.
|
|
569
725
|
*/
|
|
570
726
|
userAgent?: string;
|
|
571
727
|
|
|
572
728
|
/**
|
|
573
729
|
* Sets a viewport size for all pages in the context. null disables
|
|
574
730
|
* the default viewport. Defaults to `{'width': 1280, 'height': 720}`.
|
|
731
|
+
*
|
|
732
|
+
* @deprecated Use "k6/browser" module instead.
|
|
575
733
|
*/
|
|
576
734
|
viewport?: {
|
|
577
735
|
/**
|
|
578
736
|
* Page width in pixels.
|
|
737
|
+
*
|
|
738
|
+
* @deprecated Use "k6/browser" module instead.
|
|
579
739
|
*/
|
|
580
740
|
width: number;
|
|
581
741
|
|
|
582
742
|
/**
|
|
583
743
|
* Page height in pixels.
|
|
744
|
+
*
|
|
745
|
+
* @deprecated Use "k6/browser" module instead.
|
|
584
746
|
*/
|
|
585
747
|
height: number;
|
|
586
748
|
};
|
|
@@ -589,16 +751,22 @@ export interface NewBrowserContextOptions {
|
|
|
589
751
|
/**
|
|
590
752
|
* The `browser` named export is the entry point for all your tests,
|
|
591
753
|
* it interacts with the actual web browser via Chrome DevTools Protocol (CDP).
|
|
754
|
+
*
|
|
755
|
+
* @deprecated Use "k6/browser" module instead.
|
|
592
756
|
*/
|
|
593
757
|
export const browser: Browser;
|
|
594
758
|
|
|
595
759
|
/**
|
|
596
760
|
* `Browser` represents the main web browser instance.
|
|
761
|
+
*
|
|
762
|
+
* @deprecated Use "k6/browser" module instead.
|
|
597
763
|
*/
|
|
598
764
|
export interface Browser {
|
|
599
765
|
/**
|
|
600
766
|
* Closes the current `BrowserContext`. If there is no active
|
|
601
767
|
* `BrowserContext`, this method will throw an error.
|
|
768
|
+
*
|
|
769
|
+
* @deprecated Use "k6/browser" module instead.
|
|
602
770
|
*/
|
|
603
771
|
closeContext(): void;
|
|
604
772
|
|
|
@@ -606,12 +774,16 @@ export interface Browser {
|
|
|
606
774
|
* Returns the current `BrowserContext`. There is a 1-to-1 mapping between
|
|
607
775
|
* `Browser` and `BrowserContext`. If no `BrowserContext` has been
|
|
608
776
|
* initialized, it will return null.
|
|
777
|
+
*
|
|
778
|
+
* @deprecated Use "k6/browser" module instead.
|
|
609
779
|
*/
|
|
610
780
|
context(): BrowserContext;
|
|
611
781
|
|
|
612
782
|
/**
|
|
613
783
|
* Indicates whether the CDP connection to the browser process is active or
|
|
614
784
|
* not.
|
|
785
|
+
*
|
|
786
|
+
* @deprecated Use "k6/browser" module instead.
|
|
615
787
|
*/
|
|
616
788
|
isConnected(): boolean;
|
|
617
789
|
|
|
@@ -624,6 +796,8 @@ export interface Browser {
|
|
|
624
796
|
* this restriction, if one already exists, it must be closed first before
|
|
625
797
|
* creating a new one.
|
|
626
798
|
* @param options
|
|
799
|
+
*
|
|
800
|
+
* @deprecated Use "k6/browser" module instead.
|
|
627
801
|
*/
|
|
628
802
|
newContext(
|
|
629
803
|
options?: NewBrowserContextOptions,
|
|
@@ -638,6 +812,8 @@ export interface Browser {
|
|
|
638
812
|
* this restriction, if one already exists, it must be closed first before
|
|
639
813
|
* creating a new one.
|
|
640
814
|
* @param options
|
|
815
|
+
*
|
|
816
|
+
* @deprecated Use "k6/browser" module instead.
|
|
641
817
|
*/
|
|
642
818
|
newPage(
|
|
643
819
|
options?: NewBrowserContextOptions,
|
|
@@ -645,11 +821,15 @@ export interface Browser {
|
|
|
645
821
|
|
|
646
822
|
/**
|
|
647
823
|
* Returns the browser application's user agent.
|
|
824
|
+
*
|
|
825
|
+
* @deprecated Use "k6/browser" module instead.
|
|
648
826
|
*/
|
|
649
827
|
userAgent(): string;
|
|
650
828
|
|
|
651
829
|
/**
|
|
652
830
|
* Returns the browser application's version.
|
|
831
|
+
*
|
|
832
|
+
* @deprecated Use "k6/browser" module instead.
|
|
653
833
|
*/
|
|
654
834
|
version(): string;
|
|
655
835
|
}
|
|
@@ -657,6 +837,8 @@ export interface Browser {
|
|
|
657
837
|
/**
|
|
658
838
|
* `BrowserContext` provides a way to operate multiple independent sessions, with
|
|
659
839
|
* separate pages, cache, and cookies.
|
|
840
|
+
*
|
|
841
|
+
* @deprecated Use "k6/browser" module instead.
|
|
660
842
|
*/
|
|
661
843
|
export interface BrowserContext {
|
|
662
844
|
/**
|
|
@@ -683,11 +865,15 @@ export interface BrowserContext {
|
|
|
683
865
|
* ```
|
|
684
866
|
*
|
|
685
867
|
* @param script Script to be evaluated in all pages in the browser context.
|
|
868
|
+
*
|
|
869
|
+
* @deprecated Use "k6/browser" module instead.
|
|
686
870
|
*/
|
|
687
871
|
addInitScript(script: string | { content?: string }): void;
|
|
688
872
|
|
|
689
873
|
/**
|
|
690
874
|
* Returns the `Browser` instance that this `BrowserContext` belongs to.
|
|
875
|
+
*
|
|
876
|
+
* @deprecated Use "k6/browser" module instead.
|
|
691
877
|
*/
|
|
692
878
|
browser(): Browser;
|
|
693
879
|
|
|
@@ -702,6 +888,8 @@ export interface BrowserContext {
|
|
|
702
888
|
* { name: 'bar', value: 'barvalue', sameSite: 'Strict', domain: 'test.k6.io', path: '/bar' },
|
|
703
889
|
* ]);
|
|
704
890
|
* ```
|
|
891
|
+
*
|
|
892
|
+
* @deprecated Use "k6/browser" module instead.
|
|
705
893
|
*/
|
|
706
894
|
addCookies(cookies: Cookie[]): void;
|
|
707
895
|
|
|
@@ -715,6 +903,8 @@ export interface BrowserContext {
|
|
|
715
903
|
* context.clearCookies();
|
|
716
904
|
* context.cookies().length; // 0
|
|
717
905
|
* ```
|
|
906
|
+
*
|
|
907
|
+
* @deprecated Use "k6/browser" module instead.
|
|
718
908
|
*/
|
|
719
909
|
clearCookies(): void;
|
|
720
910
|
|
|
@@ -735,6 +925,8 @@ export interface BrowserContext {
|
|
|
735
925
|
* // Get all cookies for the specified URLs and filter by name
|
|
736
926
|
* const cookies = context.cookies('https://k6.io', 'https://test.k6.io').filter(c => c.name === 'foo');
|
|
737
927
|
* ```
|
|
928
|
+
*
|
|
929
|
+
* @deprecated Use "k6/browser" module instead.
|
|
738
930
|
*/
|
|
739
931
|
cookies(...urls: string[]): Cookie[];
|
|
740
932
|
|
|
@@ -743,11 +935,15 @@ export interface BrowserContext {
|
|
|
743
935
|
* ```js
|
|
744
936
|
* context.clearPermissions();
|
|
745
937
|
* ```
|
|
938
|
+
*
|
|
939
|
+
* @deprecated Use "k6/browser" module instead.
|
|
746
940
|
*/
|
|
747
941
|
clearPermissions(): void;
|
|
748
942
|
|
|
749
943
|
/**
|
|
750
944
|
* Close the `BrowserContext` and all its `Page`s.
|
|
945
|
+
*
|
|
946
|
+
* @deprecated Use "k6/browser" module instead.
|
|
751
947
|
*/
|
|
752
948
|
close(): void;
|
|
753
949
|
|
|
@@ -756,15 +952,21 @@ export interface BrowserContext {
|
|
|
756
952
|
* ```js
|
|
757
953
|
* context.grantPermissions(['geolocation']);
|
|
758
954
|
* ```
|
|
955
|
+
*
|
|
956
|
+
* @deprecated Use "k6/browser" module instead.
|
|
759
957
|
*/
|
|
760
958
|
grantPermissions(
|
|
761
959
|
/**
|
|
762
960
|
* A string array of permissions to grant.
|
|
961
|
+
*
|
|
962
|
+
* @deprecated Use "k6/browser" module instead.
|
|
763
963
|
*/
|
|
764
964
|
permissions: BrowserPermissions[],
|
|
765
965
|
options?: {
|
|
766
966
|
/**
|
|
767
967
|
* The origin to grant permissions to, e.g. 'https://test.k6.com'.
|
|
968
|
+
*
|
|
969
|
+
* @deprecated Use "k6/browser" module instead.
|
|
768
970
|
*/
|
|
769
971
|
origin: string;
|
|
770
972
|
},
|
|
@@ -772,20 +974,28 @@ export interface BrowserContext {
|
|
|
772
974
|
|
|
773
975
|
/**
|
|
774
976
|
* Creates a new `Page` in the `BrowserContext`.
|
|
977
|
+
*
|
|
978
|
+
* @deprecated Use "k6/browser" module instead.
|
|
775
979
|
*/
|
|
776
980
|
newPage(): Page;
|
|
777
981
|
|
|
778
982
|
/**
|
|
779
983
|
* Returns a list of `Page`s that belongs to the `BrowserContext`.
|
|
984
|
+
*
|
|
985
|
+
* @deprecated Use "k6/browser" module instead.
|
|
780
986
|
*/
|
|
781
987
|
pages(): Page[];
|
|
782
988
|
|
|
783
989
|
/**
|
|
784
990
|
* Sets the default navigation timeout in milliseconds.
|
|
991
|
+
*
|
|
992
|
+
* @deprecated Use "k6/browser" module instead.
|
|
785
993
|
*/
|
|
786
994
|
setDefaultNavigationTimeout(
|
|
787
995
|
/**
|
|
788
996
|
* The timeout in milliseconds.
|
|
997
|
+
*
|
|
998
|
+
* @deprecated Use "k6/browser" module instead.
|
|
789
999
|
*/
|
|
790
1000
|
timeout: number,
|
|
791
1001
|
): void;
|
|
@@ -793,31 +1003,43 @@ export interface BrowserContext {
|
|
|
793
1003
|
/**
|
|
794
1004
|
* Sets the default maximum timeout for all methods accepting a timeout
|
|
795
1005
|
* option in milliseconds.
|
|
1006
|
+
*
|
|
1007
|
+
* @deprecated Use "k6/browser" module instead.
|
|
796
1008
|
*/
|
|
797
1009
|
setDefaultTimeout(
|
|
798
1010
|
/**
|
|
799
1011
|
* The timeout in milliseconds.
|
|
1012
|
+
*
|
|
1013
|
+
* @deprecated Use "k6/browser" module instead.
|
|
800
1014
|
*/
|
|
801
1015
|
timeout: number,
|
|
802
1016
|
): void;
|
|
803
1017
|
|
|
804
1018
|
/**
|
|
805
1019
|
* Sets the `BrowserContext`'s geolocation.
|
|
1020
|
+
*
|
|
1021
|
+
* @deprecated Use "k6/browser" module instead.
|
|
806
1022
|
*/
|
|
807
1023
|
setGeolocation(
|
|
808
1024
|
geolocation?: {
|
|
809
1025
|
/**
|
|
810
1026
|
* latitude should be between -90 and 90.
|
|
1027
|
+
*
|
|
1028
|
+
* @deprecated Use "k6/browser" module instead.
|
|
811
1029
|
*/
|
|
812
1030
|
latitude: number;
|
|
813
1031
|
|
|
814
1032
|
/**
|
|
815
1033
|
* longitude should be between -180 and 180.
|
|
1034
|
+
*
|
|
1035
|
+
* @deprecated Use "k6/browser" module instead.
|
|
816
1036
|
*/
|
|
817
1037
|
longitude: number;
|
|
818
1038
|
|
|
819
1039
|
/**
|
|
820
1040
|
* accuracy should only be a non-negative number. Defaults to 0.
|
|
1041
|
+
*
|
|
1042
|
+
* @deprecated Use "k6/browser" module instead.
|
|
821
1043
|
*/
|
|
822
1044
|
accuracy: number;
|
|
823
1045
|
},
|
|
@@ -825,11 +1047,15 @@ export interface BrowserContext {
|
|
|
825
1047
|
|
|
826
1048
|
/**
|
|
827
1049
|
* Toggles the `BrowserContext`'s connectivity on/off.
|
|
1050
|
+
*
|
|
1051
|
+
* @deprecated Use "k6/browser" module instead.
|
|
828
1052
|
*/
|
|
829
1053
|
setOffline(
|
|
830
1054
|
/**
|
|
831
1055
|
* Whether to emulate the BrowserContext being disconnected (`true`)
|
|
832
1056
|
* or connected (`false`). Defaults to `false`.
|
|
1057
|
+
*
|
|
1058
|
+
* @deprecated Use "k6/browser" module instead.
|
|
833
1059
|
*/
|
|
834
1060
|
offline: boolean,
|
|
835
1061
|
): void;
|
|
@@ -856,16 +1082,22 @@ export interface BrowserContext {
|
|
|
856
1082
|
* // Wait for the predicate to pass.
|
|
857
1083
|
* await promise
|
|
858
1084
|
* ```
|
|
1085
|
+
*
|
|
1086
|
+
* @deprecated Use "k6/browser" module instead.
|
|
859
1087
|
*/
|
|
860
1088
|
waitForEvent(
|
|
861
1089
|
/**
|
|
862
1090
|
* Name of event to wait for. The only supported event is 'page'. If any
|
|
863
1091
|
* other value is used an error will be thrown.
|
|
1092
|
+
*
|
|
1093
|
+
* @deprecated Use "k6/browser" module instead.
|
|
864
1094
|
*/
|
|
865
1095
|
event: "page",
|
|
866
1096
|
/**
|
|
867
1097
|
* This is an optional argument. It can either be a predicate function or
|
|
868
1098
|
* an options object.
|
|
1099
|
+
*
|
|
1100
|
+
* @deprecated Use "k6/browser" module instead.
|
|
869
1101
|
*/
|
|
870
1102
|
optionsOrPredicate?: {
|
|
871
1103
|
/**
|
|
@@ -875,12 +1107,16 @@ export interface BrowserContext {
|
|
|
875
1107
|
*
|
|
876
1108
|
* If {@link Page} is passed to predicate, this signals that a new page
|
|
877
1109
|
* has been created.
|
|
1110
|
+
*
|
|
1111
|
+
* @deprecated Use "k6/browser" module instead.
|
|
878
1112
|
*/
|
|
879
1113
|
predicate?: (page: Page) => boolean;
|
|
880
1114
|
|
|
881
1115
|
/**
|
|
882
1116
|
* Maximum time to wait in milliseconds. Defaults to 30000 milliseconds or
|
|
883
1117
|
* the timeout set by setDefaultTimeout on the {@link BrowserContext}.
|
|
1118
|
+
*
|
|
1119
|
+
* @deprecated Use "k6/browser" module instead.
|
|
884
1120
|
*/
|
|
885
1121
|
timeout?: number;
|
|
886
1122
|
} | ((page: Page) => boolean),
|
|
@@ -907,21 +1143,29 @@ export interface BrowserContext {
|
|
|
907
1143
|
* await msg.args()[0].jsonValue(); // hello
|
|
908
1144
|
* await msg.args()[1].jsonValue(); // 42
|
|
909
1145
|
* ```
|
|
1146
|
+
*
|
|
1147
|
+
* @deprecated Use "k6/browser" module instead.
|
|
910
1148
|
*/
|
|
911
1149
|
export interface ConsoleMessage {
|
|
912
1150
|
/**
|
|
913
1151
|
* List of arguments passed to a `console` function call. See also
|
|
914
1152
|
* `page.on('console')`.
|
|
1153
|
+
*
|
|
1154
|
+
* @deprecated Use "k6/browser" module instead.
|
|
915
1155
|
*/
|
|
916
1156
|
args(): JSHandle[];
|
|
917
1157
|
|
|
918
1158
|
/**
|
|
919
1159
|
* The page that produced this console message, if any.
|
|
1160
|
+
*
|
|
1161
|
+
* @deprecated Use "k6/browser" module instead.
|
|
920
1162
|
*/
|
|
921
1163
|
page(): null | Page;
|
|
922
1164
|
|
|
923
1165
|
/**
|
|
924
1166
|
* The text of the console message.
|
|
1167
|
+
*
|
|
1168
|
+
* @deprecated Use "k6/browser" module instead.
|
|
925
1169
|
*/
|
|
926
1170
|
text(): string;
|
|
927
1171
|
|
|
@@ -930,6 +1174,8 @@ export interface ConsoleMessage {
|
|
|
930
1174
|
* `'warning'`, `'dir'`, `'dirxml'`, `'table'`, `'trace'`, `'clear'`,
|
|
931
1175
|
* `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`,
|
|
932
1176
|
* `'profile'`, `'profileEnd'`, `'count'`, `'timeEnd'`.
|
|
1177
|
+
*
|
|
1178
|
+
* @deprecated Use "k6/browser" module instead.
|
|
933
1179
|
*/
|
|
934
1180
|
type(): string;
|
|
935
1181
|
}
|
|
@@ -939,6 +1185,8 @@ export interface ConsoleMessage {
|
|
|
939
1185
|
*
|
|
940
1186
|
* @see
|
|
941
1187
|
* {@link BrowserContext} has methods to {@link BrowserContext.addCookies | add}, {@link BrowserContext.cookies | query} and {@link BrowserContext.clearCookies | clear} cookies.
|
|
1188
|
+
*
|
|
1189
|
+
* @deprecated Use "k6/browser" module instead.
|
|
942
1190
|
*/
|
|
943
1191
|
export interface Cookie {
|
|
944
1192
|
/**
|
|
@@ -946,6 +1194,8 @@ export interface Cookie {
|
|
|
946
1194
|
*
|
|
947
1195
|
* @defaultValue
|
|
948
1196
|
* The default is `''`.
|
|
1197
|
+
*
|
|
1198
|
+
* @deprecated Use "k6/browser" module instead.
|
|
949
1199
|
*/
|
|
950
1200
|
name: string;
|
|
951
1201
|
|
|
@@ -954,6 +1204,8 @@ export interface Cookie {
|
|
|
954
1204
|
*
|
|
955
1205
|
* @defaultValue
|
|
956
1206
|
* The default is `''`.
|
|
1207
|
+
*
|
|
1208
|
+
* @deprecated Use "k6/browser" module instead.
|
|
957
1209
|
*/
|
|
958
1210
|
value: string;
|
|
959
1211
|
|
|
@@ -961,6 +1213,8 @@ export interface Cookie {
|
|
|
961
1213
|
* The {@link Cookie | cookie}'s URL.
|
|
962
1214
|
*
|
|
963
1215
|
* Required unless one of {@link Cookie.domain | domain} or {@link Cookie.path | path} are specified.
|
|
1216
|
+
*
|
|
1217
|
+
* @deprecated Use "k6/browser" module instead.
|
|
964
1218
|
*/
|
|
965
1219
|
url?: string;
|
|
966
1220
|
|
|
@@ -968,6 +1222,8 @@ export interface Cookie {
|
|
|
968
1222
|
* The {@link Cookie | cookie}'s domain.
|
|
969
1223
|
*
|
|
970
1224
|
* Required unless one of {@link Cookie.url | url} or {@link Cookie.path | path} are specified.
|
|
1225
|
+
*
|
|
1226
|
+
* @deprecated Use "k6/browser" module instead.
|
|
971
1227
|
*/
|
|
972
1228
|
domain?: string;
|
|
973
1229
|
|
|
@@ -978,6 +1234,8 @@ export interface Cookie {
|
|
|
978
1234
|
*
|
|
979
1235
|
* @defaultValue
|
|
980
1236
|
* The default is `'/'`.
|
|
1237
|
+
*
|
|
1238
|
+
* @deprecated Use "k6/browser" module instead.
|
|
981
1239
|
*/
|
|
982
1240
|
path?: string;
|
|
983
1241
|
|
|
@@ -988,6 +1246,8 @@ export interface Cookie {
|
|
|
988
1246
|
*
|
|
989
1247
|
* @defaultValue
|
|
990
1248
|
* The default is `-1`, meaning a session cookie.
|
|
1249
|
+
*
|
|
1250
|
+
* @deprecated Use "k6/browser" module instead.
|
|
991
1251
|
*/
|
|
992
1252
|
expires?: number;
|
|
993
1253
|
|
|
@@ -996,6 +1256,8 @@ export interface Cookie {
|
|
|
996
1256
|
*
|
|
997
1257
|
* @defaultValue
|
|
998
1258
|
* The default is `false`.
|
|
1259
|
+
*
|
|
1260
|
+
* @deprecated Use "k6/browser" module instead.
|
|
999
1261
|
*/
|
|
1000
1262
|
httpOnly?: boolean;
|
|
1001
1263
|
|
|
@@ -1004,6 +1266,8 @@ export interface Cookie {
|
|
|
1004
1266
|
*
|
|
1005
1267
|
* @defaultValue
|
|
1006
1268
|
* The default is `false`.
|
|
1269
|
+
*
|
|
1270
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1007
1271
|
*/
|
|
1008
1272
|
secure?: boolean;
|
|
1009
1273
|
|
|
@@ -1014,6 +1278,8 @@ export interface Cookie {
|
|
|
1014
1278
|
*
|
|
1015
1279
|
* @defaultValue
|
|
1016
1280
|
* The default is `'Lax'`.
|
|
1281
|
+
*
|
|
1282
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1017
1283
|
*/
|
|
1018
1284
|
sameSite?: CookieSameSite;
|
|
1019
1285
|
}
|
|
@@ -1023,17 +1289,23 @@ export interface Cookie {
|
|
|
1023
1289
|
*
|
|
1024
1290
|
* @defaultValue
|
|
1025
1291
|
* The default is `'Lax'`.
|
|
1292
|
+
*
|
|
1293
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1026
1294
|
*/
|
|
1027
1295
|
export type CookieSameSite = "Strict" | "Lax" | "None";
|
|
1028
1296
|
|
|
1029
1297
|
/**
|
|
1030
1298
|
* ElementHandle represents an in-page DOM element.
|
|
1299
|
+
*
|
|
1300
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1031
1301
|
*/
|
|
1032
1302
|
export interface ElementHandle extends JSHandle {
|
|
1033
1303
|
/**
|
|
1034
1304
|
* Finds an element matching the specified selector in the `ElementHandle`'s subtree.
|
|
1035
1305
|
* @param selector A selector to query element for.
|
|
1036
1306
|
* @returns An `ElementHandle` pointing to the result element or `null`.
|
|
1307
|
+
*
|
|
1308
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1037
1309
|
*/
|
|
1038
1310
|
$(selector: string): ElementHandle | null;
|
|
1039
1311
|
|
|
@@ -1041,18 +1313,24 @@ export interface ElementHandle extends JSHandle {
|
|
|
1041
1313
|
* Finds all elements matching the specified selector in the `ElementHandle`'s subtree.
|
|
1042
1314
|
* @param selector A selector to query element for.
|
|
1043
1315
|
* @returns A list of `ElementHandle`s pointing to the result elements.
|
|
1316
|
+
*
|
|
1317
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1044
1318
|
*/
|
|
1045
1319
|
$$(selector: string): ElementHandle[];
|
|
1046
1320
|
|
|
1047
1321
|
/**
|
|
1048
1322
|
* This method returns the bounding box of the element.
|
|
1049
1323
|
* @returns Element's bounding box.
|
|
1324
|
+
*
|
|
1325
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1050
1326
|
*/
|
|
1051
1327
|
boundingBox(): Rect;
|
|
1052
1328
|
|
|
1053
1329
|
/**
|
|
1054
1330
|
* Checks the checkbox element.
|
|
1055
1331
|
* @param options The options to use.
|
|
1332
|
+
*
|
|
1333
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1056
1334
|
*/
|
|
1057
1335
|
check(options?: ElementClickOptions & StrictnessOptions): void;
|
|
1058
1336
|
|
|
@@ -1060,28 +1338,38 @@ export interface ElementHandle extends JSHandle {
|
|
|
1060
1338
|
* Clicks the element.
|
|
1061
1339
|
* @param options The options to use.
|
|
1062
1340
|
* @returns A promise that resolves when the element is clicked.
|
|
1341
|
+
*
|
|
1342
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1063
1343
|
*/
|
|
1064
1344
|
click(
|
|
1065
1345
|
options?: {
|
|
1066
1346
|
/**
|
|
1067
1347
|
* The mouse button (`left`, `middle` or `right`) to use during the action.
|
|
1068
1348
|
* Defaults to `left`.
|
|
1349
|
+
*
|
|
1350
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1069
1351
|
*/
|
|
1070
1352
|
button?: MouseButton;
|
|
1071
1353
|
|
|
1072
1354
|
/**
|
|
1073
1355
|
* The number of times the action is performed. Defaults to `1`.
|
|
1356
|
+
*
|
|
1357
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1074
1358
|
*/
|
|
1075
1359
|
clickCount?: number;
|
|
1076
1360
|
|
|
1077
1361
|
/**
|
|
1078
1362
|
* Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
|
|
1363
|
+
*
|
|
1364
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1079
1365
|
*/
|
|
1080
1366
|
delay?: number;
|
|
1081
1367
|
|
|
1082
1368
|
/**
|
|
1083
1369
|
* Setting this to `true` will bypass the actionability checks (`visible`,
|
|
1084
1370
|
* `stable`, `enabled`). Defaults to `false`.
|
|
1371
|
+
*
|
|
1372
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1085
1373
|
*/
|
|
1086
1374
|
force?: boolean;
|
|
1087
1375
|
|
|
@@ -1089,18 +1377,24 @@ export interface ElementHandle extends JSHandle {
|
|
|
1089
1377
|
* `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
|
|
1090
1378
|
* action. If not specified, currently pressed modifiers are used,
|
|
1091
1379
|
* otherwise defaults to `null`.
|
|
1380
|
+
*
|
|
1381
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1092
1382
|
*/
|
|
1093
1383
|
modifiers?: KeyboardModifier[];
|
|
1094
1384
|
|
|
1095
1385
|
/**
|
|
1096
1386
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
1097
1387
|
* will not wait for it to complete. Defaults to `false`.
|
|
1388
|
+
*
|
|
1389
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1098
1390
|
*/
|
|
1099
1391
|
noWaitAfter?: boolean;
|
|
1100
1392
|
|
|
1101
1393
|
/**
|
|
1102
1394
|
* A point to use relative to the top left corner of the element. If not
|
|
1103
1395
|
* supplied, a visible point of the element is used.
|
|
1396
|
+
*
|
|
1397
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1104
1398
|
*/
|
|
1105
1399
|
position?: {
|
|
1106
1400
|
x: number;
|
|
@@ -1114,6 +1408,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1114
1408
|
* `page` methods.
|
|
1115
1409
|
*
|
|
1116
1410
|
* Setting the value to `0` will disable the timeout.
|
|
1411
|
+
*
|
|
1412
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1117
1413
|
*/
|
|
1118
1414
|
timeout?: number;
|
|
1119
1415
|
|
|
@@ -1121,6 +1417,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1121
1417
|
* Setting this to `true` will perform the actionability checks without
|
|
1122
1418
|
* performing the action. Useful to wait until the element is ready for the
|
|
1123
1419
|
* action without performing it. Defaults to `false`.
|
|
1420
|
+
*
|
|
1421
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1124
1422
|
*/
|
|
1125
1423
|
trial?: boolean;
|
|
1126
1424
|
},
|
|
@@ -1129,29 +1427,39 @@ export interface ElementHandle extends JSHandle {
|
|
|
1129
1427
|
/**
|
|
1130
1428
|
* Get the content frame for element handles.
|
|
1131
1429
|
* @returns The content frame handle of the element handle.
|
|
1430
|
+
*
|
|
1431
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1132
1432
|
*/
|
|
1133
1433
|
contentFrame(): Frame;
|
|
1134
1434
|
|
|
1135
1435
|
/**
|
|
1136
1436
|
* Double clicks the element.
|
|
1137
1437
|
* @param options The options to use.
|
|
1438
|
+
*
|
|
1439
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1138
1440
|
*/
|
|
1139
1441
|
dblclick(
|
|
1140
1442
|
options?: {
|
|
1141
1443
|
/**
|
|
1142
1444
|
* The mouse button (`left`, `middle` or `right`) to use during the action.
|
|
1143
1445
|
* Defaults to `left`.
|
|
1446
|
+
*
|
|
1447
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1144
1448
|
*/
|
|
1145
1449
|
button?: MouseButton;
|
|
1146
1450
|
|
|
1147
1451
|
/**
|
|
1148
1452
|
* Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
|
|
1453
|
+
*
|
|
1454
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1149
1455
|
*/
|
|
1150
1456
|
delay?: number;
|
|
1151
1457
|
|
|
1152
1458
|
/**
|
|
1153
1459
|
* Setting this to `true` will bypass the actionability checks (`visible`,
|
|
1154
1460
|
* `stable`, `enabled`). Defaults to `false`.
|
|
1461
|
+
*
|
|
1462
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1155
1463
|
*/
|
|
1156
1464
|
force?: boolean;
|
|
1157
1465
|
|
|
@@ -1159,18 +1467,24 @@ export interface ElementHandle extends JSHandle {
|
|
|
1159
1467
|
* `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
|
|
1160
1468
|
* action. If not specified, currently pressed modifiers are used,
|
|
1161
1469
|
* otherwise defaults to `null`.
|
|
1470
|
+
*
|
|
1471
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1162
1472
|
*/
|
|
1163
1473
|
modifiers?: KeyboardModifier[];
|
|
1164
1474
|
|
|
1165
1475
|
/**
|
|
1166
1476
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
1167
1477
|
* will not wait for it to complete. Defaults to `false`.
|
|
1478
|
+
*
|
|
1479
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1168
1480
|
*/
|
|
1169
1481
|
noWaitAfter?: boolean;
|
|
1170
1482
|
|
|
1171
1483
|
/**
|
|
1172
1484
|
* A point to use relative to the top left corner of the element. If not
|
|
1173
1485
|
* supplied, a visible point of the element is used.
|
|
1486
|
+
*
|
|
1487
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1174
1488
|
*/
|
|
1175
1489
|
position?: {
|
|
1176
1490
|
x: number;
|
|
@@ -1184,6 +1498,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1184
1498
|
* `page` methods.
|
|
1185
1499
|
*
|
|
1186
1500
|
* Setting the value to `0` will disable the timeout.
|
|
1501
|
+
*
|
|
1502
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1187
1503
|
*/
|
|
1188
1504
|
timeout?: number;
|
|
1189
1505
|
|
|
@@ -1191,6 +1507,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1191
1507
|
* Setting this to `true` will perform the actionability checks without
|
|
1192
1508
|
* performing the action. Useful to wait until the element is ready for the
|
|
1193
1509
|
* action without performing it. Defaults to `false`.
|
|
1510
|
+
*
|
|
1511
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1194
1512
|
*/
|
|
1195
1513
|
trial?: boolean;
|
|
1196
1514
|
},
|
|
@@ -1201,6 +1519,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1201
1519
|
* @param type DOM event type: `"click"` etc.
|
|
1202
1520
|
* @param eventInit Optional event-specific initialization properties.
|
|
1203
1521
|
* @param options
|
|
1522
|
+
*
|
|
1523
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1204
1524
|
*/
|
|
1205
1525
|
dispatchEvent(
|
|
1206
1526
|
type: string,
|
|
@@ -1211,11 +1531,15 @@ export interface ElementHandle extends JSHandle {
|
|
|
1211
1531
|
* Fill the `input` or `textarea` element with the provided `value`.
|
|
1212
1532
|
* @param value Value to fill for the `input` or `textarea` element.
|
|
1213
1533
|
* @param options Element handle options.
|
|
1534
|
+
*
|
|
1535
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1214
1536
|
*/
|
|
1215
1537
|
fill(value: string, options?: ElementHandleOptions): void;
|
|
1216
1538
|
|
|
1217
1539
|
/**
|
|
1218
1540
|
* Focuses the element.
|
|
1541
|
+
*
|
|
1542
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1219
1543
|
*/
|
|
1220
1544
|
focus(): void;
|
|
1221
1545
|
|
|
@@ -1223,72 +1547,96 @@ export interface ElementHandle extends JSHandle {
|
|
|
1223
1547
|
* Fetch the element's attribute value.
|
|
1224
1548
|
* @param name Attribute name to get the value for.
|
|
1225
1549
|
* @returns Attribute value.
|
|
1550
|
+
*
|
|
1551
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1226
1552
|
*/
|
|
1227
1553
|
getAttribute(name: string): string | null;
|
|
1228
1554
|
|
|
1229
1555
|
/**
|
|
1230
1556
|
* Scrolls element into view and hovers over its center point.
|
|
1231
1557
|
* @param options Hover options.
|
|
1558
|
+
*
|
|
1559
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1232
1560
|
*/
|
|
1233
1561
|
hover(options?: ElementClickOptions & KeyboardModifierOptions): void;
|
|
1234
1562
|
|
|
1235
1563
|
/**
|
|
1236
1564
|
* Returns the `element.innerHTML`.
|
|
1237
1565
|
* @returns Element's innerHTML.
|
|
1566
|
+
*
|
|
1567
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1238
1568
|
*/
|
|
1239
1569
|
innerHTML(): string;
|
|
1240
1570
|
|
|
1241
1571
|
/**
|
|
1242
1572
|
* Returns the `element.innerText`.
|
|
1243
1573
|
* @returns Element's innerText.
|
|
1574
|
+
*
|
|
1575
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1244
1576
|
*/
|
|
1245
1577
|
innerText(): string;
|
|
1246
1578
|
|
|
1247
1579
|
/**
|
|
1248
1580
|
* Returns `input.value` for the selected `input`, `textarea` or `select` element.
|
|
1249
1581
|
* @returns The input value of the element.
|
|
1582
|
+
*
|
|
1583
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1250
1584
|
*/
|
|
1251
1585
|
inputValue(options?: TimeoutOptions): string;
|
|
1252
1586
|
|
|
1253
1587
|
/**
|
|
1254
1588
|
* Checks if a checkbox or radio is checked.
|
|
1255
1589
|
* @returns Whether the element is checked.
|
|
1590
|
+
*
|
|
1591
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1256
1592
|
*/
|
|
1257
1593
|
isChecked(): boolean;
|
|
1258
1594
|
|
|
1259
1595
|
/**
|
|
1260
1596
|
* Checks if the element is disabled.
|
|
1261
1597
|
* @returns Whether the element is disabled.
|
|
1598
|
+
*
|
|
1599
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1262
1600
|
*/
|
|
1263
1601
|
isDisabled(): boolean;
|
|
1264
1602
|
|
|
1265
1603
|
/**
|
|
1266
1604
|
* Checks if the element is editable.
|
|
1267
1605
|
* @returns Whether the element is editable.
|
|
1606
|
+
*
|
|
1607
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1268
1608
|
*/
|
|
1269
1609
|
isEditable(): boolean;
|
|
1270
1610
|
|
|
1271
1611
|
/**
|
|
1272
1612
|
* Checks if the element is enabled.
|
|
1273
1613
|
* @returns Whether the element is enabled.
|
|
1614
|
+
*
|
|
1615
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1274
1616
|
*/
|
|
1275
1617
|
isEnabled(): boolean;
|
|
1276
1618
|
|
|
1277
1619
|
/**
|
|
1278
1620
|
* Checks if the element is hidden.
|
|
1279
1621
|
* @returns Whether the element is hidden.
|
|
1622
|
+
*
|
|
1623
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1280
1624
|
*/
|
|
1281
1625
|
isHidden(): boolean;
|
|
1282
1626
|
|
|
1283
1627
|
/**
|
|
1284
1628
|
* Checks if the element is visible.
|
|
1285
1629
|
* @returns Whether the element is visible.
|
|
1630
|
+
*
|
|
1631
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1286
1632
|
*/
|
|
1287
1633
|
isVisible(): boolean;
|
|
1288
1634
|
|
|
1289
1635
|
/**
|
|
1290
1636
|
* Returns the frame containing the given element.
|
|
1291
1637
|
* @returns The frame that contains the element handle.
|
|
1638
|
+
*
|
|
1639
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1292
1640
|
*/
|
|
1293
1641
|
ownerFrame(): Frame;
|
|
1294
1642
|
|
|
@@ -1296,6 +1644,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1296
1644
|
* Focuses the element, and then uses `keyboard.down` and `keyboard.up` with the specified key.
|
|
1297
1645
|
* @param key A keyboard key name or a single character to press.
|
|
1298
1646
|
* @param options Keyboard press options.
|
|
1647
|
+
*
|
|
1648
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1299
1649
|
*/
|
|
1300
1650
|
press(key: string, options?: KeyboardPressOptions): void;
|
|
1301
1651
|
|
|
@@ -1304,6 +1654,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1304
1654
|
* screenshot of it.
|
|
1305
1655
|
* @param options Screenshot options.
|
|
1306
1656
|
* @returns An `ArrayBuffer` with the screenshot data.
|
|
1657
|
+
*
|
|
1658
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1307
1659
|
*/
|
|
1308
1660
|
screenshot(options?: ScreenshotOptions & TimeoutOptions): ArrayBuffer;
|
|
1309
1661
|
|
|
@@ -1311,6 +1663,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1311
1663
|
* This method checks whether the element is actionable using provided options, and
|
|
1312
1664
|
* then tries to scroll it into view, unless it is completely visible.
|
|
1313
1665
|
* @param options Element handle options.
|
|
1666
|
+
*
|
|
1667
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1314
1668
|
*/
|
|
1315
1669
|
scrollIntoViewIfNeeded(options?: ElementHandleOptions): void;
|
|
1316
1670
|
|
|
@@ -1319,6 +1673,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1319
1673
|
* @param values Values of options to select.
|
|
1320
1674
|
* @param options Element handle options.
|
|
1321
1675
|
* @returns List of selected options.
|
|
1676
|
+
*
|
|
1677
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1322
1678
|
*/
|
|
1323
1679
|
selectOption(
|
|
1324
1680
|
values: string | ElementHandle | SelectOptionsObject | string[] | ElementHandle[] | SelectOptionsObject[],
|
|
@@ -1328,6 +1684,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1328
1684
|
/**
|
|
1329
1685
|
* Focuses the element and selects all its text content.
|
|
1330
1686
|
* @param options Element handle options.
|
|
1687
|
+
*
|
|
1688
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1331
1689
|
*/
|
|
1332
1690
|
selectText(options?: ElementHandleOptions): void;
|
|
1333
1691
|
|
|
@@ -1340,6 +1698,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1340
1698
|
* The {@link ElementHandle | element handle} must be an [input element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input).
|
|
1341
1699
|
* @param files
|
|
1342
1700
|
* @param options
|
|
1701
|
+
*
|
|
1702
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1343
1703
|
*/
|
|
1344
1704
|
setInputFiles(files: File | File[], options?: {
|
|
1345
1705
|
/**
|
|
@@ -1347,6 +1707,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1347
1707
|
* is overridden by the setDefaultTimeout option on {@link BrowserContext} or
|
|
1348
1708
|
* {@link Page}.
|
|
1349
1709
|
* @default 30000
|
|
1710
|
+
*
|
|
1711
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1350
1712
|
*/
|
|
1351
1713
|
timeout?: number;
|
|
1352
1714
|
|
|
@@ -1354,6 +1716,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1354
1716
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
1355
1717
|
* does not wait for it to complete.
|
|
1356
1718
|
* @default false
|
|
1719
|
+
*
|
|
1720
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1357
1721
|
*/
|
|
1358
1722
|
noWaitAfter?: boolean;
|
|
1359
1723
|
}): void;
|
|
@@ -1362,12 +1726,16 @@ export interface ElementHandle extends JSHandle {
|
|
|
1362
1726
|
* Scrolls element into view if needed, and then uses `page.tapscreen` to tap in the center of the element
|
|
1363
1727
|
* or at the specified position.
|
|
1364
1728
|
* @param options Tap options.
|
|
1729
|
+
*
|
|
1730
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1365
1731
|
*/
|
|
1366
|
-
tap(options?: MouseMoveOptions):
|
|
1732
|
+
tap(options?: MouseMoveOptions): void;
|
|
1367
1733
|
|
|
1368
1734
|
/**
|
|
1369
1735
|
* Returns the `node.textContent`.
|
|
1370
1736
|
* @returns The text content of the element.
|
|
1737
|
+
*
|
|
1738
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1371
1739
|
*/
|
|
1372
1740
|
textContent(): string;
|
|
1373
1741
|
|
|
@@ -1375,6 +1743,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1375
1743
|
* Scrolls element into view, focuses element and types text.
|
|
1376
1744
|
* @param text Text to type into the element.
|
|
1377
1745
|
* @param options Typing options.
|
|
1746
|
+
*
|
|
1747
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1378
1748
|
*/
|
|
1379
1749
|
type(text: string, options?: KeyboardPressOptions): void;
|
|
1380
1750
|
|
|
@@ -1382,6 +1752,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1382
1752
|
* Scrolls element into view, and if it's an input element of type
|
|
1383
1753
|
* checkbox that is already checked, clicks on it to mark it as unchecked.
|
|
1384
1754
|
* @param options Click options.
|
|
1755
|
+
*
|
|
1756
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1385
1757
|
*/
|
|
1386
1758
|
uncheck(options?: ElementClickOptions & StrictnessOptions): void;
|
|
1387
1759
|
|
|
@@ -1389,6 +1761,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1389
1761
|
* Returns when the element satisfies the `state`.
|
|
1390
1762
|
* @param state Wait for element to satisfy this state.
|
|
1391
1763
|
* @param options Wait options.
|
|
1764
|
+
*
|
|
1765
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1392
1766
|
*/
|
|
1393
1767
|
waitForElementState(state: InputElementState, options?: TimeoutOptions): void;
|
|
1394
1768
|
|
|
@@ -1396,6 +1770,8 @@ export interface ElementHandle extends JSHandle {
|
|
|
1396
1770
|
* Returns when the child element matching `selector` satisfies the `state`.
|
|
1397
1771
|
* @param selector A selector to query for.
|
|
1398
1772
|
* @param options Wait options.
|
|
1773
|
+
*
|
|
1774
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1399
1775
|
*/
|
|
1400
1776
|
waitForSelector(
|
|
1401
1777
|
selector: string,
|
|
@@ -1405,12 +1781,16 @@ export interface ElementHandle extends JSHandle {
|
|
|
1405
1781
|
|
|
1406
1782
|
/**
|
|
1407
1783
|
* Frame represents the frame within a page. A page is made up of hierarchy of frames.
|
|
1784
|
+
*
|
|
1785
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1408
1786
|
*/
|
|
1409
1787
|
export interface Frame {
|
|
1410
1788
|
/**
|
|
1411
1789
|
* Finds an element matching the specified selector within the `Frame`.
|
|
1412
1790
|
* @param selector A selector to query element for.
|
|
1413
1791
|
* @returns An `ElementHandle` pointing to the result element or `null`.
|
|
1792
|
+
*
|
|
1793
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1414
1794
|
*/
|
|
1415
1795
|
$(selector: string): ElementHandle | null;
|
|
1416
1796
|
|
|
@@ -1418,6 +1798,8 @@ export interface Frame {
|
|
|
1418
1798
|
* Finds all elements matching the specified selector within the `Frame`.
|
|
1419
1799
|
* @param selector A selector to query element for.
|
|
1420
1800
|
* @returns A list of `ElementHandle`s pointing to the result elements.
|
|
1801
|
+
*
|
|
1802
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1421
1803
|
*/
|
|
1422
1804
|
$$(selector: string): ElementHandle[];
|
|
1423
1805
|
|
|
@@ -1425,6 +1807,8 @@ export interface Frame {
|
|
|
1425
1807
|
* Checks the first checkbox element found that matches selector.
|
|
1426
1808
|
* @param selector The selector to use.
|
|
1427
1809
|
* @param options The options to use.
|
|
1810
|
+
*
|
|
1811
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1428
1812
|
*/
|
|
1429
1813
|
check(selector: string, options?: ElementClickOptions & StrictnessOptions): void;
|
|
1430
1814
|
|
|
@@ -1432,6 +1816,8 @@ export interface Frame {
|
|
|
1432
1816
|
* Uncheck the first found element that matches the selector.
|
|
1433
1817
|
* @param selector The selector to use.
|
|
1434
1818
|
* @param options The options to use.
|
|
1819
|
+
*
|
|
1820
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1435
1821
|
*/
|
|
1436
1822
|
uncheck(selector: string, options?: ElementClickOptions & StrictnessOptions): void;
|
|
1437
1823
|
|
|
@@ -1440,6 +1826,8 @@ export interface Frame {
|
|
|
1440
1826
|
* @param selector The selector to use.
|
|
1441
1827
|
* @param options The options to use.
|
|
1442
1828
|
* @returns A promise that resolves when the element is clicked.
|
|
1829
|
+
*
|
|
1830
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1443
1831
|
*/
|
|
1444
1832
|
click(selector: string, options?: MouseMultiClickOptions & StrictnessOptions): Promise<void>;
|
|
1445
1833
|
|
|
@@ -1447,6 +1835,8 @@ export interface Frame {
|
|
|
1447
1835
|
* Double clicks the element.
|
|
1448
1836
|
* @param selector The selector to use.
|
|
1449
1837
|
* @param options The options to use.
|
|
1838
|
+
*
|
|
1839
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1450
1840
|
*/
|
|
1451
1841
|
dblclick(selector: string, options?: MouseClickOptions & MouseMoveOptions & StrictnessOptions): void;
|
|
1452
1842
|
|
|
@@ -1455,6 +1845,8 @@ export interface Frame {
|
|
|
1455
1845
|
* @param selector The selector to use.
|
|
1456
1846
|
* @param value The value to fill.
|
|
1457
1847
|
* @param options The options to use.
|
|
1848
|
+
*
|
|
1849
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1458
1850
|
*/
|
|
1459
1851
|
fill(selector: string, value: string, options?: ElementHandleOptions & StrictnessOptions): void;
|
|
1460
1852
|
|
|
@@ -1462,6 +1854,8 @@ export interface Frame {
|
|
|
1462
1854
|
* Focuses the first element found that matches the selector.
|
|
1463
1855
|
* @param selector The selector to use.
|
|
1464
1856
|
* @param options The options to use.
|
|
1857
|
+
*
|
|
1858
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1465
1859
|
*/
|
|
1466
1860
|
focus(selector: string, options?: TimeoutOptions & StrictnessOptions): void;
|
|
1467
1861
|
|
|
@@ -1469,6 +1863,8 @@ export interface Frame {
|
|
|
1469
1863
|
* Hovers the first element found that matches the selector.
|
|
1470
1864
|
* @param selector The selector to use.
|
|
1471
1865
|
* @param options The options to use.
|
|
1866
|
+
*
|
|
1867
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1472
1868
|
*/
|
|
1473
1869
|
hover(selector: string, options?: ElementClickOptions & KeyboardModifierOptions & StrictnessOptions): void;
|
|
1474
1870
|
|
|
@@ -1476,14 +1872,18 @@ export interface Frame {
|
|
|
1476
1872
|
* Taps the first element found that matches the selector.
|
|
1477
1873
|
* @param selector The selector to use.
|
|
1478
1874
|
* @param options The options to use.
|
|
1875
|
+
*
|
|
1876
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1479
1877
|
*/
|
|
1480
|
-
tap(selector: string, options?: ElementClickOptions & KeyboardModifierOptions & StrictnessOptions):
|
|
1878
|
+
tap(selector: string, options?: ElementClickOptions & KeyboardModifierOptions & StrictnessOptions): void;
|
|
1481
1879
|
|
|
1482
1880
|
/**
|
|
1483
1881
|
* Press the given key for the first element found that matches the selector.
|
|
1484
1882
|
* @param selector The selector to use.
|
|
1485
1883
|
* @param key The key to press.
|
|
1486
1884
|
* @param options The options to use.
|
|
1885
|
+
*
|
|
1886
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1487
1887
|
*/
|
|
1488
1888
|
press(selector: string, key: string, options?: KeyboardPressOptions & StrictnessOptions): void;
|
|
1489
1889
|
|
|
@@ -1492,6 +1892,8 @@ export interface Frame {
|
|
|
1492
1892
|
* @param selector The selector to use.
|
|
1493
1893
|
* @param text The text to type.
|
|
1494
1894
|
* @param options The options to use.
|
|
1895
|
+
*
|
|
1896
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1495
1897
|
*/
|
|
1496
1898
|
type(selector: string, text: string, options?: KeyboardPressOptions & StrictnessOptions): void;
|
|
1497
1899
|
|
|
@@ -1501,6 +1903,8 @@ export interface Frame {
|
|
|
1501
1903
|
* @param selector The selector to use.
|
|
1502
1904
|
* @param values The values to select.
|
|
1503
1905
|
* @returns The array of option values of the first element found.
|
|
1906
|
+
*
|
|
1907
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1504
1908
|
*/
|
|
1505
1909
|
selectOption(
|
|
1506
1910
|
selector: string,
|
|
@@ -1514,6 +1918,8 @@ export interface Frame {
|
|
|
1514
1918
|
* @param type The type of event to dispatch.
|
|
1515
1919
|
* @param eventInit The event initialization properties.
|
|
1516
1920
|
* @param options The options to use.
|
|
1921
|
+
*
|
|
1922
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1517
1923
|
*/
|
|
1518
1924
|
dispatchEvent(
|
|
1519
1925
|
selector: string,
|
|
@@ -1529,6 +1935,8 @@ export interface Frame {
|
|
|
1529
1935
|
*
|
|
1530
1936
|
* @param pageFunction Function to be evaluated in the page context.
|
|
1531
1937
|
* @param arg Optional argument to pass to `pageFunction`.
|
|
1938
|
+
*
|
|
1939
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1532
1940
|
*/
|
|
1533
1941
|
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): R;
|
|
1534
1942
|
|
|
@@ -1541,30 +1949,40 @@ export interface Frame {
|
|
|
1541
1949
|
*
|
|
1542
1950
|
* @param pageFunction Function to be evaluated in the page context.
|
|
1543
1951
|
* @param arg Optional argument to pass to `pageFunction`.
|
|
1952
|
+
*
|
|
1953
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1544
1954
|
*/
|
|
1545
1955
|
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): JSHandle<R>;
|
|
1546
1956
|
|
|
1547
1957
|
/**
|
|
1548
1958
|
* Get the page that owns frame.
|
|
1549
1959
|
* @returns The page that owns frame.
|
|
1960
|
+
*
|
|
1961
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1550
1962
|
*/
|
|
1551
1963
|
page(): Page;
|
|
1552
1964
|
|
|
1553
1965
|
/**
|
|
1554
1966
|
* Get the parent frame.
|
|
1555
1967
|
* @returns The parent frame, or `null` if there is no parent frame.
|
|
1968
|
+
*
|
|
1969
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1556
1970
|
*/
|
|
1557
1971
|
parentFrame(): Frame | null;
|
|
1558
1972
|
|
|
1559
1973
|
/**
|
|
1560
1974
|
* Get a list of all child frames.
|
|
1561
1975
|
* @returns A list of all child frames.
|
|
1976
|
+
*
|
|
1977
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1562
1978
|
*/
|
|
1563
1979
|
childFrames(): Frame[];
|
|
1564
1980
|
|
|
1565
1981
|
/**
|
|
1566
1982
|
* Get the `ElementHandle` for this frame.
|
|
1567
1983
|
* @returns The `ElementHandle` for this frame.
|
|
1984
|
+
*
|
|
1985
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1568
1986
|
*/
|
|
1569
1987
|
frameElement(): ElementHandle;
|
|
1570
1988
|
|
|
@@ -1573,6 +1991,8 @@ export interface Frame {
|
|
|
1573
1991
|
* @param url The URL to navigate to.
|
|
1574
1992
|
* @param options The options to use.
|
|
1575
1993
|
* @returns A promise that resolves to the HTTP response object.
|
|
1994
|
+
*
|
|
1995
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1576
1996
|
*/
|
|
1577
1997
|
goto(url: string, options?: NavigationOptions): Promise<Response | null>;
|
|
1578
1998
|
|
|
@@ -1580,36 +2000,48 @@ export interface Frame {
|
|
|
1580
2000
|
* Replace the entire HTML document content.
|
|
1581
2001
|
* @param html The HTML to use.
|
|
1582
2002
|
* @param options The options to use.
|
|
2003
|
+
*
|
|
2004
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1583
2005
|
*/
|
|
1584
2006
|
setContent(html: string, options?: ContentLoadOptions): void;
|
|
1585
2007
|
|
|
1586
2008
|
/**
|
|
1587
2009
|
* Get the name of the frame.
|
|
1588
2010
|
* @returns The name of the frame.
|
|
2011
|
+
*
|
|
2012
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1589
2013
|
*/
|
|
1590
2014
|
name(): string;
|
|
1591
2015
|
|
|
1592
2016
|
/**
|
|
1593
2017
|
* Get the title of the frame.
|
|
1594
2018
|
* @returns The title of the frame.
|
|
2019
|
+
*
|
|
2020
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1595
2021
|
*/
|
|
1596
2022
|
title(): string;
|
|
1597
2023
|
|
|
1598
2024
|
/**
|
|
1599
2025
|
* Get the URL of the frame.
|
|
1600
2026
|
* @returns The URL of the frame.
|
|
2027
|
+
*
|
|
2028
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1601
2029
|
*/
|
|
1602
2030
|
url(): string;
|
|
1603
2031
|
|
|
1604
2032
|
/**
|
|
1605
2033
|
* Get the HTML content of the frame.
|
|
1606
2034
|
* @returns The HTML content of the frame.
|
|
2035
|
+
*
|
|
2036
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1607
2037
|
*/
|
|
1608
2038
|
content(): string;
|
|
1609
2039
|
|
|
1610
2040
|
/**
|
|
1611
2041
|
* Get whether the frame is detached or not.
|
|
1612
2042
|
* @returns `true` if the frame is detached, `false` otherwise.
|
|
2043
|
+
*
|
|
2044
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1613
2045
|
*/
|
|
1614
2046
|
isDetached(): boolean;
|
|
1615
2047
|
|
|
@@ -1617,6 +2049,8 @@ export interface Frame {
|
|
|
1617
2049
|
* Сreates and returns a new locator for this frame.
|
|
1618
2050
|
* @param selector The selector to use.
|
|
1619
2051
|
* @returns The new locator.
|
|
2052
|
+
*
|
|
2053
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1620
2054
|
*/
|
|
1621
2055
|
locator(selector: string): Locator;
|
|
1622
2056
|
|
|
@@ -1625,6 +2059,8 @@ export interface Frame {
|
|
|
1625
2059
|
* @param selector The selector to use.
|
|
1626
2060
|
* @param options The options to use.
|
|
1627
2061
|
* @returns The `innerHTML` attribute of the first element found.
|
|
2062
|
+
*
|
|
2063
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1628
2064
|
*/
|
|
1629
2065
|
innerHTML(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
|
|
1630
2066
|
|
|
@@ -1633,6 +2069,8 @@ export interface Frame {
|
|
|
1633
2069
|
* @param selector The selector to use.
|
|
1634
2070
|
* @param options The options to use.
|
|
1635
2071
|
* @returns The `innerText` attribute of the first element found.
|
|
2072
|
+
*
|
|
2073
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1636
2074
|
*/
|
|
1637
2075
|
innerText(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
|
|
1638
2076
|
|
|
@@ -1641,6 +2079,8 @@ export interface Frame {
|
|
|
1641
2079
|
* @param selector The selector to use.
|
|
1642
2080
|
* @param options The options to use.
|
|
1643
2081
|
* @returns The text content of the first element found.
|
|
2082
|
+
*
|
|
2083
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1644
2084
|
*/
|
|
1645
2085
|
textContent(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
|
|
1646
2086
|
|
|
@@ -1650,6 +2090,8 @@ export interface Frame {
|
|
|
1650
2090
|
* @param name The name of the attribute to get.
|
|
1651
2091
|
* @param options The options to use.
|
|
1652
2092
|
* @returns The value of the attribute.
|
|
2093
|
+
*
|
|
2094
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1653
2095
|
*/
|
|
1654
2096
|
getAttribute(selector: string, name: string, options?: TimeoutOptions & StrictnessOptions): string;
|
|
1655
2097
|
|
|
@@ -1658,6 +2100,8 @@ export interface Frame {
|
|
|
1658
2100
|
* @param selector The selector to use.
|
|
1659
2101
|
* @param options The options to use.
|
|
1660
2102
|
* @returns The input value of the first element found.
|
|
2103
|
+
*
|
|
2104
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1661
2105
|
*/
|
|
1662
2106
|
inputValue(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
|
|
1663
2107
|
|
|
@@ -1666,6 +2110,8 @@ export interface Frame {
|
|
|
1666
2110
|
* @param selector The selector to use.
|
|
1667
2111
|
* @param options The options to use.
|
|
1668
2112
|
* @returns `true` if the checkbox is checked, `false` otherwise.
|
|
2113
|
+
*
|
|
2114
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1669
2115
|
*/
|
|
1670
2116
|
isChecked(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
|
|
1671
2117
|
|
|
@@ -1674,6 +2120,8 @@ export interface Frame {
|
|
|
1674
2120
|
* @param selector The selector to use.
|
|
1675
2121
|
* @param options The options to use.
|
|
1676
2122
|
* @returns `true` if the element is disabled, `false` otherwise.
|
|
2123
|
+
*
|
|
2124
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1677
2125
|
*/
|
|
1678
2126
|
isDisabled(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
|
|
1679
2127
|
|
|
@@ -1682,6 +2130,8 @@ export interface Frame {
|
|
|
1682
2130
|
* @param selector The selector to use.
|
|
1683
2131
|
* @param options The options to use.
|
|
1684
2132
|
* @returns `true` if the element is enabled, `false` otherwise.
|
|
2133
|
+
*
|
|
2134
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1685
2135
|
*/
|
|
1686
2136
|
isEnabled(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
|
|
1687
2137
|
|
|
@@ -1690,6 +2140,8 @@ export interface Frame {
|
|
|
1690
2140
|
* @param selector The selector to use.
|
|
1691
2141
|
* @param options The options to use.
|
|
1692
2142
|
* @returns `true` if the element is editable, `false` otherwise.
|
|
2143
|
+
*
|
|
2144
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1693
2145
|
*/
|
|
1694
2146
|
isEditable(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
|
|
1695
2147
|
|
|
@@ -1698,6 +2150,8 @@ export interface Frame {
|
|
|
1698
2150
|
* @param selector The selector to use.
|
|
1699
2151
|
* @param options The options to use.
|
|
1700
2152
|
* @returns `true` if the element is hidden, `false` otherwise.
|
|
2153
|
+
*
|
|
2154
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1701
2155
|
*/
|
|
1702
2156
|
isHidden(selector: string, options?: StrictnessOptions): boolean;
|
|
1703
2157
|
|
|
@@ -1706,6 +2160,8 @@ export interface Frame {
|
|
|
1706
2160
|
* @param selector The selector to use.
|
|
1707
2161
|
* @param options The options to use.
|
|
1708
2162
|
* @returns `true` if the element is visible, `false` otherwise.
|
|
2163
|
+
*
|
|
2164
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1709
2165
|
*/
|
|
1710
2166
|
isVisible(selector: string, options?: StrictnessOptions): boolean;
|
|
1711
2167
|
|
|
@@ -1721,6 +2177,8 @@ export interface Frame {
|
|
|
1721
2177
|
* elements satisfying the selector, the first will be used.
|
|
1722
2178
|
* @param files
|
|
1723
2179
|
* @param options
|
|
2180
|
+
*
|
|
2181
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1724
2182
|
*/
|
|
1725
2183
|
setInputFiles(selector: string, files: File | File[], options?: {
|
|
1726
2184
|
/**
|
|
@@ -1728,6 +2186,8 @@ export interface Frame {
|
|
|
1728
2186
|
* is overridden by the setDefaultTimeout option on {@link BrowserContext} or
|
|
1729
2187
|
* {@link Page}
|
|
1730
2188
|
* @default 30000
|
|
2189
|
+
*
|
|
2190
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1731
2191
|
*/
|
|
1732
2192
|
timeout?: number;
|
|
1733
2193
|
|
|
@@ -1735,6 +2195,8 @@ export interface Frame {
|
|
|
1735
2195
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
1736
2196
|
* will not wait for it to complete.
|
|
1737
2197
|
* @default false
|
|
2198
|
+
*
|
|
2199
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1738
2200
|
*/
|
|
1739
2201
|
noWaitAfter?: boolean;
|
|
1740
2202
|
}): void;
|
|
@@ -1743,6 +2205,8 @@ export interface Frame {
|
|
|
1743
2205
|
* Wait for the given function to return a truthy value.
|
|
1744
2206
|
* @param predicate The function to call and wait for.
|
|
1745
2207
|
* @param options The options to use.
|
|
2208
|
+
*
|
|
2209
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1746
2210
|
*/
|
|
1747
2211
|
waitForFunction<R, Arg>(
|
|
1748
2212
|
pageFunction: PageFunction<Arg, R>,
|
|
@@ -1755,6 +2219,8 @@ export interface Frame {
|
|
|
1755
2219
|
* This will unblock if that lifecycle event has already been received.
|
|
1756
2220
|
* @param state The load state to wait for, defaults to `load`.
|
|
1757
2221
|
* @param options The options to use.
|
|
2222
|
+
*
|
|
2223
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1758
2224
|
*/
|
|
1759
2225
|
waitForLoadState(state?: LifecycleEvent, options?: TimeoutOptions): void;
|
|
1760
2226
|
|
|
@@ -1762,6 +2228,8 @@ export interface Frame {
|
|
|
1762
2228
|
* Waits for the navigation event to happen.
|
|
1763
2229
|
* @param options The options to use.
|
|
1764
2230
|
* @returns A promise that resolves to the response of the navigation when it happens.
|
|
2231
|
+
*
|
|
2232
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1765
2233
|
*/
|
|
1766
2234
|
waitForNavigation(options?: ContentLoadOptions): Promise<Response | null>;
|
|
1767
2235
|
|
|
@@ -1770,29 +2238,39 @@ export interface Frame {
|
|
|
1770
2238
|
* @param selector The selector to use.
|
|
1771
2239
|
* @param options The options to use.
|
|
1772
2240
|
* @returns The first element found that matches the selector.
|
|
2241
|
+
*
|
|
2242
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1773
2243
|
*/
|
|
1774
2244
|
waitForSelector(selector: string, options?: ElementStateFilter & TimeoutOptions & StrictnessOptions): ElementHandle;
|
|
1775
2245
|
|
|
1776
2246
|
/**
|
|
1777
2247
|
* Wait for the given timeout to elapse.
|
|
1778
2248
|
* @param timeout The timeout to wait for.
|
|
2249
|
+
*
|
|
2250
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1779
2251
|
*/
|
|
1780
2252
|
waitForTimeout(timeout: number): void;
|
|
1781
2253
|
}
|
|
1782
2254
|
|
|
1783
2255
|
/**
|
|
1784
2256
|
* JSHandle represents an in-page JavaScript object.
|
|
2257
|
+
*
|
|
2258
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1785
2259
|
*/
|
|
1786
2260
|
export interface JSHandle<T = any> {
|
|
1787
2261
|
/**
|
|
1788
2262
|
* Returns either `null` or the object handle itself, if the object handle is
|
|
1789
2263
|
* an instance of `ElementHandle`.
|
|
1790
2264
|
* @returns The ElementHandle if available.
|
|
2265
|
+
*
|
|
2266
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1791
2267
|
*/
|
|
1792
2268
|
asElement(): ElementHandle | null;
|
|
1793
2269
|
|
|
1794
2270
|
/**
|
|
1795
2271
|
* Stops referencing the element handle.
|
|
2272
|
+
*
|
|
2273
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1796
2274
|
*/
|
|
1797
2275
|
dispose(): void;
|
|
1798
2276
|
|
|
@@ -1802,6 +2280,8 @@ export interface JSHandle<T = any> {
|
|
|
1802
2280
|
* @param pageFunction The function to be evaluated.
|
|
1803
2281
|
* @param args The arguments to pass to the page function.
|
|
1804
2282
|
* @returns The return value of `pageFunction`.
|
|
2283
|
+
*
|
|
2284
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1805
2285
|
*/
|
|
1806
2286
|
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): R;
|
|
1807
2287
|
|
|
@@ -1812,6 +2292,8 @@ export interface JSHandle<T = any> {
|
|
|
1812
2292
|
* @param pageFunction The function to be evaluated.
|
|
1813
2293
|
* @param args The arguments to pass to the page function.
|
|
1814
2294
|
* @returns A JSHandle of the return value of `pageFunction`.
|
|
2295
|
+
*
|
|
2296
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1815
2297
|
*/
|
|
1816
2298
|
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): JSHandle<R>;
|
|
1817
2299
|
|
|
@@ -1819,24 +2301,32 @@ export interface JSHandle<T = any> {
|
|
|
1819
2301
|
* Fetches a map with own property names of of the `JSHandle` with their values as
|
|
1820
2302
|
* `JSHandle` instances.
|
|
1821
2303
|
* @returns A map with property names as keys and `JSHandle` instances for the property values.
|
|
2304
|
+
*
|
|
2305
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1822
2306
|
*/
|
|
1823
2307
|
getProperties(): Map<string, JSHandle>;
|
|
1824
2308
|
|
|
1825
2309
|
/**
|
|
1826
2310
|
* Fetches a JSON representation of the object.
|
|
1827
2311
|
* @returns A JSON representation of the object.
|
|
2312
|
+
*
|
|
2313
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1828
2314
|
*/
|
|
1829
2315
|
jsonValue(): any;
|
|
1830
2316
|
}
|
|
1831
2317
|
|
|
1832
2318
|
/**
|
|
1833
2319
|
* Keyboard provides an API for managing a virtual keyboard.
|
|
2320
|
+
*
|
|
2321
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1834
2322
|
*/
|
|
1835
2323
|
export interface Keyboard {
|
|
1836
2324
|
/**
|
|
1837
2325
|
* Sends a key down message to a session target.
|
|
1838
2326
|
* A superset of the key values can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values).
|
|
1839
2327
|
* @param key Name of key to press, such as `ArrowLeft`.
|
|
2328
|
+
*
|
|
2329
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1840
2330
|
*/
|
|
1841
2331
|
down(key: string): void;
|
|
1842
2332
|
|
|
@@ -1844,6 +2334,8 @@ export interface Keyboard {
|
|
|
1844
2334
|
* Dispatches an `input` event with the given `text`.
|
|
1845
2335
|
* This method does not emit `keyDown`, `keyUp` or `keyPress` events.
|
|
1846
2336
|
* @param text Event text.
|
|
2337
|
+
*
|
|
2338
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1847
2339
|
*/
|
|
1848
2340
|
insertText(text: string): void;
|
|
1849
2341
|
|
|
@@ -1852,6 +2344,8 @@ export interface Keyboard {
|
|
|
1852
2344
|
* A press message consists of successive key down and up messages.
|
|
1853
2345
|
* @param key Sequence of keys to press.
|
|
1854
2346
|
* @param options Specifies the typing options.
|
|
2347
|
+
*
|
|
2348
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1855
2349
|
*/
|
|
1856
2350
|
press(key: string, options?: { delay?: number }): void;
|
|
1857
2351
|
|
|
@@ -1862,6 +2356,8 @@ export interface Keyboard {
|
|
|
1862
2356
|
* Modifier keys `Shift`, `Control`, `Alt`, `Meta` are _not_ respected.
|
|
1863
2357
|
* @param text A text to type into a focused element.
|
|
1864
2358
|
* @param options Specifies the typing options.
|
|
2359
|
+
*
|
|
2360
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1865
2361
|
*/
|
|
1866
2362
|
type(text: string, options?: { delay?: number }): void;
|
|
1867
2363
|
|
|
@@ -1869,6 +2365,8 @@ export interface Keyboard {
|
|
|
1869
2365
|
* Sends a key up message to a session target.
|
|
1870
2366
|
* A superset of the key values can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values).
|
|
1871
2367
|
* @param key Name of key to release, such as `ArrowLeft`.
|
|
2368
|
+
*
|
|
2369
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1872
2370
|
*/
|
|
1873
2371
|
up(key: string): void;
|
|
1874
2372
|
}
|
|
@@ -1882,6 +2380,8 @@ export interface Keyboard {
|
|
|
1882
2380
|
* underlying frame navigates.
|
|
1883
2381
|
* - Makes it easier to work with dynamic web pages and SPAs built with Svelte,
|
|
1884
2382
|
* React, Vue, etc.
|
|
2383
|
+
*
|
|
2384
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1885
2385
|
*/
|
|
1886
2386
|
export interface Locator {
|
|
1887
2387
|
/**
|
|
@@ -1895,6 +2395,8 @@ export interface Locator {
|
|
|
1895
2395
|
* ```
|
|
1896
2396
|
*
|
|
1897
2397
|
* @param options Options to use.
|
|
2398
|
+
*
|
|
2399
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1898
2400
|
*/
|
|
1899
2401
|
clear(options?: ElementHandleOptions): void;
|
|
1900
2402
|
|
|
@@ -1902,24 +2404,32 @@ export interface Locator {
|
|
|
1902
2404
|
* Mouse click on the chosen element.
|
|
1903
2405
|
* @param options Options to use.
|
|
1904
2406
|
* @returns Promise which resolves when the element is successfully clicked.
|
|
2407
|
+
*
|
|
2408
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1905
2409
|
*/
|
|
1906
2410
|
click(options?: MouseMoveOptions & MouseMultiClickOptions): Promise<void>;
|
|
1907
2411
|
|
|
1908
2412
|
/**
|
|
1909
2413
|
* Mouse double click on the chosen element.
|
|
1910
2414
|
* @param options Options to use.
|
|
2415
|
+
*
|
|
2416
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1911
2417
|
*/
|
|
1912
2418
|
dblclick(options?: MouseMoveOptions & MouseMultiClickOptions): void;
|
|
1913
2419
|
|
|
1914
2420
|
/**
|
|
1915
2421
|
* Use this method to select an `input type="checkbox"`.
|
|
1916
2422
|
* @param options Options to use.
|
|
2423
|
+
*
|
|
2424
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1917
2425
|
*/
|
|
1918
2426
|
check(options?: ElementClickOptions): void;
|
|
1919
2427
|
|
|
1920
2428
|
/**
|
|
1921
2429
|
* Use this method to unselect an `input type="checkbox"`.
|
|
1922
2430
|
* @param options Options to use.
|
|
2431
|
+
*
|
|
2432
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1923
2433
|
*/
|
|
1924
2434
|
uncheck(options?: ElementClickOptions): void;
|
|
1925
2435
|
|
|
@@ -1927,6 +2437,8 @@ export interface Locator {
|
|
|
1927
2437
|
* Checks to see if the `input type="checkbox"` is selected or not.
|
|
1928
2438
|
* @param options Options to use.
|
|
1929
2439
|
* @returns `true` if the element is checked, `false` otherwise.
|
|
2440
|
+
*
|
|
2441
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1930
2442
|
*/
|
|
1931
2443
|
isChecked(options?: TimeoutOptions): boolean;
|
|
1932
2444
|
|
|
@@ -1934,6 +2446,8 @@ export interface Locator {
|
|
|
1934
2446
|
* Checks if the element is editable.
|
|
1935
2447
|
* @param options Options to use.
|
|
1936
2448
|
* @returns `true` if the element is editable, `false` otherwise.
|
|
2449
|
+
*
|
|
2450
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1937
2451
|
*/
|
|
1938
2452
|
isEditable(options?: TimeoutOptions): boolean;
|
|
1939
2453
|
|
|
@@ -1941,6 +2455,8 @@ export interface Locator {
|
|
|
1941
2455
|
* Checks if the element is `enabled`.
|
|
1942
2456
|
* @param options Options to use.
|
|
1943
2457
|
* @returns `true` if the element is enabled, `false` otherwise.
|
|
2458
|
+
*
|
|
2459
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1944
2460
|
*/
|
|
1945
2461
|
isEnabled(options?: TimeoutOptions): boolean;
|
|
1946
2462
|
|
|
@@ -1948,18 +2464,24 @@ export interface Locator {
|
|
|
1948
2464
|
* Checks if the element is `disabled`.
|
|
1949
2465
|
* @param options Options to use.
|
|
1950
2466
|
* @returns `true` if the element is disabled, `false` otherwise.
|
|
2467
|
+
*
|
|
2468
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1951
2469
|
*/
|
|
1952
2470
|
isDisabled(options?: TimeoutOptions): boolean;
|
|
1953
2471
|
|
|
1954
2472
|
/**
|
|
1955
2473
|
* Checks if the element is `visible`.
|
|
1956
2474
|
* @returns `true` if the element is visible, `false` otherwise.
|
|
2475
|
+
*
|
|
2476
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1957
2477
|
*/
|
|
1958
2478
|
isVisible(): boolean;
|
|
1959
2479
|
|
|
1960
2480
|
/**
|
|
1961
2481
|
* Checks if the element is `hidden`.
|
|
1962
2482
|
* @returns `true` if the element is hidden, `false` otherwise.
|
|
2483
|
+
*
|
|
2484
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1963
2485
|
*/
|
|
1964
2486
|
isHidden(): boolean;
|
|
1965
2487
|
|
|
@@ -1967,12 +2489,16 @@ export interface Locator {
|
|
|
1967
2489
|
* Fill an `input`, `textarea` or `contenteditable` element with the provided value.
|
|
1968
2490
|
* @param value Value to fill for the `input` or `textarea` element.
|
|
1969
2491
|
* @param options Options to use.
|
|
2492
|
+
*
|
|
2493
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1970
2494
|
*/
|
|
1971
2495
|
fill(value: string, options?: ElementHandleOptions): void;
|
|
1972
2496
|
|
|
1973
2497
|
/**
|
|
1974
2498
|
* Focuses the element using locator's selector.
|
|
1975
2499
|
* @param options Options to use.
|
|
2500
|
+
*
|
|
2501
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1976
2502
|
*/
|
|
1977
2503
|
focus(options?: TimeoutOptions): void;
|
|
1978
2504
|
|
|
@@ -1981,6 +2507,8 @@ export interface Locator {
|
|
|
1981
2507
|
* @param name Attribute name to retrieve value for.
|
|
1982
2508
|
* @param options Options to use.
|
|
1983
2509
|
* @returns Attribute value.
|
|
2510
|
+
*
|
|
2511
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1984
2512
|
*/
|
|
1985
2513
|
getAttribute(name: string, options?: TimeoutOptions): string | null;
|
|
1986
2514
|
|
|
@@ -1988,6 +2516,8 @@ export interface Locator {
|
|
|
1988
2516
|
* Returns the `element.innerHTML`.
|
|
1989
2517
|
* @param options Options to use.
|
|
1990
2518
|
* @returns Element's innerHTML.
|
|
2519
|
+
*
|
|
2520
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1991
2521
|
*/
|
|
1992
2522
|
innerHTML(options?: TimeoutOptions): string;
|
|
1993
2523
|
|
|
@@ -1995,6 +2525,8 @@ export interface Locator {
|
|
|
1995
2525
|
* Returns the `element.innerText`.
|
|
1996
2526
|
* @param options Options to use.
|
|
1997
2527
|
* @returns Element's innerText.
|
|
2528
|
+
*
|
|
2529
|
+
* @deprecated Use "k6/browser" module instead.
|
|
1998
2530
|
*/
|
|
1999
2531
|
innerText(options?: TimeoutOptions): string;
|
|
2000
2532
|
|
|
@@ -2002,6 +2534,8 @@ export interface Locator {
|
|
|
2002
2534
|
* Returns the `element.textContent`.
|
|
2003
2535
|
* @param options Options to use.
|
|
2004
2536
|
* @returns Element's textContent.
|
|
2537
|
+
*
|
|
2538
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2005
2539
|
*/
|
|
2006
2540
|
textContent(options?: TimeoutOptions): string;
|
|
2007
2541
|
|
|
@@ -2009,6 +2543,8 @@ export interface Locator {
|
|
|
2009
2543
|
* Returns `input.value` for the selected `input`, `textarea` or `select` element.
|
|
2010
2544
|
* @param options Options to use.
|
|
2011
2545
|
* @returns The input value of the element.
|
|
2546
|
+
*
|
|
2547
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2012
2548
|
*/
|
|
2013
2549
|
inputValue(options?: TimeoutOptions): string;
|
|
2014
2550
|
|
|
@@ -2018,6 +2554,8 @@ export interface Locator {
|
|
|
2018
2554
|
* @param values Values of options to select.
|
|
2019
2555
|
* @param options Options to use.
|
|
2020
2556
|
* @returns List of selected options.
|
|
2557
|
+
*
|
|
2558
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2021
2559
|
*/
|
|
2022
2560
|
selectOption(
|
|
2023
2561
|
values: string | string[] | { value?: string; label?: string; index?: number },
|
|
@@ -2029,6 +2567,8 @@ export interface Locator {
|
|
|
2029
2567
|
* A superset of the key values can be found [here](https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values).
|
|
2030
2568
|
* @param key Name of the key to press or a character to generate, such as `ArrowLeft` or `a`.
|
|
2031
2569
|
* @param options Keyboard press options.
|
|
2570
|
+
*
|
|
2571
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2032
2572
|
*/
|
|
2033
2573
|
press(key: string, options?: KeyboardPressOptions): void;
|
|
2034
2574
|
|
|
@@ -2036,38 +2576,50 @@ export interface Locator {
|
|
|
2036
2576
|
* Type a text into the input field.
|
|
2037
2577
|
* @param text Text to type into the input field.
|
|
2038
2578
|
* @param options Typing options.
|
|
2579
|
+
*
|
|
2580
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2039
2581
|
*/
|
|
2040
2582
|
type(text: string, options?: KeyboardPressOptions): void;
|
|
2041
2583
|
|
|
2042
2584
|
/**
|
|
2043
2585
|
* Hover over the element.
|
|
2044
2586
|
* @param options Options to use.
|
|
2587
|
+
*
|
|
2588
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2045
2589
|
*/
|
|
2046
2590
|
hover(options?: MouseMoveOptions): void;
|
|
2047
2591
|
|
|
2048
2592
|
/**
|
|
2049
2593
|
* Tap on the chosen element.
|
|
2050
2594
|
* @param options Options to use.
|
|
2595
|
+
*
|
|
2596
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2051
2597
|
*/
|
|
2052
|
-
tap(options?: MouseMoveOptions):
|
|
2598
|
+
tap(options?: MouseMoveOptions): void;
|
|
2053
2599
|
|
|
2054
2600
|
/**
|
|
2055
2601
|
* Dispatches HTML DOM event types e.g. `click`.
|
|
2056
2602
|
* @param type DOM event type.
|
|
2057
2603
|
* @param eventInit Event-specific properties.
|
|
2058
2604
|
* @param options Options to use.
|
|
2605
|
+
*
|
|
2606
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2059
2607
|
*/
|
|
2060
2608
|
dispatchEvent(type: string, eventInit?: EvaluationArgument, options?: TimeoutOptions): void;
|
|
2061
2609
|
|
|
2062
2610
|
/**
|
|
2063
2611
|
* Wait for the element to be in a particular state e.g. `visible`.
|
|
2064
2612
|
* @param options Wait options.
|
|
2613
|
+
*
|
|
2614
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2065
2615
|
*/
|
|
2066
2616
|
waitFor(options?: { state?: ElementState } & TimeoutOptions): void;
|
|
2067
2617
|
}
|
|
2068
2618
|
|
|
2069
2619
|
/**
|
|
2070
2620
|
* Mouse provides an API for managing a virtual mouse.
|
|
2621
|
+
*
|
|
2622
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2071
2623
|
*/
|
|
2072
2624
|
export interface Mouse {
|
|
2073
2625
|
/**
|
|
@@ -2075,6 +2627,8 @@ export interface Mouse {
|
|
|
2075
2627
|
* @param x The x position.
|
|
2076
2628
|
* @param y The y position.
|
|
2077
2629
|
* @param options The click options.
|
|
2630
|
+
*
|
|
2631
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2078
2632
|
*/
|
|
2079
2633
|
click(x: number, y: number, options?: MouseMultiClickOptions): void;
|
|
2080
2634
|
|
|
@@ -2084,12 +2638,16 @@ export interface Mouse {
|
|
|
2084
2638
|
* @param x The x position.
|
|
2085
2639
|
* @param y The y position.
|
|
2086
2640
|
* @param options The click options.
|
|
2641
|
+
*
|
|
2642
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2087
2643
|
*/
|
|
2088
2644
|
dblclick(x: number, y: number, options?: MouseClickOptions): void;
|
|
2089
2645
|
|
|
2090
2646
|
/**
|
|
2091
2647
|
* Dispatches a `mousedown` event.
|
|
2092
2648
|
* @param options The mouse down options.
|
|
2649
|
+
*
|
|
2650
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2093
2651
|
*/
|
|
2094
2652
|
down(options?: MouseDownUpOptions): void;
|
|
2095
2653
|
|
|
@@ -2098,12 +2656,16 @@ export interface Mouse {
|
|
|
2098
2656
|
* @param x The x position.
|
|
2099
2657
|
* @param y The y position.
|
|
2100
2658
|
* @param options The mouse move options.
|
|
2659
|
+
*
|
|
2660
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2101
2661
|
*/
|
|
2102
2662
|
move(x: number, y: number, options?: { steps?: number }): void;
|
|
2103
2663
|
|
|
2104
2664
|
/**
|
|
2105
2665
|
* Dispatches a `mouseup` event.
|
|
2106
2666
|
* @param options The mouse up options.
|
|
2667
|
+
*
|
|
2668
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2107
2669
|
*/
|
|
2108
2670
|
up(options?: MouseDownUpOptions): void;
|
|
2109
2671
|
}
|
|
@@ -2111,11 +2673,15 @@ export interface Mouse {
|
|
|
2111
2673
|
/**
|
|
2112
2674
|
* Page provides methods to interact with a single tab in a running web browser
|
|
2113
2675
|
* instance. One instance of the browser can have many page instances.
|
|
2676
|
+
*
|
|
2677
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2114
2678
|
*/
|
|
2115
2679
|
export interface Page {
|
|
2116
2680
|
/**
|
|
2117
2681
|
* Activates the browser tab so that it comes into focus and actions can be
|
|
2118
2682
|
* performed against it.
|
|
2683
|
+
*
|
|
2684
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2119
2685
|
*/
|
|
2120
2686
|
bringToFront(): void;
|
|
2121
2687
|
|
|
@@ -2126,6 +2692,8 @@ export interface Page {
|
|
|
2126
2692
|
* @param selector A selector to search for an element. If there are multiple
|
|
2127
2693
|
* elements satisfying the selector, the first will be used.
|
|
2128
2694
|
* @param options
|
|
2695
|
+
*
|
|
2696
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2129
2697
|
*/
|
|
2130
2698
|
check(
|
|
2131
2699
|
selector: string,
|
|
@@ -2133,18 +2701,24 @@ export interface Page {
|
|
|
2133
2701
|
/**
|
|
2134
2702
|
* Setting this to `true` will bypass the actionability checks (visible,
|
|
2135
2703
|
* stable, enabled). Defaults to `false`.
|
|
2704
|
+
*
|
|
2705
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2136
2706
|
*/
|
|
2137
2707
|
force?: boolean;
|
|
2138
2708
|
|
|
2139
2709
|
/**
|
|
2140
2710
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
2141
2711
|
* will not wait for it to complete. Defaults to `false`.
|
|
2712
|
+
*
|
|
2713
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2142
2714
|
*/
|
|
2143
2715
|
noWaitAfter?: boolean;
|
|
2144
2716
|
|
|
2145
2717
|
/**
|
|
2146
2718
|
* A point to use relative to the top left corner of the element. If not
|
|
2147
2719
|
* supplied, a visible point of the element is used.
|
|
2720
|
+
*
|
|
2721
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2148
2722
|
*/
|
|
2149
2723
|
position?: {
|
|
2150
2724
|
x: number;
|
|
@@ -2156,6 +2730,8 @@ export interface Page {
|
|
|
2156
2730
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2157
2731
|
* If given selector resolves to more than one element, the call throws
|
|
2158
2732
|
* an exception. Defaults to `false`.
|
|
2733
|
+
*
|
|
2734
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2159
2735
|
*/
|
|
2160
2736
|
strict?: boolean;
|
|
2161
2737
|
|
|
@@ -2165,6 +2741,8 @@ export interface Page {
|
|
|
2165
2741
|
* `page` methods.
|
|
2166
2742
|
*
|
|
2167
2743
|
* Setting the value to `0` will disable the timeout.
|
|
2744
|
+
*
|
|
2745
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2168
2746
|
*/
|
|
2169
2747
|
timeout?: number;
|
|
2170
2748
|
|
|
@@ -2172,6 +2750,8 @@ export interface Page {
|
|
|
2172
2750
|
* Setting this to `true` will perform the actionability checks without
|
|
2173
2751
|
* performing the action. Useful to wait until the element is ready for the
|
|
2174
2752
|
* action without performing it. Defaults to `false`.
|
|
2753
|
+
*
|
|
2754
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2175
2755
|
*/
|
|
2176
2756
|
trial?: boolean;
|
|
2177
2757
|
},
|
|
@@ -2184,6 +2764,8 @@ export interface Page {
|
|
|
2184
2764
|
* @param selector A selector to search for an element. If there are multiple
|
|
2185
2765
|
* elements satisfying the selector, the first will be used.
|
|
2186
2766
|
* @param options
|
|
2767
|
+
*
|
|
2768
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2187
2769
|
*/
|
|
2188
2770
|
click(
|
|
2189
2771
|
selector: string,
|
|
@@ -2191,22 +2773,30 @@ export interface Page {
|
|
|
2191
2773
|
/**
|
|
2192
2774
|
* The mouse button (`left`, `middle` or `right`) to use during the action.
|
|
2193
2775
|
* Defaults to `left`.
|
|
2776
|
+
*
|
|
2777
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2194
2778
|
*/
|
|
2195
2779
|
button?: MouseButton;
|
|
2196
2780
|
|
|
2197
2781
|
/**
|
|
2198
2782
|
* The number of times the action is performed. Defaults to `1`.
|
|
2783
|
+
*
|
|
2784
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2199
2785
|
*/
|
|
2200
2786
|
clickCount?: number;
|
|
2201
2787
|
|
|
2202
2788
|
/**
|
|
2203
2789
|
* Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
|
|
2790
|
+
*
|
|
2791
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2204
2792
|
*/
|
|
2205
2793
|
delay?: number;
|
|
2206
2794
|
|
|
2207
2795
|
/**
|
|
2208
2796
|
* Setting this to `true` will bypass the actionability checks (`visible`,
|
|
2209
2797
|
* `stable`, `enabled`). Defaults to `false`.
|
|
2798
|
+
*
|
|
2799
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2210
2800
|
*/
|
|
2211
2801
|
force?: boolean;
|
|
2212
2802
|
|
|
@@ -2214,18 +2804,24 @@ export interface Page {
|
|
|
2214
2804
|
* `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
|
|
2215
2805
|
* action. If not specified, currently pressed modifiers are used,
|
|
2216
2806
|
* otherwise defaults to `null`.
|
|
2807
|
+
*
|
|
2808
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2217
2809
|
*/
|
|
2218
2810
|
modifiers?: KeyboardModifier[];
|
|
2219
2811
|
|
|
2220
2812
|
/**
|
|
2221
2813
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
2222
2814
|
* will not wait for it to complete. Defaults to `false`.
|
|
2815
|
+
*
|
|
2816
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2223
2817
|
*/
|
|
2224
2818
|
noWaitAfter?: boolean;
|
|
2225
2819
|
|
|
2226
2820
|
/**
|
|
2227
2821
|
* A point to use relative to the top left corner of the element. If not
|
|
2228
2822
|
* supplied, a visible point of the element is used.
|
|
2823
|
+
*
|
|
2824
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2229
2825
|
*/
|
|
2230
2826
|
position?: {
|
|
2231
2827
|
x: number;
|
|
@@ -2237,6 +2833,8 @@ export interface Page {
|
|
|
2237
2833
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2238
2834
|
* If given selector resolves to more than one element, the call throws
|
|
2239
2835
|
* an exception. Defaults to `false`.
|
|
2836
|
+
*
|
|
2837
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2240
2838
|
*/
|
|
2241
2839
|
strict?: boolean;
|
|
2242
2840
|
|
|
@@ -2246,6 +2844,8 @@ export interface Page {
|
|
|
2246
2844
|
* `page` methods.
|
|
2247
2845
|
*
|
|
2248
2846
|
* Setting the value to `0` will disable the timeout.
|
|
2847
|
+
*
|
|
2848
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2249
2849
|
*/
|
|
2250
2850
|
timeout?: number;
|
|
2251
2851
|
|
|
@@ -2253,6 +2853,8 @@ export interface Page {
|
|
|
2253
2853
|
* Setting this to `true` will perform the actionability checks without
|
|
2254
2854
|
* performing the action. Useful to wait until the element is ready for the
|
|
2255
2855
|
* action without performing it. Defaults to `false`.
|
|
2856
|
+
*
|
|
2857
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2256
2858
|
*/
|
|
2257
2859
|
trial?: boolean;
|
|
2258
2860
|
},
|
|
@@ -2260,16 +2862,22 @@ export interface Page {
|
|
|
2260
2862
|
|
|
2261
2863
|
/**
|
|
2262
2864
|
* This will close the tab that this page is associated with.
|
|
2865
|
+
*
|
|
2866
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2263
2867
|
*/
|
|
2264
2868
|
close(): void;
|
|
2265
2869
|
|
|
2266
2870
|
/**
|
|
2267
2871
|
* Gets the HTML contents of the page.
|
|
2872
|
+
*
|
|
2873
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2268
2874
|
*/
|
|
2269
2875
|
content(): string;
|
|
2270
2876
|
|
|
2271
2877
|
/**
|
|
2272
2878
|
* Gets the `BrowserContext` that the page belongs to.
|
|
2879
|
+
*
|
|
2880
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2273
2881
|
*/
|
|
2274
2882
|
context(): BrowserContext;
|
|
2275
2883
|
|
|
@@ -2280,6 +2888,8 @@ export interface Page {
|
|
|
2280
2888
|
* @param selector A selector to search for an element. If there are multiple
|
|
2281
2889
|
* elements satisfying the selector, the first will be used.
|
|
2282
2890
|
* @param options
|
|
2891
|
+
*
|
|
2892
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2283
2893
|
*/
|
|
2284
2894
|
dblclick(
|
|
2285
2895
|
selector: string,
|
|
@@ -2287,17 +2897,23 @@ export interface Page {
|
|
|
2287
2897
|
/**
|
|
2288
2898
|
* The mouse button (`left`, `middle` or `right`) to use during the action.
|
|
2289
2899
|
* Defaults to `left`.
|
|
2900
|
+
*
|
|
2901
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2290
2902
|
*/
|
|
2291
2903
|
button?: MouseButton;
|
|
2292
2904
|
|
|
2293
2905
|
/**
|
|
2294
2906
|
* Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
|
|
2907
|
+
*
|
|
2908
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2295
2909
|
*/
|
|
2296
2910
|
delay?: number;
|
|
2297
2911
|
|
|
2298
2912
|
/**
|
|
2299
2913
|
* Setting this to `true` will bypass the actionability checks (`visible`,
|
|
2300
2914
|
* `stable`, `enabled`). Defaults to `false`.
|
|
2915
|
+
*
|
|
2916
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2301
2917
|
*/
|
|
2302
2918
|
force?: boolean;
|
|
2303
2919
|
|
|
@@ -2305,18 +2921,24 @@ export interface Page {
|
|
|
2305
2921
|
* `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
|
|
2306
2922
|
* action. If not specified, currently pressed modifiers are used,
|
|
2307
2923
|
* otherwise defaults to `null`.
|
|
2924
|
+
*
|
|
2925
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2308
2926
|
*/
|
|
2309
2927
|
modifiers?: KeyboardModifier[];
|
|
2310
2928
|
|
|
2311
2929
|
/**
|
|
2312
2930
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
2313
2931
|
* will not wait for it to complete. Defaults to `false`.
|
|
2932
|
+
*
|
|
2933
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2314
2934
|
*/
|
|
2315
2935
|
noWaitAfter?: boolean;
|
|
2316
2936
|
|
|
2317
2937
|
/**
|
|
2318
2938
|
* A point to use relative to the top left corner of the element. If not
|
|
2319
2939
|
* supplied, a visible point of the element is used.
|
|
2940
|
+
*
|
|
2941
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2320
2942
|
*/
|
|
2321
2943
|
position?: {
|
|
2322
2944
|
x: number;
|
|
@@ -2328,6 +2950,8 @@ export interface Page {
|
|
|
2328
2950
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2329
2951
|
* If given selector resolves to more than one element, the call throws
|
|
2330
2952
|
* an exception. Defaults to `false`.
|
|
2953
|
+
*
|
|
2954
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2331
2955
|
*/
|
|
2332
2956
|
strict?: boolean;
|
|
2333
2957
|
|
|
@@ -2337,6 +2961,8 @@ export interface Page {
|
|
|
2337
2961
|
* `page` methods.
|
|
2338
2962
|
*
|
|
2339
2963
|
* Setting the value to `0` will disable the timeout.
|
|
2964
|
+
*
|
|
2965
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2340
2966
|
*/
|
|
2341
2967
|
timeout?: number;
|
|
2342
2968
|
|
|
@@ -2344,6 +2970,8 @@ export interface Page {
|
|
|
2344
2970
|
* Setting this to `true` will perform the actionability checks without
|
|
2345
2971
|
* performing the action. Useful to wait until the element is ready for the
|
|
2346
2972
|
* action without performing it. Defaults to `false`.
|
|
2973
|
+
*
|
|
2974
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2347
2975
|
*/
|
|
2348
2976
|
trial?: boolean;
|
|
2349
2977
|
},
|
|
@@ -2357,6 +2985,8 @@ export interface Page {
|
|
|
2357
2985
|
* @param type DOM event type: `"click"` etc.
|
|
2358
2986
|
* @param eventInit Optional event-specific initialization properties.
|
|
2359
2987
|
* @param options
|
|
2988
|
+
*
|
|
2989
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2360
2990
|
*/
|
|
2361
2991
|
dispatchEvent(
|
|
2362
2992
|
selector: string,
|
|
@@ -2367,6 +2997,8 @@ export interface Page {
|
|
|
2367
2997
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2368
2998
|
* If given selector resolves to more than one element, the call throws
|
|
2369
2999
|
* an exception. Defaults to `false`.
|
|
3000
|
+
*
|
|
3001
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2370
3002
|
*/
|
|
2371
3003
|
strict?: boolean;
|
|
2372
3004
|
|
|
@@ -2376,6 +3008,8 @@ export interface Page {
|
|
|
2376
3008
|
* `page` methods.
|
|
2377
3009
|
*
|
|
2378
3010
|
* Setting the value to `0` will disable the timeout.
|
|
3011
|
+
*
|
|
3012
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2379
3013
|
*/
|
|
2380
3014
|
timeout?: number;
|
|
2381
3015
|
},
|
|
@@ -2386,23 +3020,31 @@ export interface Page {
|
|
|
2386
3020
|
* and/or the `'prefers-colors-scheme'` media feature, using the `colorScheme`
|
|
2387
3021
|
* argument.
|
|
2388
3022
|
* @param options
|
|
3023
|
+
*
|
|
3024
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2389
3025
|
*/
|
|
2390
3026
|
emulateMedia(options?: {
|
|
2391
3027
|
/**
|
|
2392
3028
|
* Emulates `'prefers-colors-scheme'` media feature, supported values are
|
|
2393
3029
|
* `'light'`, `'dark'`, and `'no-preference'`.
|
|
3030
|
+
*
|
|
3031
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2394
3032
|
*/
|
|
2395
3033
|
colorScheme?: "light" | "dark" | "no-preference";
|
|
2396
3034
|
|
|
2397
3035
|
/**
|
|
2398
3036
|
* Changes the CSS media type of the page. The only allowed values are
|
|
2399
3037
|
* `'screen'`, and `'print'`.
|
|
3038
|
+
*
|
|
3039
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2400
3040
|
*/
|
|
2401
3041
|
media?: "screen" | "print";
|
|
2402
3042
|
|
|
2403
3043
|
/**
|
|
2404
3044
|
* Emulates `'prefers-reduced-motion'` media feature, supported values are
|
|
2405
3045
|
* `'reduce'`, `'no-preference'`.
|
|
3046
|
+
*
|
|
3047
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2406
3048
|
*/
|
|
2407
3049
|
reducedMotion?: "reduce" | "no-preference";
|
|
2408
3050
|
}): void;
|
|
@@ -2418,6 +3060,8 @@ export interface Page {
|
|
|
2418
3060
|
* - achromatopsia: the inability to perceive any color except for shades of
|
|
2419
3061
|
* grey (extremely rare).
|
|
2420
3062
|
* @param type
|
|
3063
|
+
*
|
|
3064
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2421
3065
|
*/
|
|
2422
3066
|
emulateVisionDeficiency(
|
|
2423
3067
|
type: "none" | "blurredVision" | "deuteranopia" | "protanopia" | "tritanopia" | "achromatopsia",
|
|
@@ -2430,6 +3074,8 @@ export interface Page {
|
|
|
2430
3074
|
*
|
|
2431
3075
|
* @param pageFunction Function to be evaluated in the page context.
|
|
2432
3076
|
* @param arg Optional argument to pass to `pageFunction`.
|
|
3077
|
+
*
|
|
3078
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2433
3079
|
*/
|
|
2434
3080
|
evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): R;
|
|
2435
3081
|
|
|
@@ -2442,6 +3088,8 @@ export interface Page {
|
|
|
2442
3088
|
*
|
|
2443
3089
|
* @param pageFunction Function to be evaluated in the page context.
|
|
2444
3090
|
* @param arg Optional argument to pass to `pageFunction`.
|
|
3091
|
+
*
|
|
3092
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2445
3093
|
*/
|
|
2446
3094
|
evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): JSHandle<R>;
|
|
2447
3095
|
|
|
@@ -2456,6 +3104,8 @@ export interface Page {
|
|
|
2456
3104
|
* @param value Value to fill for the `<input>`, `<textarea>` or
|
|
2457
3105
|
* `[contenteditable]` element.
|
|
2458
3106
|
* @param options
|
|
3107
|
+
*
|
|
3108
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2459
3109
|
*/
|
|
2460
3110
|
fill(
|
|
2461
3111
|
selector: string,
|
|
@@ -2464,12 +3114,16 @@ export interface Page {
|
|
|
2464
3114
|
/**
|
|
2465
3115
|
* Setting this to `true` will bypass the actionability checks (`visible`,
|
|
2466
3116
|
* `stable`, `enabled`). Defaults to `false`.
|
|
3117
|
+
*
|
|
3118
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2467
3119
|
*/
|
|
2468
3120
|
force?: boolean;
|
|
2469
3121
|
|
|
2470
3122
|
/**
|
|
2471
3123
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
2472
3124
|
* will not wait for it to complete. Defaults to `false`.
|
|
3125
|
+
*
|
|
3126
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2473
3127
|
*/
|
|
2474
3128
|
noWaitAfter?: boolean;
|
|
2475
3129
|
|
|
@@ -2477,6 +3131,8 @@ export interface Page {
|
|
|
2477
3131
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2478
3132
|
* If given selector resolves to more than one element, the call throws
|
|
2479
3133
|
* an exception. Defaults to `false`.
|
|
3134
|
+
*
|
|
3135
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2480
3136
|
*/
|
|
2481
3137
|
strict?: boolean;
|
|
2482
3138
|
|
|
@@ -2486,6 +3142,8 @@ export interface Page {
|
|
|
2486
3142
|
* `page` methods.
|
|
2487
3143
|
*
|
|
2488
3144
|
* Setting the value to `0` will disable the timeout.
|
|
3145
|
+
*
|
|
3146
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2489
3147
|
*/
|
|
2490
3148
|
timeout?: number;
|
|
2491
3149
|
},
|
|
@@ -2499,6 +3157,8 @@ export interface Page {
|
|
|
2499
3157
|
* @param selector A selector to search for an element. If there are multiple
|
|
2500
3158
|
* elements satisfying the selector, the first will be used.
|
|
2501
3159
|
* @param options
|
|
3160
|
+
*
|
|
3161
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2502
3162
|
*/
|
|
2503
3163
|
focus(
|
|
2504
3164
|
selector: string,
|
|
@@ -2507,6 +3167,8 @@ export interface Page {
|
|
|
2507
3167
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2508
3168
|
* If given selector resolves to more than one element, the call throws
|
|
2509
3169
|
* an exception. Defaults to `false`.
|
|
3170
|
+
*
|
|
3171
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2510
3172
|
*/
|
|
2511
3173
|
strict?: boolean;
|
|
2512
3174
|
|
|
@@ -2516,6 +3178,8 @@ export interface Page {
|
|
|
2516
3178
|
* `page` methods.
|
|
2517
3179
|
*
|
|
2518
3180
|
* Setting the value to `0` will disable the timeout.
|
|
3181
|
+
*
|
|
3182
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2519
3183
|
*/
|
|
2520
3184
|
timeout?: number;
|
|
2521
3185
|
},
|
|
@@ -2523,6 +3187,8 @@ export interface Page {
|
|
|
2523
3187
|
|
|
2524
3188
|
/**
|
|
2525
3189
|
* Frames returns an array of frames on the page.
|
|
3190
|
+
*
|
|
3191
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2526
3192
|
*/
|
|
2527
3193
|
frames(): Frame[];
|
|
2528
3194
|
|
|
@@ -2535,6 +3201,8 @@ export interface Page {
|
|
|
2535
3201
|
* elements satisfying the selector, the first will be used.
|
|
2536
3202
|
* @param name Attribute name to get the value for.
|
|
2537
3203
|
* @param options
|
|
3204
|
+
*
|
|
3205
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2538
3206
|
*/
|
|
2539
3207
|
getAttribute(
|
|
2540
3208
|
selector: string,
|
|
@@ -2544,6 +3212,8 @@ export interface Page {
|
|
|
2544
3212
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2545
3213
|
* If given selector resolves to more than one element, the call throws
|
|
2546
3214
|
* an exception. Defaults to `false`.
|
|
3215
|
+
*
|
|
3216
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2547
3217
|
*/
|
|
2548
3218
|
strict?: boolean;
|
|
2549
3219
|
|
|
@@ -2553,6 +3223,8 @@ export interface Page {
|
|
|
2553
3223
|
* `page` methods.
|
|
2554
3224
|
*
|
|
2555
3225
|
* Setting the value to `0` will disable the timeout.
|
|
3226
|
+
*
|
|
3227
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2556
3228
|
*/
|
|
2557
3229
|
timeout?: number;
|
|
2558
3230
|
},
|
|
@@ -2567,6 +3239,8 @@ export interface Page {
|
|
|
2567
3239
|
* @param url URL to navigate page to. The url should include scheme, e.g.
|
|
2568
3240
|
* `https://`.
|
|
2569
3241
|
* @param options
|
|
3242
|
+
*
|
|
3243
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2570
3244
|
*/
|
|
2571
3245
|
goto(url: string, options?: NavigationOptions): Promise<null | Response>;
|
|
2572
3246
|
|
|
@@ -2578,6 +3252,8 @@ export interface Page {
|
|
|
2578
3252
|
* @param selector A selector to search for an element. If there are multiple
|
|
2579
3253
|
* elements satisfying the selector, the first will be used.
|
|
2580
3254
|
* @param options
|
|
3255
|
+
*
|
|
3256
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2581
3257
|
*/
|
|
2582
3258
|
hover(
|
|
2583
3259
|
selector: string,
|
|
@@ -2585,6 +3261,8 @@ export interface Page {
|
|
|
2585
3261
|
/**
|
|
2586
3262
|
* Setting this to `true` will bypass the actionability checks (`visible`,
|
|
2587
3263
|
* `stable`, `enabled`). Defaults to `false`.
|
|
3264
|
+
*
|
|
3265
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2588
3266
|
*/
|
|
2589
3267
|
force?: boolean;
|
|
2590
3268
|
|
|
@@ -2592,18 +3270,24 @@ export interface Page {
|
|
|
2592
3270
|
* `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
|
|
2593
3271
|
* action. If not specified, currently pressed modifiers are used,
|
|
2594
3272
|
* otherwise defaults to `null`.
|
|
3273
|
+
*
|
|
3274
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2595
3275
|
*/
|
|
2596
3276
|
modifiers?: KeyboardModifier[];
|
|
2597
3277
|
|
|
2598
3278
|
/**
|
|
2599
3279
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
2600
3280
|
* will not wait for it to complete. Defaults to `false`.
|
|
3281
|
+
*
|
|
3282
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2601
3283
|
*/
|
|
2602
3284
|
noWaitAfter?: boolean;
|
|
2603
3285
|
|
|
2604
3286
|
/**
|
|
2605
3287
|
* A point to use relative to the top left corner of the element. If not
|
|
2606
3288
|
* supplied, a visible point of the element is used.
|
|
3289
|
+
*
|
|
3290
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2607
3291
|
*/
|
|
2608
3292
|
position?: {
|
|
2609
3293
|
x: number;
|
|
@@ -2615,6 +3299,8 @@ export interface Page {
|
|
|
2615
3299
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2616
3300
|
* If given selector resolves to more than one element, the call throws
|
|
2617
3301
|
* an exception. Defaults to `false`.
|
|
3302
|
+
*
|
|
3303
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2618
3304
|
*/
|
|
2619
3305
|
strict?: boolean;
|
|
2620
3306
|
|
|
@@ -2624,6 +3310,8 @@ export interface Page {
|
|
|
2624
3310
|
* `page` methods.
|
|
2625
3311
|
*
|
|
2626
3312
|
* Setting the value to `0` will disable the timeout.
|
|
3313
|
+
*
|
|
3314
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2627
3315
|
*/
|
|
2628
3316
|
timeout?: number;
|
|
2629
3317
|
|
|
@@ -2631,6 +3319,8 @@ export interface Page {
|
|
|
2631
3319
|
* Setting this to `true` will perform the actionability checks without
|
|
2632
3320
|
* performing the action. Useful to wait until the element is ready for the
|
|
2633
3321
|
* action without performing it. Defaults to `false`.
|
|
3322
|
+
*
|
|
3323
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2634
3324
|
*/
|
|
2635
3325
|
trial?: boolean;
|
|
2636
3326
|
},
|
|
@@ -2644,6 +3334,8 @@ export interface Page {
|
|
|
2644
3334
|
* @param selector A selector to search for an element. If there are multiple
|
|
2645
3335
|
* elements satisfying the selector, the first will be used.
|
|
2646
3336
|
* @param options
|
|
3337
|
+
*
|
|
3338
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2647
3339
|
*/
|
|
2648
3340
|
innerHTML(
|
|
2649
3341
|
selector: string,
|
|
@@ -2652,6 +3344,8 @@ export interface Page {
|
|
|
2652
3344
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2653
3345
|
* If given selector resolves to more than one element, the call throws
|
|
2654
3346
|
* an exception. Defaults to `false`.
|
|
3347
|
+
*
|
|
3348
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2655
3349
|
*/
|
|
2656
3350
|
strict?: boolean;
|
|
2657
3351
|
|
|
@@ -2661,6 +3355,8 @@ export interface Page {
|
|
|
2661
3355
|
* `page` methods.
|
|
2662
3356
|
*
|
|
2663
3357
|
* Setting the value to `0` will disable the timeout.
|
|
3358
|
+
*
|
|
3359
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2664
3360
|
*/
|
|
2665
3361
|
timeout?: number;
|
|
2666
3362
|
},
|
|
@@ -2674,6 +3370,8 @@ export interface Page {
|
|
|
2674
3370
|
* @param selector A selector to search for an element. If there are multiple
|
|
2675
3371
|
* elements satisfying the selector, the first will be used.
|
|
2676
3372
|
* @param options
|
|
3373
|
+
*
|
|
3374
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2677
3375
|
*/
|
|
2678
3376
|
innerText(
|
|
2679
3377
|
selector: string,
|
|
@@ -2682,6 +3380,8 @@ export interface Page {
|
|
|
2682
3380
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2683
3381
|
* If given selector resolves to more than one element, the call throws
|
|
2684
3382
|
* an exception. Defaults to `false`.
|
|
3383
|
+
*
|
|
3384
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2685
3385
|
*/
|
|
2686
3386
|
strict?: boolean;
|
|
2687
3387
|
|
|
@@ -2691,6 +3391,8 @@ export interface Page {
|
|
|
2691
3391
|
* `page` methods.
|
|
2692
3392
|
*
|
|
2693
3393
|
* Setting the value to `0` will disable the timeout.
|
|
3394
|
+
*
|
|
3395
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2694
3396
|
*/
|
|
2695
3397
|
timeout?: number;
|
|
2696
3398
|
},
|
|
@@ -2705,6 +3407,8 @@ export interface Page {
|
|
|
2705
3407
|
* @param selector A selector to search for an element. If there are multiple
|
|
2706
3408
|
* elements satisfying the selector, the first will be used.
|
|
2707
3409
|
* @param options
|
|
3410
|
+
*
|
|
3411
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2708
3412
|
*/
|
|
2709
3413
|
inputValue(
|
|
2710
3414
|
selector: string,
|
|
@@ -2713,6 +3417,8 @@ export interface Page {
|
|
|
2713
3417
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2714
3418
|
* If given selector resolves to more than one element, the call throws
|
|
2715
3419
|
* an exception. Defaults to `false`.
|
|
3420
|
+
*
|
|
3421
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2716
3422
|
*/
|
|
2717
3423
|
strict?: boolean;
|
|
2718
3424
|
|
|
@@ -2722,6 +3428,8 @@ export interface Page {
|
|
|
2722
3428
|
* `page` methods.
|
|
2723
3429
|
*
|
|
2724
3430
|
* Setting the value to `0` will disable the timeout.
|
|
3431
|
+
*
|
|
3432
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2725
3433
|
*/
|
|
2726
3434
|
timeout?: number;
|
|
2727
3435
|
},
|
|
@@ -2735,6 +3443,8 @@ export interface Page {
|
|
|
2735
3443
|
* @param selector A selector to search for an element. If there are multiple
|
|
2736
3444
|
* elements satisfying the selector, the first will be used.
|
|
2737
3445
|
* @param options
|
|
3446
|
+
*
|
|
3447
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2738
3448
|
*/
|
|
2739
3449
|
isChecked(
|
|
2740
3450
|
selector: string,
|
|
@@ -2743,6 +3453,8 @@ export interface Page {
|
|
|
2743
3453
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2744
3454
|
* If given selector resolves to more than one element, the call throws
|
|
2745
3455
|
* an exception. Defaults to `false`.
|
|
3456
|
+
*
|
|
3457
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2746
3458
|
*/
|
|
2747
3459
|
strict?: boolean;
|
|
2748
3460
|
|
|
@@ -2752,6 +3464,8 @@ export interface Page {
|
|
|
2752
3464
|
* `page` methods.
|
|
2753
3465
|
*
|
|
2754
3466
|
* Setting the value to `0` will disable the timeout.
|
|
3467
|
+
*
|
|
3468
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2755
3469
|
*/
|
|
2756
3470
|
timeout?: number;
|
|
2757
3471
|
},
|
|
@@ -2759,6 +3473,8 @@ export interface Page {
|
|
|
2759
3473
|
|
|
2760
3474
|
/**
|
|
2761
3475
|
* Indicates that the page has been closed.
|
|
3476
|
+
*
|
|
3477
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2762
3478
|
*/
|
|
2763
3479
|
isClosed(): boolean;
|
|
2764
3480
|
|
|
@@ -2770,6 +3486,8 @@ export interface Page {
|
|
|
2770
3486
|
* @param selector A selector to search for an element. If there are multiple
|
|
2771
3487
|
* elements satisfying the selector, the first will be used.
|
|
2772
3488
|
* @param options
|
|
3489
|
+
*
|
|
3490
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2773
3491
|
*/
|
|
2774
3492
|
isDisabled(
|
|
2775
3493
|
selector: string,
|
|
@@ -2778,6 +3496,8 @@ export interface Page {
|
|
|
2778
3496
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2779
3497
|
* If given selector resolves to more than one element, the call throws
|
|
2780
3498
|
* an exception. Defaults to `false`.
|
|
3499
|
+
*
|
|
3500
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2781
3501
|
*/
|
|
2782
3502
|
strict?: boolean;
|
|
2783
3503
|
|
|
@@ -2787,6 +3507,8 @@ export interface Page {
|
|
|
2787
3507
|
* `page` methods.
|
|
2788
3508
|
*
|
|
2789
3509
|
* Setting the value to `0` will disable the timeout.
|
|
3510
|
+
*
|
|
3511
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2790
3512
|
*/
|
|
2791
3513
|
timeout?: number;
|
|
2792
3514
|
},
|
|
@@ -2800,6 +3522,8 @@ export interface Page {
|
|
|
2800
3522
|
* @param selector A selector to search for an element. If there are multiple
|
|
2801
3523
|
* elements satisfying the selector, the first will be used.
|
|
2802
3524
|
* @param options
|
|
3525
|
+
*
|
|
3526
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2803
3527
|
*/
|
|
2804
3528
|
isEditable(
|
|
2805
3529
|
selector: string,
|
|
@@ -2808,6 +3532,8 @@ export interface Page {
|
|
|
2808
3532
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2809
3533
|
* If given selector resolves to more than one element, the call throws
|
|
2810
3534
|
* an exception. Defaults to `false`.
|
|
3535
|
+
*
|
|
3536
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2811
3537
|
*/
|
|
2812
3538
|
strict?: boolean;
|
|
2813
3539
|
|
|
@@ -2817,6 +3543,8 @@ export interface Page {
|
|
|
2817
3543
|
* `page` methods.
|
|
2818
3544
|
*
|
|
2819
3545
|
* Setting the value to `0` will disable the timeout.
|
|
3546
|
+
*
|
|
3547
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2820
3548
|
*/
|
|
2821
3549
|
timeout?: number;
|
|
2822
3550
|
},
|
|
@@ -2830,6 +3558,8 @@ export interface Page {
|
|
|
2830
3558
|
* @param selector A selector to search for an element. If there are multiple
|
|
2831
3559
|
* elements satisfying the selector, the first will be used.
|
|
2832
3560
|
* @param options
|
|
3561
|
+
*
|
|
3562
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2833
3563
|
*/
|
|
2834
3564
|
isEnabled(
|
|
2835
3565
|
selector: string,
|
|
@@ -2838,6 +3568,8 @@ export interface Page {
|
|
|
2838
3568
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2839
3569
|
* If given selector resolves to more than one element, the call throws
|
|
2840
3570
|
* an exception. Defaults to `false`.
|
|
3571
|
+
*
|
|
3572
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2841
3573
|
*/
|
|
2842
3574
|
strict?: boolean;
|
|
2843
3575
|
|
|
@@ -2847,6 +3579,8 @@ export interface Page {
|
|
|
2847
3579
|
* `page` methods.
|
|
2848
3580
|
*
|
|
2849
3581
|
* Setting the value to `0` will disable the timeout.
|
|
3582
|
+
*
|
|
3583
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2850
3584
|
*/
|
|
2851
3585
|
timeout?: number;
|
|
2852
3586
|
},
|
|
@@ -2860,6 +3594,8 @@ export interface Page {
|
|
|
2860
3594
|
* @param selector A selector to search for an element. If there are multiple
|
|
2861
3595
|
* elements satisfying the selector, the first will be used.
|
|
2862
3596
|
* @param options
|
|
3597
|
+
*
|
|
3598
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2863
3599
|
*/
|
|
2864
3600
|
isHidden(selector: string, options?: StrictnessOptions): boolean;
|
|
2865
3601
|
|
|
@@ -2871,12 +3607,16 @@ export interface Page {
|
|
|
2871
3607
|
* @param selector A selector to search for an element. If there are multiple
|
|
2872
3608
|
* elements satisfying the selector, the first will be used.
|
|
2873
3609
|
* @param options
|
|
3610
|
+
*
|
|
3611
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2874
3612
|
*/
|
|
2875
3613
|
isVisible(selector: string, options?: StrictnessOptions): boolean;
|
|
2876
3614
|
|
|
2877
3615
|
/**
|
|
2878
3616
|
* Returns the keyboard instance to interact with a virtual keyboard on the
|
|
2879
3617
|
* page.
|
|
3618
|
+
*
|
|
3619
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2880
3620
|
*/
|
|
2881
3621
|
keyboard: Keyboard;
|
|
2882
3622
|
|
|
@@ -2886,17 +3626,23 @@ export interface Page {
|
|
|
2886
3626
|
* where the underlying dom changes.
|
|
2887
3627
|
*
|
|
2888
3628
|
* @param selector A selector to use when resolving DOM element.
|
|
3629
|
+
*
|
|
3630
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2889
3631
|
*/
|
|
2890
3632
|
locator(selector: string): Locator;
|
|
2891
3633
|
|
|
2892
3634
|
/**
|
|
2893
3635
|
* The page's main frame. Page is made up of frames in a hierarchical. At the
|
|
2894
3636
|
* top is mainFrame. A page is guaranteed to have a mainFrame.
|
|
3637
|
+
*
|
|
3638
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2895
3639
|
*/
|
|
2896
3640
|
mainFrame(): Frame;
|
|
2897
3641
|
|
|
2898
3642
|
/**
|
|
2899
3643
|
* Returns the mouse instance to interact with a virtual mouse on the page.
|
|
3644
|
+
*
|
|
3645
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2900
3646
|
*/
|
|
2901
3647
|
mouse: Mouse;
|
|
2902
3648
|
|
|
@@ -2919,12 +3665,16 @@ export interface Page {
|
|
|
2919
3665
|
* });
|
|
2920
3666
|
* page.evaluate(() => console.log('hello', 5, { foo: 'bar' }));
|
|
2921
3667
|
* ```
|
|
3668
|
+
*
|
|
3669
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2922
3670
|
*/
|
|
2923
3671
|
on(event: "console", listener: (consoleMessage: ConsoleMessage) => void): void;
|
|
2924
3672
|
|
|
2925
3673
|
/**
|
|
2926
3674
|
* Returns the page that opened the current page. The first page that is
|
|
2927
3675
|
* navigated to will have a null opener.
|
|
3676
|
+
*
|
|
3677
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2928
3678
|
*/
|
|
2929
3679
|
opener(): Page | null;
|
|
2930
3680
|
|
|
@@ -2954,6 +3704,8 @@ export interface Page {
|
|
|
2954
3704
|
* @param key Name of the key to press or a character to generate, such as
|
|
2955
3705
|
* `ArrowLeft` or `a`.
|
|
2956
3706
|
* @param options
|
|
3707
|
+
*
|
|
3708
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2957
3709
|
*/
|
|
2958
3710
|
press(
|
|
2959
3711
|
selector: string,
|
|
@@ -2961,12 +3713,16 @@ export interface Page {
|
|
|
2961
3713
|
options?: {
|
|
2962
3714
|
/**
|
|
2963
3715
|
* Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
|
|
3716
|
+
*
|
|
3717
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2964
3718
|
*/
|
|
2965
3719
|
delay?: number;
|
|
2966
3720
|
|
|
2967
3721
|
/**
|
|
2968
3722
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
2969
3723
|
* will not wait for it to complete. Defaults to `false`.
|
|
3724
|
+
*
|
|
3725
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2970
3726
|
*/
|
|
2971
3727
|
noWaitAfter?: boolean;
|
|
2972
3728
|
|
|
@@ -2974,6 +3730,8 @@ export interface Page {
|
|
|
2974
3730
|
* When `true`, the call requires selector to resolve to a single element.
|
|
2975
3731
|
* If given selector resolves to more than one element, the call throws
|
|
2976
3732
|
* an exception. Defaults to `false`.
|
|
3733
|
+
*
|
|
3734
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2977
3735
|
*/
|
|
2978
3736
|
strict?: boolean;
|
|
2979
3737
|
|
|
@@ -2983,6 +3741,8 @@ export interface Page {
|
|
|
2983
3741
|
* `page` methods.
|
|
2984
3742
|
*
|
|
2985
3743
|
* Setting the value to `0` will disable the timeout.
|
|
3744
|
+
*
|
|
3745
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2986
3746
|
*/
|
|
2987
3747
|
timeout?: number;
|
|
2988
3748
|
},
|
|
@@ -2992,6 +3752,8 @@ export interface Page {
|
|
|
2992
3752
|
* This reloads the current page Returns the main resource response.
|
|
2993
3753
|
*
|
|
2994
3754
|
* @param options
|
|
3755
|
+
*
|
|
3756
|
+
* @deprecated Use "k6/browser" module instead.
|
|
2995
3757
|
*/
|
|
2996
3758
|
reload(options?: {
|
|
2997
3759
|
/**
|
|
@@ -3003,6 +3765,8 @@ export interface Page {
|
|
|
3003
3765
|
* page.setDefaultTimeout(timeout) methods.
|
|
3004
3766
|
*
|
|
3005
3767
|
* Setting the value to `0` will disable the timeout.
|
|
3768
|
+
*
|
|
3769
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3006
3770
|
*/
|
|
3007
3771
|
timeout?: number;
|
|
3008
3772
|
|
|
@@ -3017,6 +3781,8 @@ export interface Page {
|
|
|
3017
3781
|
* when there are no network connections for at least `500` ms. Don't use
|
|
3018
3782
|
* this method for testing especially with chatty websites where the event
|
|
3019
3783
|
* may never fire, rely on web assertions to assess readiness instead.
|
|
3784
|
+
*
|
|
3785
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3020
3786
|
*/
|
|
3021
3787
|
waitUntil?: "load" | "domcontentloaded" | "networkidle";
|
|
3022
3788
|
}): null | Response;
|
|
@@ -3025,30 +3791,42 @@ export interface Page {
|
|
|
3025
3791
|
* Returns the buffer with the captured screenshot from the browser.
|
|
3026
3792
|
*
|
|
3027
3793
|
* @param options
|
|
3794
|
+
*
|
|
3795
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3028
3796
|
*/
|
|
3029
3797
|
screenshot(
|
|
3030
3798
|
options?: {
|
|
3031
3799
|
/**
|
|
3032
3800
|
* An object which specifies clipping of the resulting image.
|
|
3801
|
+
*
|
|
3802
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3033
3803
|
*/
|
|
3034
3804
|
clip?: {
|
|
3035
3805
|
/**
|
|
3036
3806
|
* x-coordinate of top-left corner of clip area
|
|
3807
|
+
*
|
|
3808
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3037
3809
|
*/
|
|
3038
3810
|
x: number;
|
|
3039
3811
|
|
|
3040
3812
|
/**
|
|
3041
3813
|
* y-coordinate of top-left corner of clip area
|
|
3814
|
+
*
|
|
3815
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3042
3816
|
*/
|
|
3043
3817
|
y: number;
|
|
3044
3818
|
|
|
3045
3819
|
/**
|
|
3046
3820
|
* width of clipping area
|
|
3821
|
+
*
|
|
3822
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3047
3823
|
*/
|
|
3048
3824
|
width: number;
|
|
3049
3825
|
|
|
3050
3826
|
/**
|
|
3051
3827
|
* height of clipping area
|
|
3828
|
+
*
|
|
3829
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3052
3830
|
*/
|
|
3053
3831
|
height: number;
|
|
3054
3832
|
};
|
|
@@ -3056,6 +3834,8 @@ export interface Page {
|
|
|
3056
3834
|
/**
|
|
3057
3835
|
* When true, takes a screenshot of the full scrollable page, instead of
|
|
3058
3836
|
* the currently visible viewport. Defaults to `false`.
|
|
3837
|
+
*
|
|
3838
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3059
3839
|
*/
|
|
3060
3840
|
fullPage?: boolean;
|
|
3061
3841
|
} & ScreenshotOptions,
|
|
@@ -3074,6 +3854,8 @@ export interface Page {
|
|
|
3074
3854
|
* one of the passed options is selected. Object can be made up of keys with
|
|
3075
3855
|
* value, label or index.
|
|
3076
3856
|
* @param options
|
|
3857
|
+
*
|
|
3858
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3077
3859
|
*/
|
|
3078
3860
|
selectOption(
|
|
3079
3861
|
selector: string,
|
|
@@ -3082,12 +3864,16 @@ export interface Page {
|
|
|
3082
3864
|
/**
|
|
3083
3865
|
* Setting this to `true` will bypass the actionability checks (visible,
|
|
3084
3866
|
* stable, enabled). Defaults to `false`.
|
|
3867
|
+
*
|
|
3868
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3085
3869
|
*/
|
|
3086
3870
|
force?: boolean;
|
|
3087
3871
|
|
|
3088
3872
|
/**
|
|
3089
3873
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
3090
3874
|
* will not wait for it to complete. Defaults to `false`.
|
|
3875
|
+
*
|
|
3876
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3091
3877
|
*/
|
|
3092
3878
|
noWaitAfter?: boolean;
|
|
3093
3879
|
|
|
@@ -3095,6 +3881,8 @@ export interface Page {
|
|
|
3095
3881
|
* When `true`, the call requires selector to resolve to a single element.
|
|
3096
3882
|
* If given selector resolves to more than one element, the call throws
|
|
3097
3883
|
* an exception. Defaults to `false`.
|
|
3884
|
+
*
|
|
3885
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3098
3886
|
*/
|
|
3099
3887
|
strict?: boolean;
|
|
3100
3888
|
|
|
@@ -3104,6 +3892,8 @@ export interface Page {
|
|
|
3104
3892
|
* `page` methods.
|
|
3105
3893
|
*
|
|
3106
3894
|
* Setting the value to `0` will disable the timeout.
|
|
3895
|
+
*
|
|
3896
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3107
3897
|
*/
|
|
3108
3898
|
timeout?: number;
|
|
3109
3899
|
},
|
|
@@ -3114,6 +3904,8 @@ export interface Page {
|
|
|
3114
3904
|
*
|
|
3115
3905
|
* @param html HTML markup to assign to the page.
|
|
3116
3906
|
* @param options
|
|
3907
|
+
*
|
|
3908
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3117
3909
|
*/
|
|
3118
3910
|
setContent(
|
|
3119
3911
|
html: string,
|
|
@@ -3127,6 +3919,8 @@ export interface Page {
|
|
|
3127
3919
|
* page.setDefaultTimeout(timeout) methods.
|
|
3128
3920
|
*
|
|
3129
3921
|
* Setting the value to `0` will disable the timeout.
|
|
3922
|
+
*
|
|
3923
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3130
3924
|
*/
|
|
3131
3925
|
timeout?: number;
|
|
3132
3926
|
|
|
@@ -3141,6 +3935,8 @@ export interface Page {
|
|
|
3141
3935
|
* when there are no network connections for at least `500` ms. Don't use
|
|
3142
3936
|
* this method for testing especially with chatty websites where the event
|
|
3143
3937
|
* may never fire, rely on web assertions to assess readiness instead.
|
|
3938
|
+
*
|
|
3939
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3144
3940
|
*/
|
|
3145
3941
|
waitUntil?: "load" | "domcontentloaded" | "networkidle";
|
|
3146
3942
|
},
|
|
@@ -3154,6 +3950,8 @@ export interface Page {
|
|
|
3154
3950
|
* - page.waitForNavigation([options])
|
|
3155
3951
|
*
|
|
3156
3952
|
* @param timeout in milliseconds
|
|
3953
|
+
*
|
|
3954
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3157
3955
|
*/
|
|
3158
3956
|
setDefaultNavigationTimeout(timeout: number): void;
|
|
3159
3957
|
|
|
@@ -3162,6 +3960,8 @@ export interface Page {
|
|
|
3162
3960
|
* `timeout` option.
|
|
3163
3961
|
*
|
|
3164
3962
|
* @param timeout in milliseconds
|
|
3963
|
+
*
|
|
3964
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3165
3965
|
*/
|
|
3166
3966
|
setDefaultTimeout(timeout: number): void;
|
|
3167
3967
|
|
|
@@ -3171,6 +3971,8 @@ export interface Page {
|
|
|
3171
3971
|
*
|
|
3172
3972
|
* @param headers An object containing the additional HTTP headers.
|
|
3173
3973
|
* All header values must be strings.
|
|
3974
|
+
*
|
|
3975
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3174
3976
|
*/
|
|
3175
3977
|
setExtraHTTPHeaders(headers: { [key: string]: string }): void;
|
|
3176
3978
|
|
|
@@ -3186,6 +3988,8 @@ export interface Page {
|
|
|
3186
3988
|
* elements satisfying the selector, the first will be used.
|
|
3187
3989
|
* @param files
|
|
3188
3990
|
* @param options
|
|
3991
|
+
*
|
|
3992
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3189
3993
|
*/
|
|
3190
3994
|
setInputFiles(selector: string, files: File | File[], options?: {
|
|
3191
3995
|
/**
|
|
@@ -3193,6 +3997,8 @@ export interface Page {
|
|
|
3193
3997
|
* is overridden by the setDefaultTimeout option on {@link BrowserContext} or
|
|
3194
3998
|
* {@link Page}
|
|
3195
3999
|
* @default 30000
|
|
4000
|
+
*
|
|
4001
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3196
4002
|
*/
|
|
3197
4003
|
timeout?: number;
|
|
3198
4004
|
|
|
@@ -3200,6 +4006,8 @@ export interface Page {
|
|
|
3200
4006
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
3201
4007
|
* will not wait for it to complete.
|
|
3202
4008
|
* @default false
|
|
4009
|
+
*
|
|
4010
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3203
4011
|
*/
|
|
3204
4012
|
noWaitAfter?: boolean;
|
|
3205
4013
|
}): void;
|
|
@@ -3208,15 +4016,21 @@ export interface Page {
|
|
|
3208
4016
|
* This will update the page's width and height.
|
|
3209
4017
|
*
|
|
3210
4018
|
* @param viewportSize
|
|
4019
|
+
*
|
|
4020
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3211
4021
|
*/
|
|
3212
4022
|
setViewportSize(viewportSize: {
|
|
3213
4023
|
/**
|
|
3214
4024
|
* page width in pixels.
|
|
4025
|
+
*
|
|
4026
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3215
4027
|
*/
|
|
3216
4028
|
width: number;
|
|
3217
4029
|
|
|
3218
4030
|
/**
|
|
3219
4031
|
* page height in pixels.
|
|
4032
|
+
*
|
|
4033
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3220
4034
|
*/
|
|
3221
4035
|
height: number;
|
|
3222
4036
|
}): void;
|
|
@@ -3229,6 +4043,8 @@ export interface Page {
|
|
|
3229
4043
|
* @param selector A selector to search for an element. If there are multiple
|
|
3230
4044
|
* elements satisfying the selector, the first will be used.
|
|
3231
4045
|
* @param options
|
|
4046
|
+
*
|
|
4047
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3232
4048
|
*/
|
|
3233
4049
|
tap(
|
|
3234
4050
|
selector: string,
|
|
@@ -3236,6 +4052,8 @@ export interface Page {
|
|
|
3236
4052
|
/**
|
|
3237
4053
|
* Setting this to `true` will bypass the actionability checks (visible,
|
|
3238
4054
|
* stable, enabled). Defaults to `false`.
|
|
4055
|
+
*
|
|
4056
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3239
4057
|
*/
|
|
3240
4058
|
force?: boolean;
|
|
3241
4059
|
|
|
@@ -3243,18 +4061,24 @@ export interface Page {
|
|
|
3243
4061
|
* `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
|
|
3244
4062
|
* action. If not specified, currently pressed modifiers are used,
|
|
3245
4063
|
* otherwise defaults to `null`.
|
|
4064
|
+
*
|
|
4065
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3246
4066
|
*/
|
|
3247
4067
|
modifiers?: KeyboardModifier[];
|
|
3248
4068
|
|
|
3249
4069
|
/**
|
|
3250
4070
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
3251
4071
|
* will not wait for it to complete. Defaults to `false`.
|
|
4072
|
+
*
|
|
4073
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3252
4074
|
*/
|
|
3253
4075
|
noWaitAfter?: boolean;
|
|
3254
4076
|
|
|
3255
4077
|
/**
|
|
3256
4078
|
* A point to use relative to the top left corner of the element. If not
|
|
3257
4079
|
* supplied, a visible point of the element is used.
|
|
4080
|
+
*
|
|
4081
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3258
4082
|
*/
|
|
3259
4083
|
position?: {
|
|
3260
4084
|
x: number;
|
|
@@ -3266,6 +4090,8 @@ export interface Page {
|
|
|
3266
4090
|
* When `true`, the call requires selector to resolve to a single element.
|
|
3267
4091
|
* If given selector resolves to more than one element, the call throws
|
|
3268
4092
|
* an exception. Defaults to `false`.
|
|
4093
|
+
*
|
|
4094
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3269
4095
|
*/
|
|
3270
4096
|
strict?: boolean;
|
|
3271
4097
|
|
|
@@ -3275,6 +4101,8 @@ export interface Page {
|
|
|
3275
4101
|
* `page` methods.
|
|
3276
4102
|
*
|
|
3277
4103
|
* Setting the value to `0` will disable the timeout.
|
|
4104
|
+
*
|
|
4105
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3278
4106
|
*/
|
|
3279
4107
|
timeout?: number;
|
|
3280
4108
|
|
|
@@ -3282,10 +4110,12 @@ export interface Page {
|
|
|
3282
4110
|
* Setting this to `true` will perform the actionability checks without
|
|
3283
4111
|
* performing the action. Useful to wait until the element is ready for the
|
|
3284
4112
|
* action without performing it. Defaults to `false`.
|
|
4113
|
+
*
|
|
4114
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3285
4115
|
*/
|
|
3286
4116
|
trial?: boolean;
|
|
3287
4117
|
},
|
|
3288
|
-
):
|
|
4118
|
+
): void;
|
|
3289
4119
|
|
|
3290
4120
|
/**
|
|
3291
4121
|
* **NOTE** Use locator-based locator.textContent([options]) instead.
|
|
@@ -3295,6 +4125,8 @@ export interface Page {
|
|
|
3295
4125
|
* @param selector A selector to search for an element. If there are multiple
|
|
3296
4126
|
* elements satisfying the selector, the first will be used.
|
|
3297
4127
|
* @param options
|
|
4128
|
+
*
|
|
4129
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3298
4130
|
*/
|
|
3299
4131
|
textContent(
|
|
3300
4132
|
selector: string,
|
|
@@ -3303,6 +4135,8 @@ export interface Page {
|
|
|
3303
4135
|
* When `true`, the call requires selector to resolve to a single element.
|
|
3304
4136
|
* If given selector resolves to more than one element, the call throws
|
|
3305
4137
|
* an exception. Defaults to `false`.
|
|
4138
|
+
*
|
|
4139
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3306
4140
|
*/
|
|
3307
4141
|
strict?: boolean;
|
|
3308
4142
|
|
|
@@ -3312,6 +4146,8 @@ export interface Page {
|
|
|
3312
4146
|
* `page` methods.
|
|
3313
4147
|
*
|
|
3314
4148
|
* Setting the value to `0` will disable the timeout.
|
|
4149
|
+
*
|
|
4150
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3315
4151
|
*/
|
|
3316
4152
|
timeout?: number;
|
|
3317
4153
|
},
|
|
@@ -3327,6 +4163,8 @@ export interface Page {
|
|
|
3327
4163
|
* ```js
|
|
3328
4164
|
* page.throttleCPU({ rate: 4 });
|
|
3329
4165
|
* ```
|
|
4166
|
+
*
|
|
4167
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3330
4168
|
*/
|
|
3331
4169
|
throttleCPU(profile: CPUProfile): void;
|
|
3332
4170
|
|
|
@@ -3363,17 +4201,23 @@ export interface Page {
|
|
|
3363
4201
|
* page.throttleNetwork(networkProfiles['Slow 3G']);
|
|
3364
4202
|
* ... // redacted
|
|
3365
4203
|
* ```
|
|
4204
|
+
*
|
|
4205
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3366
4206
|
*/
|
|
3367
4207
|
throttleNetwork(profile: NetworkProfile): void;
|
|
3368
4208
|
|
|
3369
4209
|
/**
|
|
3370
4210
|
* Returns the page's title.
|
|
4211
|
+
*
|
|
4212
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3371
4213
|
*/
|
|
3372
4214
|
title(): string;
|
|
3373
4215
|
|
|
3374
4216
|
/**
|
|
3375
4217
|
* Returns the touchscreen instance to interact with a virtual touchscreen on
|
|
3376
4218
|
* the page.
|
|
4219
|
+
*
|
|
4220
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3377
4221
|
*/
|
|
3378
4222
|
touchscreen: Touchscreen;
|
|
3379
4223
|
|
|
@@ -3386,6 +4230,8 @@ export interface Page {
|
|
|
3386
4230
|
* elements satisfying the selector, the first will be used.
|
|
3387
4231
|
* @param text The text to type into the element.
|
|
3388
4232
|
* @param options
|
|
4233
|
+
*
|
|
4234
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3389
4235
|
*/
|
|
3390
4236
|
type(
|
|
3391
4237
|
selector: string,
|
|
@@ -3393,12 +4239,16 @@ export interface Page {
|
|
|
3393
4239
|
options?: {
|
|
3394
4240
|
/**
|
|
3395
4241
|
* Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
|
|
4242
|
+
*
|
|
4243
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3396
4244
|
*/
|
|
3397
4245
|
delay?: number;
|
|
3398
4246
|
|
|
3399
4247
|
/**
|
|
3400
4248
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
3401
4249
|
* will not wait for it to complete. Defaults to `false`.
|
|
4250
|
+
*
|
|
4251
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3402
4252
|
*/
|
|
3403
4253
|
noWaitAfter?: boolean;
|
|
3404
4254
|
|
|
@@ -3406,6 +4256,8 @@ export interface Page {
|
|
|
3406
4256
|
* When `true`, the call requires selector to resolve to a single element.
|
|
3407
4257
|
* If given selector resolves to more than one element, the call throws
|
|
3408
4258
|
* an exception. Defaults to `false`.
|
|
4259
|
+
*
|
|
4260
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3409
4261
|
*/
|
|
3410
4262
|
strict?: boolean;
|
|
3411
4263
|
|
|
@@ -3415,6 +4267,8 @@ export interface Page {
|
|
|
3415
4267
|
* `page` methods.
|
|
3416
4268
|
*
|
|
3417
4269
|
* Setting the value to `0` will disable the timeout.
|
|
4270
|
+
*
|
|
4271
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3418
4272
|
*/
|
|
3419
4273
|
timeout?: number;
|
|
3420
4274
|
},
|
|
@@ -3428,6 +4282,8 @@ export interface Page {
|
|
|
3428
4282
|
* @param selector A selector to search for an element. If there are multiple
|
|
3429
4283
|
* elements satisfying the selector, the first will be used.
|
|
3430
4284
|
* @param options
|
|
4285
|
+
*
|
|
4286
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3431
4287
|
*/
|
|
3432
4288
|
uncheck(
|
|
3433
4289
|
selector: string,
|
|
@@ -3435,18 +4291,24 @@ export interface Page {
|
|
|
3435
4291
|
/**
|
|
3436
4292
|
* Setting this to `true` will bypass the actionability checks (visible,
|
|
3437
4293
|
* stable, enabled). Defaults to `false`.
|
|
4294
|
+
*
|
|
4295
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3438
4296
|
*/
|
|
3439
4297
|
force?: boolean;
|
|
3440
4298
|
|
|
3441
4299
|
/**
|
|
3442
4300
|
* If set to `true` and a navigation occurs from performing this action, it
|
|
3443
4301
|
* will not wait for it to complete. Defaults to `false`.
|
|
4302
|
+
*
|
|
4303
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3444
4304
|
*/
|
|
3445
4305
|
noWaitAfter?: boolean;
|
|
3446
4306
|
|
|
3447
4307
|
/**
|
|
3448
4308
|
* A point to use relative to the top left corner of the element. If not
|
|
3449
4309
|
* supplied, a visible point of the element is used.
|
|
4310
|
+
*
|
|
4311
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3450
4312
|
*/
|
|
3451
4313
|
position?: {
|
|
3452
4314
|
x: number;
|
|
@@ -3458,6 +4320,8 @@ export interface Page {
|
|
|
3458
4320
|
* When `true`, the call requires selector to resolve to a single element.
|
|
3459
4321
|
* If given selector resolves to more than one element, the call throws
|
|
3460
4322
|
* an exception. Defaults to `false`.
|
|
4323
|
+
*
|
|
4324
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3461
4325
|
*/
|
|
3462
4326
|
strict?: boolean;
|
|
3463
4327
|
|
|
@@ -3467,6 +4331,8 @@ export interface Page {
|
|
|
3467
4331
|
* `page` methods.
|
|
3468
4332
|
*
|
|
3469
4333
|
* Setting the value to `0` will disable the timeout.
|
|
4334
|
+
*
|
|
4335
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3470
4336
|
*/
|
|
3471
4337
|
timeout?: number;
|
|
3472
4338
|
|
|
@@ -3474,6 +4340,8 @@ export interface Page {
|
|
|
3474
4340
|
* Setting this to `true` will perform the actionability checks without
|
|
3475
4341
|
* performing the action. Useful to wait until the element is ready for the
|
|
3476
4342
|
* action without performing it. Defaults to `false`.
|
|
4343
|
+
*
|
|
4344
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3477
4345
|
*/
|
|
3478
4346
|
trial?: boolean;
|
|
3479
4347
|
},
|
|
@@ -3481,20 +4349,28 @@ export interface Page {
|
|
|
3481
4349
|
|
|
3482
4350
|
/**
|
|
3483
4351
|
* Returns the page's URL.
|
|
4352
|
+
*
|
|
4353
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3484
4354
|
*/
|
|
3485
4355
|
url(): string;
|
|
3486
4356
|
|
|
3487
4357
|
/**
|
|
3488
4358
|
* Returns the page's size (width and height).
|
|
4359
|
+
*
|
|
4360
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3489
4361
|
*/
|
|
3490
4362
|
viewportSize(): {
|
|
3491
4363
|
/**
|
|
3492
4364
|
* page width in pixels.
|
|
4365
|
+
*
|
|
4366
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3493
4367
|
*/
|
|
3494
4368
|
width: number;
|
|
3495
4369
|
|
|
3496
4370
|
/**
|
|
3497
4371
|
* page height in pixels.
|
|
4372
|
+
*
|
|
4373
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3498
4374
|
*/
|
|
3499
4375
|
height: number;
|
|
3500
4376
|
};
|
|
@@ -3505,6 +4381,8 @@ export interface Page {
|
|
|
3505
4381
|
* @param pageFunction Function to be evaluated in the page context.
|
|
3506
4382
|
* @param arg Optional argument to pass to `pageFunction`.
|
|
3507
4383
|
* @param options
|
|
4384
|
+
*
|
|
4385
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3508
4386
|
*/
|
|
3509
4387
|
waitForFunction<R, Arg>(
|
|
3510
4388
|
pageFunction: PageFunction<Arg, R>,
|
|
@@ -3514,6 +4392,8 @@ export interface Page {
|
|
|
3514
4392
|
* `requestAnimationFrame` callback. If `polling` is a number, then it is
|
|
3515
4393
|
* treated as an interval in milliseconds at which the function would be
|
|
3516
4394
|
* executed. Defaults to `raf`.
|
|
4395
|
+
*
|
|
4396
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3517
4397
|
*/
|
|
3518
4398
|
polling?: number | "raf";
|
|
3519
4399
|
|
|
@@ -3523,6 +4403,8 @@ export interface Page {
|
|
|
3523
4403
|
* `page` methods.
|
|
3524
4404
|
*
|
|
3525
4405
|
* Setting the value to `0` will disable the timeout.
|
|
4406
|
+
*
|
|
4407
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3526
4408
|
*/
|
|
3527
4409
|
timeout?: number;
|
|
3528
4410
|
},
|
|
@@ -3543,6 +4425,8 @@ export interface Page {
|
|
|
3543
4425
|
* this method for testing especially with chatty websites where the event
|
|
3544
4426
|
* may never fire, rely on web assertions to assess readiness instead.
|
|
3545
4427
|
* @param options
|
|
4428
|
+
*
|
|
4429
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3546
4430
|
*/
|
|
3547
4431
|
waitForLoadState(
|
|
3548
4432
|
state?: "load" | "domcontentloaded" | "networkidle",
|
|
@@ -3556,6 +4440,8 @@ export interface Page {
|
|
|
3556
4440
|
* page.setDefaultTimeout(timeout) methods.
|
|
3557
4441
|
*
|
|
3558
4442
|
* Setting the value to `0` will disable the timeout.
|
|
4443
|
+
*
|
|
4444
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3559
4445
|
*/
|
|
3560
4446
|
timeout?: number;
|
|
3561
4447
|
},
|
|
@@ -3566,6 +4452,8 @@ export interface Page {
|
|
|
3566
4452
|
* resource response.
|
|
3567
4453
|
*
|
|
3568
4454
|
* @param options
|
|
4455
|
+
*
|
|
4456
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3569
4457
|
*/
|
|
3570
4458
|
waitForNavigation(options?: {
|
|
3571
4459
|
/**
|
|
@@ -3577,6 +4465,8 @@ export interface Page {
|
|
|
3577
4465
|
* page.setDefaultTimeout(timeout) methods.
|
|
3578
4466
|
*
|
|
3579
4467
|
* Setting the value to `0` will disable the timeout.
|
|
4468
|
+
*
|
|
4469
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3580
4470
|
*/
|
|
3581
4471
|
timeout?: number;
|
|
3582
4472
|
|
|
@@ -3591,6 +4481,8 @@ export interface Page {
|
|
|
3591
4481
|
* when there are no network connections for at least `500` ms. Don't use
|
|
3592
4482
|
* this method for testing especially with chatty websites where the event
|
|
3593
4483
|
* may never fire, rely on web assertions to assess readiness instead.
|
|
4484
|
+
*
|
|
4485
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3594
4486
|
*/
|
|
3595
4487
|
waitUntil?: "load" | "domcontentloaded" | "networkidle";
|
|
3596
4488
|
}): Promise<null | Response>;
|
|
@@ -3603,6 +4495,8 @@ export interface Page {
|
|
|
3603
4495
|
*
|
|
3604
4496
|
* @param selector A selector to query for.
|
|
3605
4497
|
* @param options
|
|
4498
|
+
*
|
|
4499
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3606
4500
|
*/
|
|
3607
4501
|
waitForSelector(
|
|
3608
4502
|
selector: string,
|
|
@@ -3615,6 +4509,8 @@ export interface Page {
|
|
|
3615
4509
|
* `visibility:hidden`.
|
|
3616
4510
|
* - `'hidden'` - wait for element to be either detached from DOM, or have
|
|
3617
4511
|
* an empty bounding box or `visibility:hidden`.
|
|
4512
|
+
*
|
|
4513
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3618
4514
|
*/
|
|
3619
4515
|
state?: "attached" | "detached" | "visible" | "hidden";
|
|
3620
4516
|
|
|
@@ -3622,6 +4518,8 @@ export interface Page {
|
|
|
3622
4518
|
* When `true`, the call requires selector to resolve to a single element.
|
|
3623
4519
|
* If given selector resolves to more than one element, the call throws
|
|
3624
4520
|
* an exception. Defaults to `false`.
|
|
4521
|
+
*
|
|
4522
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3625
4523
|
*/
|
|
3626
4524
|
strict?: boolean;
|
|
3627
4525
|
|
|
@@ -3631,6 +4529,8 @@ export interface Page {
|
|
|
3631
4529
|
* `page` methods.
|
|
3632
4530
|
*
|
|
3633
4531
|
* Setting the value to `0` will disable the timeout.
|
|
4532
|
+
*
|
|
4533
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3634
4534
|
*/
|
|
3635
4535
|
timeout?: number;
|
|
3636
4536
|
},
|
|
@@ -3644,11 +4544,15 @@ export interface Page {
|
|
|
3644
4544
|
* Waits for the given `timeout` in milliseconds.
|
|
3645
4545
|
*
|
|
3646
4546
|
* @param timeout A timeout to wait for
|
|
4547
|
+
*
|
|
4548
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3647
4549
|
*/
|
|
3648
4550
|
waitForTimeout(timeout: number): void;
|
|
3649
4551
|
|
|
3650
4552
|
/**
|
|
3651
4553
|
* This method returns all of the dedicated WebWorkers associated with the page.
|
|
4554
|
+
*
|
|
4555
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3652
4556
|
*/
|
|
3653
4557
|
workers(): Worker[];
|
|
3654
4558
|
|
|
@@ -3659,6 +4563,8 @@ export interface Page {
|
|
|
3659
4563
|
* If no elements match the selector, the return value resolves to `null`.
|
|
3660
4564
|
* To wait for an element on the page, use locator.waitFor([options]).
|
|
3661
4565
|
* @param selector A selector to query for.
|
|
4566
|
+
*
|
|
4567
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3662
4568
|
*/
|
|
3663
4569
|
$(selector: string): ElementHandle | null;
|
|
3664
4570
|
|
|
@@ -3668,23 +4574,31 @@ export interface Page {
|
|
|
3668
4574
|
* The method finds all elements matching the specified selector within the
|
|
3669
4575
|
* page. If no elements match the selector, the return value resolves to `[]`.
|
|
3670
4576
|
* @param selector A selector to query for.
|
|
4577
|
+
*
|
|
4578
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3671
4579
|
*/
|
|
3672
4580
|
$$(selector: string): ElementHandle[];
|
|
3673
4581
|
}
|
|
3674
4582
|
|
|
3675
4583
|
/**
|
|
3676
4584
|
* Request represents requests which are sent by a page.
|
|
4585
|
+
*
|
|
4586
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3677
4587
|
*/
|
|
3678
4588
|
export interface Request {
|
|
3679
4589
|
/**
|
|
3680
4590
|
* An object with HTTP headers associated with the request. All header names are
|
|
3681
4591
|
* lower-case.
|
|
3682
4592
|
* @returns The headers object.
|
|
4593
|
+
*
|
|
4594
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3683
4595
|
*/
|
|
3684
4596
|
allHeaders(): Record<string, string>;
|
|
3685
4597
|
|
|
3686
4598
|
/**
|
|
3687
4599
|
* @returns the Frame that initiated this request
|
|
4600
|
+
*
|
|
4601
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3688
4602
|
*/
|
|
3689
4603
|
frame(): Frame;
|
|
3690
4604
|
|
|
@@ -3692,6 +4606,8 @@ export interface Request {
|
|
|
3692
4606
|
* An object with HTTP headers associated with the request. All header names are
|
|
3693
4607
|
* lower-case.
|
|
3694
4608
|
* @returns An object with HTTP headers associated with the request.
|
|
4609
|
+
*
|
|
4610
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3695
4611
|
*/
|
|
3696
4612
|
headers(): Record<string, string>;
|
|
3697
4613
|
|
|
@@ -3700,6 +4616,8 @@ export interface Request {
|
|
|
3700
4616
|
* header names are not lower-cased. Headers with multiple entries, such as
|
|
3701
4617
|
* `Set-Cookie`, appear in the array multiple times.
|
|
3702
4618
|
* @returns An array of all the request HTTP headers.
|
|
4619
|
+
*
|
|
4620
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3703
4621
|
*/
|
|
3704
4622
|
headersArray(): Array<{ name: string; value: string }>;
|
|
3705
4623
|
|
|
@@ -3707,29 +4625,39 @@ export interface Request {
|
|
|
3707
4625
|
* Retuns the value of the header matching the name. The name is case insensitive.
|
|
3708
4626
|
* @param name Header name to retrieve value for.
|
|
3709
4627
|
* @returns The value of the header matching the name.
|
|
4628
|
+
*
|
|
4629
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3710
4630
|
*/
|
|
3711
4631
|
headerValue(name: string): string | null;
|
|
3712
4632
|
|
|
3713
4633
|
/**
|
|
3714
4634
|
* @returns a boolean stating whether the request is for a navigation
|
|
4635
|
+
*
|
|
4636
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3715
4637
|
*/
|
|
3716
4638
|
isNavigationRequest(): boolean;
|
|
3717
4639
|
|
|
3718
4640
|
/**
|
|
3719
4641
|
* Request's method (GET, POST, etc.)
|
|
3720
4642
|
* @returns request's method name
|
|
4643
|
+
*
|
|
4644
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3721
4645
|
*/
|
|
3722
4646
|
method(): string;
|
|
3723
4647
|
|
|
3724
4648
|
/**
|
|
3725
4649
|
* Contains the request's post body, if any.
|
|
3726
4650
|
* @returns request's post body
|
|
4651
|
+
*
|
|
4652
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3727
4653
|
*/
|
|
3728
4654
|
postData(): string;
|
|
3729
4655
|
|
|
3730
4656
|
/**
|
|
3731
4657
|
* Request's post body in a binary form, if any.
|
|
3732
4658
|
* @returns an ArrayBuffer with request's post data
|
|
4659
|
+
*
|
|
4660
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3733
4661
|
*/
|
|
3734
4662
|
postDataBuffer(): ArrayBuffer | null;
|
|
3735
4663
|
|
|
@@ -3739,6 +4667,8 @@ export interface Request {
|
|
|
3739
4667
|
* `media`, `font`, `script`, `texttrack`, `xhr`, `fetch`, `eventsource`,
|
|
3740
4668
|
* `websocket`, `manifest`, `other`.
|
|
3741
4669
|
* @returns resource type name
|
|
4670
|
+
*
|
|
4671
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3742
4672
|
*/
|
|
3743
4673
|
resourceType(): ResourceType;
|
|
3744
4674
|
|
|
@@ -3746,12 +4676,16 @@ export interface Request {
|
|
|
3746
4676
|
* Returns the matching `Response` object, or `null` if the response was not received
|
|
3747
4677
|
* due to error.
|
|
3748
4678
|
* @returns The `Response` object, or `null` if the response was not received due to error.
|
|
4679
|
+
*
|
|
4680
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3749
4681
|
*/
|
|
3750
4682
|
response(): Response | null;
|
|
3751
4683
|
|
|
3752
4684
|
/**
|
|
3753
4685
|
* Returns resource size information for given request.
|
|
3754
4686
|
* @returns Resource size information for given request.
|
|
4687
|
+
*
|
|
4688
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3755
4689
|
*/
|
|
3756
4690
|
size(): { body: number; headers: number };
|
|
3757
4691
|
|
|
@@ -3760,35 +4694,47 @@ export interface Request {
|
|
|
3760
4694
|
* become available upon the response, `responseEnd` becomes available when request
|
|
3761
4695
|
* finishes.
|
|
3762
4696
|
* @returns Resource timing information for given request.
|
|
4697
|
+
*
|
|
4698
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3763
4699
|
*/
|
|
3764
4700
|
timing(): ResourceTiming;
|
|
3765
4701
|
|
|
3766
4702
|
/**
|
|
3767
4703
|
* URL of the request.
|
|
3768
4704
|
* @returns request URL
|
|
4705
|
+
*
|
|
4706
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3769
4707
|
*/
|
|
3770
4708
|
url(): string;
|
|
3771
4709
|
}
|
|
3772
4710
|
|
|
3773
4711
|
/**
|
|
3774
4712
|
* Response represents responses which are received by page.
|
|
4713
|
+
*
|
|
4714
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3775
4715
|
*/
|
|
3776
4716
|
export interface Response {
|
|
3777
4717
|
/**
|
|
3778
4718
|
* An object with HTTP headers associated with the response. All header names are
|
|
3779
4719
|
* lower-case.
|
|
3780
4720
|
* @returns The headers object.
|
|
4721
|
+
*
|
|
4722
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3781
4723
|
*/
|
|
3782
4724
|
allHeaders(): Record<string, string>;
|
|
3783
4725
|
|
|
3784
4726
|
/**
|
|
3785
4727
|
* Returns the response body.
|
|
3786
4728
|
* @returns A buffer with response body.
|
|
4729
|
+
*
|
|
4730
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3787
4731
|
*/
|
|
3788
4732
|
body(): ArrayBuffer;
|
|
3789
4733
|
|
|
3790
4734
|
/**
|
|
3791
4735
|
* @returns the Frame that initiated this response
|
|
4736
|
+
*
|
|
4737
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3792
4738
|
*/
|
|
3793
4739
|
frame(): Frame;
|
|
3794
4740
|
|
|
@@ -3796,6 +4742,8 @@ export interface Response {
|
|
|
3796
4742
|
* An object with HTTP headers associated with the response. All header names are
|
|
3797
4743
|
* lower-case.
|
|
3798
4744
|
* @returns The headers object.
|
|
4745
|
+
*
|
|
4746
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3799
4747
|
*/
|
|
3800
4748
|
headers(): Record<string, string>;
|
|
3801
4749
|
|
|
@@ -3804,6 +4752,8 @@ export interface Response {
|
|
|
3804
4752
|
* names are not lower-cased. Headers with multiple entries, such as `Set-Cookie`,
|
|
3805
4753
|
* appear in the array multiple times.
|
|
3806
4754
|
* @returns An array of all the request HTTP headers.
|
|
4755
|
+
*
|
|
4756
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3807
4757
|
*/
|
|
3808
4758
|
headersArray(): Array<{ name: string; value: string }>;
|
|
3809
4759
|
|
|
@@ -3814,6 +4764,8 @@ export interface Response {
|
|
|
3814
4764
|
* no headers are found, `null` is returned.
|
|
3815
4765
|
* @param name Header name to retrieve value for.
|
|
3816
4766
|
* @returns The header value for the given name.
|
|
4767
|
+
*
|
|
4768
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3817
4769
|
*/
|
|
3818
4770
|
headerValue(name: string): string | null;
|
|
3819
4771
|
|
|
@@ -3822,6 +4774,8 @@ export interface Response {
|
|
|
3822
4774
|
* The name is case insensitive.
|
|
3823
4775
|
* @param name Header name to retrieve values for.
|
|
3824
4776
|
* @returns An array of header values for the given name.
|
|
4777
|
+
*
|
|
4778
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3825
4779
|
*/
|
|
3826
4780
|
headerValues(name: string): string[];
|
|
3827
4781
|
|
|
@@ -3829,6 +4783,8 @@ export interface Response {
|
|
|
3829
4783
|
* Returns the JSON representation of response body. Throws if response body is not
|
|
3830
4784
|
* parsable via `JSON.parse`.
|
|
3831
4785
|
* @returns JSON representation of response body.
|
|
4786
|
+
*
|
|
4787
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3832
4788
|
*/
|
|
3833
4789
|
json(): any;
|
|
3834
4790
|
|
|
@@ -3836,48 +4792,64 @@ export interface Response {
|
|
|
3836
4792
|
* Contains a boolean stating whether the response was successful (status in the
|
|
3837
4793
|
* range 200-299) or not.
|
|
3838
4794
|
* @returns a boolean stating whether the response was successful
|
|
4795
|
+
*
|
|
4796
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3839
4797
|
*/
|
|
3840
4798
|
ok(): boolean;
|
|
3841
4799
|
|
|
3842
4800
|
/**
|
|
3843
4801
|
* The request that was used to produce the response.
|
|
3844
4802
|
* @returns the matching `Request` object
|
|
4803
|
+
*
|
|
4804
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3845
4805
|
*/
|
|
3846
4806
|
request(): Request;
|
|
3847
4807
|
|
|
3848
4808
|
/**
|
|
3849
4809
|
* Security details associated with this response.
|
|
3850
4810
|
* @returns A matching `SecurityDetailsObject`
|
|
4811
|
+
*
|
|
4812
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3851
4813
|
*/
|
|
3852
4814
|
securityDetails(): SecurityDetailsObject | null;
|
|
3853
4815
|
|
|
3854
4816
|
/**
|
|
3855
4817
|
* Returns the IP address and port of the server for this response.
|
|
3856
4818
|
* @returns The IP address and port of the server
|
|
4819
|
+
*
|
|
4820
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3857
4821
|
*/
|
|
3858
4822
|
serverAddr(): { ipAddress: string; port: number } | null;
|
|
3859
4823
|
|
|
3860
4824
|
/**
|
|
3861
4825
|
* Contains the status code of the response (e.g., 200 for a success).
|
|
3862
4826
|
* @returns the status code of the response
|
|
4827
|
+
*
|
|
4828
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3863
4829
|
*/
|
|
3864
4830
|
status(): number;
|
|
3865
4831
|
|
|
3866
4832
|
/**
|
|
3867
4833
|
* Contains the status text of the response (e.g. usually an "OK" for a success).
|
|
3868
4834
|
* @returns the status text of the response
|
|
4835
|
+
*
|
|
4836
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3869
4837
|
*/
|
|
3870
4838
|
statusText(): string;
|
|
3871
4839
|
|
|
3872
4840
|
/**
|
|
3873
4841
|
* The size of the response body and the headers.
|
|
3874
4842
|
* @returns The size of the response body and the headers.
|
|
4843
|
+
*
|
|
4844
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3875
4845
|
*/
|
|
3876
4846
|
size(): { body: number; headers: number };
|
|
3877
4847
|
|
|
3878
4848
|
/**
|
|
3879
4849
|
* Contains the URL of the response.
|
|
3880
4850
|
* @returns the URL of the response
|
|
4851
|
+
*
|
|
4852
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3881
4853
|
*/
|
|
3882
4854
|
url(): string;
|
|
3883
4855
|
}
|
|
@@ -3886,23 +4858,31 @@ export interface Response {
|
|
|
3886
4858
|
* Touchscreen provides an api for interacting with a virtual touchscreen. It
|
|
3887
4859
|
* operates in main-frame CSS pixels relative to the top-left corner of the
|
|
3888
4860
|
* viewport.
|
|
4861
|
+
*
|
|
4862
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3889
4863
|
*/
|
|
3890
4864
|
export interface Touchscreen {
|
|
3891
4865
|
/**
|
|
3892
4866
|
* Taps on the specified position (`x`,`y`), which internally dispatches a `touchstart` and `touchend` event.
|
|
3893
4867
|
* @param x The x position.
|
|
3894
4868
|
* @param y The y position.
|
|
4869
|
+
*
|
|
4870
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3895
4871
|
*/
|
|
3896
|
-
tap(x: number, y: number):
|
|
4872
|
+
tap(x: number, y: number): void;
|
|
3897
4873
|
}
|
|
3898
4874
|
|
|
3899
4875
|
/**
|
|
3900
4876
|
* The Worker represents a [WebWorker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API).
|
|
4877
|
+
*
|
|
4878
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3901
4879
|
*/
|
|
3902
4880
|
export interface Worker {
|
|
3903
4881
|
/**
|
|
3904
4882
|
* Get the URL of the web worker.
|
|
3905
4883
|
* @return The URL of the web worker.
|
|
4884
|
+
*
|
|
4885
|
+
* @deprecated Use "k6/browser" module instead.
|
|
3906
4886
|
*/
|
|
3907
4887
|
url(): string;
|
|
3908
4888
|
}
|