@types/k6 0.44.2 → 0.45.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.
@@ -1,360 +1,370 @@
1
1
  import {
2
- ContentLoadOptions,
3
- ElementClickOptions,
4
- ElementHandleOptions,
5
- ElementStateFilter,
6
- KeyboardModifierOptions,
7
- KeyboardPressOptions,
8
- LifecycleEvent,
9
- MouseClickOptions,
10
- MouseMoveOptions,
11
- MouseMultiClickOptions,
12
- NavigationOptions,
13
- PageFunction,
14
- PollingOptions,
15
- SelectOptionsObject,
16
- StrictnessOptions,
17
- TimeoutOptions,
18
- } from ".";
19
- import { ElementHandle } from "./element_handle";
20
- import { JSHandle } from "./js_handle";
21
- import { Response } from "./response";
22
- import { Locator } from "./locator";
23
- import { Page } from "./page";
2
+ ContentLoadOptions,
3
+ ElementClickOptions,
4
+ ElementHandleOptions,
5
+ ElementStateFilter,
6
+ KeyboardModifierOptions,
7
+ KeyboardPressOptions,
8
+ LifecycleEvent,
9
+ MouseClickOptions,
10
+ MouseMoveOptions,
11
+ MouseMultiClickOptions,
12
+ NavigationOptions,
13
+ PageFunction,
14
+ PollingOptions,
15
+ SelectOptionsObject,
16
+ StrictnessOptions,
17
+ TimeoutOptions,
18
+ } from '.';
19
+ import { ElementHandle } from './element_handle';
20
+ import { JSHandle } from './js_handle';
21
+ import { Response } from './response';
22
+ import { Locator } from './locator';
23
+ import { Page } from './page';
24
24
 
25
25
  /**
26
26
  * Frame represents the frame within a page. A page is made up of hierarchy of frames.
27
27
  */
28
28
  export class Frame {
29
- /**
30
- * Finds an element matching the specified selector within the `Frame`.
31
- * @param selector A selector to query element for.
32
- * @returns An `ElementHandle` pointing to the result element or `null`.
33
- */
34
- $(selector: string): ElementHandle | null;
35
-
36
- /**
37
- * Finds all elements matching the specified selector within the `Frame`.
38
- * @param selector A selector to query element for.
39
- * @returns A list of `ElementHandle`s pointing to the result elements.
40
- */
41
- $$(selector: string): ElementHandle[];
42
-
43
- /**
44
- * Checks the first checkbox element found that matches selector.
45
- * @param selector The selector to use.
46
- * @param options The options to use.
47
- */
48
- check(selector: string, options?: ElementClickOptions & StrictnessOptions): void;
49
-
50
- /**
51
- * Uncheck the first found element that matches the selector.
52
- * @param selector The selector to use.
53
- * @param options The options to use.
54
- */
55
- uncheck(selector: string, options?: ElementClickOptions & StrictnessOptions): void;
56
-
57
- /**
58
- * Clicks the element.
59
- * @param selector The selector to use.
60
- * @param options The options to use.
61
- * @returns A promise that resolves when the element is clicked.
62
- */
63
- click(selector: string, options?: MouseMultiClickOptions & StrictnessOptions): Promise<void>;
64
-
65
- /**
66
- * Double clicks the element.
67
- * @param selector The selector to use.
68
- * @param options The options to use.
69
- */
70
- dblclick(selector: string, options?: MouseClickOptions & MouseMoveOptions & StrictnessOptions): void;
71
-
72
- /**
73
- * Fills out the first element found that matches the selector.
74
- * @param selector The selector to use.
75
- * @param value The value to fill.
76
- * @param options The options to use.
77
- */
78
- fill(selector: string, value: string, options?: ElementHandleOptions & StrictnessOptions): void;
79
-
80
- /**
81
- * Focuses the first element found that matches the selector.
82
- * @param selector The selector to use.
83
- * @param options The options to use.
84
- */
85
- focus(selector: string, options?: TimeoutOptions & StrictnessOptions): void;
86
-
87
- /**
88
- * Hovers the first element found that matches the selector.
89
- * @param selector The selector to use.
90
- * @param options The options to use.
91
- */
92
- hover(selector: string, options?: ElementClickOptions & KeyboardModifierOptions & StrictnessOptions): void;
93
-
94
- /**
95
- * Taps the first element found that matches the selector.
96
- * @param selector The selector to use.
97
- * @param options The options to use.
98
- */
99
- tap(selector: string, options?: ElementClickOptions & KeyboardModifierOptions & StrictnessOptions): void;
100
-
101
- /**
102
- * Press the given key for the first element found that matches the selector.
103
- * @param selector The selector to use.
104
- * @param key The key to press.
105
- * @param options The options to use.
106
- */
107
- press(selector: string, key: string, options?: KeyboardPressOptions & StrictnessOptions): void;
108
-
109
- /**
110
- * Type the given text for the first element found that matches the selector.
111
- * @param selector The selector to use.
112
- * @param text The text to type.
113
- * @param options The options to use.
114
- */
115
- type(selector: string, text: string, options?: KeyboardPressOptions & StrictnessOptions): void;
116
-
117
- /**
118
- * Select the given options and return the array of option values of the first element
119
- * found that matches the selector.
120
- * @param selector The selector to use.
121
- * @param values The values to select.
122
- * @returns The array of option values of the first element found.
123
- */
124
- selectOption(
125
- selector: string,
126
- values: string | ElementHandle | SelectOptionsObject | string[] | ElementHandle[] | SelectOptionsObject[],
127
- options?: ElementHandleOptions & StrictnessOptions): string[];
128
-
129
- /**
130
- * Dispatches an event for the first element matching the selector.
131
- * @param selector The selector to use.
132
- * @param type The type of event to dispatch.
133
- * @param eventInit The event initialization properties.
134
- * @param options The options to use.
135
- */
136
- dispatchEvent(selector: string, type: string, eventInit?: object, options?: TimeoutOptions & StrictnessOptions): void;
137
-
138
- /**
139
- * Returns the value of the `pageFunction` invocation.
140
- *
141
- * A string can also be passed in instead of a function.
142
- *
143
- * @param pageFunction Function to be evaluated in the page context.
144
- * @param arg Optional argument to pass to `pageFunction`.
145
- */
146
- evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): R;
147
-
148
- /**
149
- * Returns the value of the `pageFunction` invocation as a [JSHandle].
150
- *
151
- * The only difference between page.evaluate(pageFunction[, arg]) and
152
- * page.evaluateHandle(pageFunction[, arg]) is that
153
- * page.evaluateHandle(pageFunction[, arg])returns [JSHandle].
154
- *
155
- * @param pageFunction Function to be evaluated in the page context.
156
- * @param arg Optional argument to pass to `pageFunction`.
157
- */
158
- evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): JSHandle<R>;
159
-
160
- /**
161
- * Get the page that owns frame.
162
- * @returns The page that owns frame.
163
- */
164
- page(): Page;
165
-
166
- /**
167
- * Get the parent frame.
168
- * @returns The parent frame, or `null` if there is no parent frame.
169
- */
170
- parentFrame(): Frame|null;
171
-
172
- /**
173
- * Get a list of all child frames.
174
- * @returns A list of all child frames.
175
- */
176
- childFrames(): Frame[];
177
-
178
- /**
179
- * Get the `ElementHandle` for this frame.
180
- * @returns The `ElementHandle` for this frame.
181
- */
182
- frameElement(): ElementHandle;
183
-
184
- /**
185
- * Navigate the frame to the specified URL and return a HTTP response object.
186
- * @param url The URL to navigate to.
187
- * @param options The options to use.
188
- * @returns A promise that resolves to the HTTP response object.
189
- */
190
- goto(url: string, options?: NavigationOptions): Promise<Response|null>;
191
-
192
- /**
193
- * Replace the entire HTML document content.
194
- * @param html The HTML to use.
195
- * @param options The options to use.
196
- */
197
- setContent(html: string, options?: ContentLoadOptions): void;
198
-
199
- /**
200
- * Get the name of the frame.
201
- * @returns The name of the frame.
202
- */
203
- name(): string;
204
-
205
- /**
206
- * Get the title of the frame.
207
- * @returns The title of the frame.
208
- */
209
- title(): string;
210
-
211
- /**
212
- * Get the URL of the frame.
213
- * @returns The URL of the frame.
214
- */
215
- url(): string;
216
-
217
- /**
218
- * Get the HTML content of the frame.
219
- * @returns The HTML content of the frame.
220
- */
221
- content(): string;
222
-
223
- /**
224
- * Get whether the frame is detached or not.
225
- * @returns `true` if the frame is detached, `false` otherwise.
226
- */
227
- isDetached(): boolean;
228
-
229
- /**
230
- * Сreates and returns a new locator for this frame.
231
- * @param selector The selector to use.
232
- * @returns The new locator.
233
- */
234
- locator(selector: string): Locator;
235
-
236
- /**
237
- * Get the `innerHTML` attribute of the first element found that matches the selector.
238
- * @param selector The selector to use.
239
- * @param options The options to use.
240
- * @returns The `innerHTML` attribute of the first element found.
241
- */
242
- innerHTML(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
243
-
244
- /**
245
- * Get the `innerText` attribute of the first element found that matches the selector.
246
- * @param selector The selector to use.
247
- * @param options The options to use.
248
- * @returns The `innerText` attribute of the first element found.
249
- */
250
- innerText(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
251
-
252
- /**
253
- * Get the text content of the first element found that matches the selector.
254
- * @param selector The selector to use.
255
- * @param options The options to use.
256
- * @returns The text content of the first element found.
257
- */
258
- textContent(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
259
-
260
- /**
261
- * Get the value of an attribute of the first element found that matches the selector.
262
- * @param selector The selector to use.
263
- * @param name The name of the attribute to get.
264
- * @param options The options to use.
265
- * @returns The value of the attribute.
266
- */
267
- getAttribute(selector: string, name: string, options?: TimeoutOptions & StrictnessOptions): string;
268
-
269
- /**
270
- * Get the input value of the first element found that matches the selector.
271
- * @param selector The selector to use.
272
- * @param options The options to use.
273
- * @returns The input value of the first element found.
274
- */
275
- inputValue(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
276
-
277
- /**
278
- * Get the `checked` attribute of the first checkbox element found that matches the selector.
279
- * @param selector The selector to use.
280
- * @param options The options to use.
281
- * @returns `true` if the checkbox is checked, `false` otherwise.
282
- */
283
- isChecked(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
284
-
285
- /**
286
- * Get whether the first element found that matches the selector is disabled or not.
287
- * @param selector The selector to use.
288
- * @param options The options to use.
289
- * @returns `true` if the element is disabled, `false` otherwise.
290
- */
291
- isDisabled(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
292
-
293
- /**
294
- * Get whether the first element found that matches the selector is enabled or not.
295
- * @param selector The selector to use.
296
- * @param options The options to use.
297
- * @returns `true` if the element is enabled, `false` otherwise.
298
- */
299
- isEnabled(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
300
-
301
- /**
302
- * Get whether the first element found that matches the selector is editable or not.
303
- * @param selector The selector to use.
304
- * @param options The options to use.
305
- * @returns `true` if the element is editable, `false` otherwise.
306
- */
307
- isEditable(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
308
-
309
- /**
310
- * Get whether the first element found that matches the selector is hidden or not.
311
- * @param selector The selector to use.
312
- * @param options The options to use.
313
- * @returns `true` if the element is hidden, `false` otherwise.
314
- */
315
- isHidden(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
316
-
317
- /**
318
- * Get whether the first element found that matches the selector is visible or not.
319
- * @param selector The selector to use.
320
- * @param options The options to use.
321
- * @returns `true` if the element is visible, `false` otherwise.
322
- */
323
- isVisible(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
324
-
325
- /**
326
- * Wait for the given function to return a truthy value.
327
- * @param predicate The function to call and wait for.
328
- * @param options The options to use.
329
- */
330
- waitForFunction<R, Arg>(pageFunction: PageFunction<Arg, R>, options?: PollingOptions & TimeoutOptions, arg?: Arg): Promise<JSHandle<R>>;
331
-
332
- /**
333
- * Wait for the given load state to be reached.
334
- * This will unblock if that lifecycle event has already been received.
335
- * @param state The load state to wait for, defaults to `load`.
336
- * @param options The options to use.
337
- */
338
- waitForLoadState(state?: LifecycleEvent, options?: TimeoutOptions): void;
339
-
340
- /**
341
- * Waits for the navigation event to happen.
342
- * @param options The options to use.
343
- * @returns A promise that resolves to the response of the navigation when it happens.
344
- */
345
- waitForNavigation(options?: ContentLoadOptions): Promise<Response|null>;
346
-
347
- /**
348
- * Wait for the given selector to match the waiting criteria.
349
- * @param selector The selector to use.
350
- * @param options The options to use.
351
- * @returns The first element found that matches the selector.
352
- */
353
- waitForSelector(selector: string, options?: ElementStateFilter & TimeoutOptions & StrictnessOptions): ElementHandle;
354
-
355
- /**
356
- * Wait for the given timeout to elapse.
357
- * @param timeout The timeout to wait for.
358
- */
359
- waitForTimeout(timeout: number): void;
29
+ /**
30
+ * Finds an element matching the specified selector within the `Frame`.
31
+ * @param selector A selector to query element for.
32
+ * @returns An `ElementHandle` pointing to the result element or `null`.
33
+ */
34
+ $(selector: string): ElementHandle | null;
35
+
36
+ /**
37
+ * Finds all elements matching the specified selector within the `Frame`.
38
+ * @param selector A selector to query element for.
39
+ * @returns A list of `ElementHandle`s pointing to the result elements.
40
+ */
41
+ $$(selector: string): ElementHandle[];
42
+
43
+ /**
44
+ * Checks the first checkbox element found that matches selector.
45
+ * @param selector The selector to use.
46
+ * @param options The options to use.
47
+ */
48
+ check(selector: string, options?: ElementClickOptions & StrictnessOptions): void;
49
+
50
+ /**
51
+ * Uncheck the first found element that matches the selector.
52
+ * @param selector The selector to use.
53
+ * @param options The options to use.
54
+ */
55
+ uncheck(selector: string, options?: ElementClickOptions & StrictnessOptions): void;
56
+
57
+ /**
58
+ * Clicks the element.
59
+ * @param selector The selector to use.
60
+ * @param options The options to use.
61
+ * @returns A promise that resolves when the element is clicked.
62
+ */
63
+ click(selector: string, options?: MouseMultiClickOptions & StrictnessOptions): Promise<void>;
64
+
65
+ /**
66
+ * Double clicks the element.
67
+ * @param selector The selector to use.
68
+ * @param options The options to use.
69
+ */
70
+ dblclick(selector: string, options?: MouseClickOptions & MouseMoveOptions & StrictnessOptions): void;
71
+
72
+ /**
73
+ * Fills out the first element found that matches the selector.
74
+ * @param selector The selector to use.
75
+ * @param value The value to fill.
76
+ * @param options The options to use.
77
+ */
78
+ fill(selector: string, value: string, options?: ElementHandleOptions & StrictnessOptions): void;
79
+
80
+ /**
81
+ * Focuses the first element found that matches the selector.
82
+ * @param selector The selector to use.
83
+ * @param options The options to use.
84
+ */
85
+ focus(selector: string, options?: TimeoutOptions & StrictnessOptions): void;
86
+
87
+ /**
88
+ * Hovers the first element found that matches the selector.
89
+ * @param selector The selector to use.
90
+ * @param options The options to use.
91
+ */
92
+ hover(selector: string, options?: ElementClickOptions & KeyboardModifierOptions & StrictnessOptions): void;
93
+
94
+ /**
95
+ * Taps the first element found that matches the selector.
96
+ * @param selector The selector to use.
97
+ * @param options The options to use.
98
+ */
99
+ tap(selector: string, options?: ElementClickOptions & KeyboardModifierOptions & StrictnessOptions): void;
100
+
101
+ /**
102
+ * Press the given key for the first element found that matches the selector.
103
+ * @param selector The selector to use.
104
+ * @param key The key to press.
105
+ * @param options The options to use.
106
+ */
107
+ press(selector: string, key: string, options?: KeyboardPressOptions & StrictnessOptions): void;
108
+
109
+ /**
110
+ * Type the given text for the first element found that matches the selector.
111
+ * @param selector The selector to use.
112
+ * @param text The text to type.
113
+ * @param options The options to use.
114
+ */
115
+ type(selector: string, text: string, options?: KeyboardPressOptions & StrictnessOptions): void;
116
+
117
+ /**
118
+ * Select the given options and return the array of option values of the first element
119
+ * found that matches the selector.
120
+ * @param selector The selector to use.
121
+ * @param values The values to select.
122
+ * @returns The array of option values of the first element found.
123
+ */
124
+ selectOption(
125
+ selector: string,
126
+ values: string | ElementHandle | SelectOptionsObject | string[] | ElementHandle[] | SelectOptionsObject[],
127
+ options?: ElementHandleOptions & StrictnessOptions,
128
+ ): string[];
129
+
130
+ /**
131
+ * Dispatches an event for the first element matching the selector.
132
+ * @param selector The selector to use.
133
+ * @param type The type of event to dispatch.
134
+ * @param eventInit The event initialization properties.
135
+ * @param options The options to use.
136
+ */
137
+ dispatchEvent(
138
+ selector: string,
139
+ type: string,
140
+ eventInit?: object,
141
+ options?: TimeoutOptions & StrictnessOptions,
142
+ ): void;
143
+
144
+ /**
145
+ * Returns the value of the `pageFunction` invocation.
146
+ *
147
+ * A string can also be passed in instead of a function.
148
+ *
149
+ * @param pageFunction Function to be evaluated in the page context.
150
+ * @param arg Optional argument to pass to `pageFunction`.
151
+ */
152
+ evaluate<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): R;
153
+
154
+ /**
155
+ * Returns the value of the `pageFunction` invocation as a [JSHandle].
156
+ *
157
+ * The only difference between page.evaluate(pageFunction[, arg]) and
158
+ * page.evaluateHandle(pageFunction[, arg]) is that
159
+ * page.evaluateHandle(pageFunction[, arg])returns [JSHandle].
160
+ *
161
+ * @param pageFunction Function to be evaluated in the page context.
162
+ * @param arg Optional argument to pass to `pageFunction`.
163
+ */
164
+ evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): JSHandle<R>;
165
+
166
+ /**
167
+ * Get the page that owns frame.
168
+ * @returns The page that owns frame.
169
+ */
170
+ page(): Page;
171
+
172
+ /**
173
+ * Get the parent frame.
174
+ * @returns The parent frame, or `null` if there is no parent frame.
175
+ */
176
+ parentFrame(): Frame | null;
177
+
178
+ /**
179
+ * Get a list of all child frames.
180
+ * @returns A list of all child frames.
181
+ */
182
+ childFrames(): Frame[];
183
+
184
+ /**
185
+ * Get the `ElementHandle` for this frame.
186
+ * @returns The `ElementHandle` for this frame.
187
+ */
188
+ frameElement(): ElementHandle;
189
+
190
+ /**
191
+ * Navigate the frame to the specified URL and return a HTTP response object.
192
+ * @param url The URL to navigate to.
193
+ * @param options The options to use.
194
+ * @returns A promise that resolves to the HTTP response object.
195
+ */
196
+ goto(url: string, options?: NavigationOptions): Promise<Response | null>;
197
+
198
+ /**
199
+ * Replace the entire HTML document content.
200
+ * @param html The HTML to use.
201
+ * @param options The options to use.
202
+ */
203
+ setContent(html: string, options?: ContentLoadOptions): void;
204
+
205
+ /**
206
+ * Get the name of the frame.
207
+ * @returns The name of the frame.
208
+ */
209
+ name(): string;
210
+
211
+ /**
212
+ * Get the title of the frame.
213
+ * @returns The title of the frame.
214
+ */
215
+ title(): string;
216
+
217
+ /**
218
+ * Get the URL of the frame.
219
+ * @returns The URL of the frame.
220
+ */
221
+ url(): string;
222
+
223
+ /**
224
+ * Get the HTML content of the frame.
225
+ * @returns The HTML content of the frame.
226
+ */
227
+ content(): string;
228
+
229
+ /**
230
+ * Get whether the frame is detached or not.
231
+ * @returns `true` if the frame is detached, `false` otherwise.
232
+ */
233
+ isDetached(): boolean;
234
+
235
+ /**
236
+ * Сreates and returns a new locator for this frame.
237
+ * @param selector The selector to use.
238
+ * @returns The new locator.
239
+ */
240
+ locator(selector: string): Locator;
241
+
242
+ /**
243
+ * Get the `innerHTML` attribute of the first element found that matches the selector.
244
+ * @param selector The selector to use.
245
+ * @param options The options to use.
246
+ * @returns The `innerHTML` attribute of the first element found.
247
+ */
248
+ innerHTML(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
249
+
250
+ /**
251
+ * Get the `innerText` attribute of the first element found that matches the selector.
252
+ * @param selector The selector to use.
253
+ * @param options The options to use.
254
+ * @returns The `innerText` attribute of the first element found.
255
+ */
256
+ innerText(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
257
+
258
+ /**
259
+ * Get the text content of the first element found that matches the selector.
260
+ * @param selector The selector to use.
261
+ * @param options The options to use.
262
+ * @returns The text content of the first element found.
263
+ */
264
+ textContent(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
265
+
266
+ /**
267
+ * Get the value of an attribute of the first element found that matches the selector.
268
+ * @param selector The selector to use.
269
+ * @param name The name of the attribute to get.
270
+ * @param options The options to use.
271
+ * @returns The value of the attribute.
272
+ */
273
+ getAttribute(selector: string, name: string, options?: TimeoutOptions & StrictnessOptions): string;
274
+
275
+ /**
276
+ * Get the input value of the first element found that matches the selector.
277
+ * @param selector The selector to use.
278
+ * @param options The options to use.
279
+ * @returns The input value of the first element found.
280
+ */
281
+ inputValue(selector: string, options?: TimeoutOptions & StrictnessOptions): string;
282
+
283
+ /**
284
+ * Get the `checked` attribute of the first checkbox element found that matches the selector.
285
+ * @param selector The selector to use.
286
+ * @param options The options to use.
287
+ * @returns `true` if the checkbox is checked, `false` otherwise.
288
+ */
289
+ isChecked(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
290
+
291
+ /**
292
+ * Get whether the first element found that matches the selector is disabled or not.
293
+ * @param selector The selector to use.
294
+ * @param options The options to use.
295
+ * @returns `true` if the element is disabled, `false` otherwise.
296
+ */
297
+ isDisabled(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
298
+
299
+ /**
300
+ * Get whether the first element found that matches the selector is enabled or not.
301
+ * @param selector The selector to use.
302
+ * @param options The options to use.
303
+ * @returns `true` if the element is enabled, `false` otherwise.
304
+ */
305
+ isEnabled(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
306
+
307
+ /**
308
+ * Get whether the first element found that matches the selector is editable or not.
309
+ * @param selector The selector to use.
310
+ * @param options The options to use.
311
+ * @returns `true` if the element is editable, `false` otherwise.
312
+ */
313
+ isEditable(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
314
+
315
+ /**
316
+ * Get whether the first element found that matches the selector is hidden or not.
317
+ * @param selector The selector to use.
318
+ * @param options The options to use.
319
+ * @returns `true` if the element is hidden, `false` otherwise.
320
+ */
321
+ isHidden(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
322
+
323
+ /**
324
+ * Get whether the first element found that matches the selector is visible or not.
325
+ * @param selector The selector to use.
326
+ * @param options The options to use.
327
+ * @returns `true` if the element is visible, `false` otherwise.
328
+ */
329
+ isVisible(selector: string, options?: TimeoutOptions & StrictnessOptions): boolean;
330
+
331
+ /**
332
+ * Wait for the given function to return a truthy value.
333
+ * @param predicate The function to call and wait for.
334
+ * @param options The options to use.
335
+ */
336
+ waitForFunction<R, Arg>(
337
+ pageFunction: PageFunction<Arg, R>,
338
+ options?: PollingOptions & TimeoutOptions,
339
+ arg?: Arg,
340
+ ): Promise<JSHandle<R>>;
341
+
342
+ /**
343
+ * Wait for the given load state to be reached.
344
+ * This will unblock if that lifecycle event has already been received.
345
+ * @param state The load state to wait for, defaults to `load`.
346
+ * @param options The options to use.
347
+ */
348
+ waitForLoadState(state?: LifecycleEvent, options?: TimeoutOptions): void;
349
+
350
+ /**
351
+ * Waits for the navigation event to happen.
352
+ * @param options The options to use.
353
+ * @returns A promise that resolves to the response of the navigation when it happens.
354
+ */
355
+ waitForNavigation(options?: ContentLoadOptions): Promise<Response | null>;
356
+
357
+ /**
358
+ * Wait for the given selector to match the waiting criteria.
359
+ * @param selector The selector to use.
360
+ * @param options The options to use.
361
+ * @returns The first element found that matches the selector.
362
+ */
363
+ waitForSelector(selector: string, options?: ElementStateFilter & TimeoutOptions & StrictnessOptions): ElementHandle;
364
+
365
+ /**
366
+ * Wait for the given timeout to elapse.
367
+ * @param timeout The timeout to wait for.
368
+ */
369
+ waitForTimeout(timeout: number): void;
360
370
  }