@types/k6 0.44.2 → 0.44.3
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/crypto.d.ts +20 -74
- k6/data.d.ts +2 -2
- k6/encoding.d.ts +1 -1
- k6/experimental/browser/element_handle.d.ts +206 -202
- k6/experimental/browser/frame.d.ts +363 -353
- k6/experimental/browser/index.d.ts +280 -262
- k6/experimental/browser/js_handle.d.ts +40 -40
- k6/experimental/browser/keyboard.d.ts +34 -34
- k6/experimental/browser/locator.d.ts +169 -166
- k6/experimental/browser/mouse.d.ts +33 -33
- k6/experimental/browser/page.d.ts +1410 -1318
- k6/experimental/browser/request.d.ts +82 -82
- k6/experimental/browser/response.d.ts +108 -108
- k6/experimental/browser/touchscreen.d.ts +6 -6
- k6/experimental/browser/worker.d.ts +7 -7
- k6/experimental/tracing.d.ts +10 -10
- k6/experimental/webcrypto.d.ts +22 -25
- k6/experimental/websockets.d.ts +4 -4
- k6/http.d.ts +25 -25
- k6/options.d.ts +25 -17
- k6/package.json +2 -2
- k6/ws.d.ts +1 -1
|
@@ -1,209 +1,213 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import {
|
|
2
|
+
Rect,
|
|
3
|
+
ElementHandlePointerOptions,
|
|
4
|
+
ElementClickOptions,
|
|
5
|
+
KeyboardModifierOptions,
|
|
6
|
+
TimeoutOptions,
|
|
7
|
+
KeyboardPressOptions,
|
|
8
|
+
ScreenshotOptions,
|
|
9
|
+
ElementHandleOptions,
|
|
10
|
+
MouseMoveOptions,
|
|
11
|
+
StrictnessOptions,
|
|
12
|
+
InputElementState,
|
|
13
|
+
ElementState,
|
|
14
|
+
SelectOptionsObject,
|
|
15
|
+
} from './';
|
|
16
|
+
import { JSHandle } from './js_handle';
|
|
17
|
+
import { Frame } from './frame';
|
|
17
18
|
|
|
18
19
|
/**
|
|
19
20
|
* ElementHandle represents an in-page DOM element.
|
|
20
21
|
*/
|
|
21
22
|
export class ElementHandle extends JSHandle {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Finds an element matching the specified selector in the `ElementHandle`'s subtree.
|
|
25
|
+
* @param selector A selector to query element for.
|
|
26
|
+
* @returns An `ElementHandle` pointing to the result element or `null`.
|
|
27
|
+
*/
|
|
28
|
+
$(selector: string): ElementHandle | null;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Finds all elements matching the specified selector in the `ElementHandle`'s subtree.
|
|
32
|
+
* @param selector A selector to query element for.
|
|
33
|
+
* @returns A list of `ElementHandle`s pointing to the result elements.
|
|
34
|
+
*/
|
|
35
|
+
$$(selector: string): ElementHandle[];
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* This method returns the bounding box of the element.
|
|
39
|
+
* @returns Element's bounding box.
|
|
40
|
+
*/
|
|
41
|
+
boundingBox(): Rect;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get the content frame for element handles.
|
|
45
|
+
* @returns The content frame handle of the element handle.
|
|
46
|
+
*/
|
|
47
|
+
contentFrame(): Frame;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Fill the `input` or `textarea` element with the provided `value`.
|
|
51
|
+
* @param value Value to fill for the `input` or `textarea` element.
|
|
52
|
+
* @param options Element handle options.
|
|
53
|
+
*/
|
|
54
|
+
fill(value: string, options?: ElementHandleOptions): void;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Focuses the element.
|
|
58
|
+
*/
|
|
59
|
+
focus(): void;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Fetch the element's attribute value.
|
|
63
|
+
* @param name Attribute name to get the value for.
|
|
64
|
+
* @returns Attribute value.
|
|
65
|
+
*/
|
|
66
|
+
getAttribute(name: string): string | null;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Scrolls element into view and hovers over its center point.
|
|
70
|
+
* @param options Hover options.
|
|
71
|
+
*/
|
|
72
|
+
hover(options?: ElementClickOptions & KeyboardModifierOptions): void;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Returns the `element.innerHTML`.
|
|
76
|
+
* @returns Element's innerHTML.
|
|
77
|
+
*/
|
|
78
|
+
innerHTML(): string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Returns the `element.innerText`.
|
|
82
|
+
* @returns Element's innerText.
|
|
83
|
+
*/
|
|
84
|
+
innerText(): string;
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* Returns `input.value` for the selected `input`, `textarea` or `select` element.
|
|
88
|
+
* @returns The input value of the element.
|
|
89
|
+
*/
|
|
90
|
+
inputValue(options?: TimeoutOptions): string;
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Checks if a checkbox or radio is checked.
|
|
94
|
+
* @returns Whether the element is checked.
|
|
95
|
+
*/
|
|
96
|
+
isChecked(): boolean;
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Checks if the element is disabled.
|
|
100
|
+
* @returns Whether the element is disabled.
|
|
101
|
+
*/
|
|
102
|
+
isDisabled(): boolean;
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Checks if the element is editable.
|
|
106
|
+
* @returns Whether the element is editable.
|
|
107
|
+
*/
|
|
108
|
+
isEditable(): boolean;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Checks if the element is enabled.
|
|
112
|
+
* @returns Whether the element is enabled.
|
|
113
|
+
*/
|
|
114
|
+
isEnabled(): boolean;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Checks if the element is hidden.
|
|
118
|
+
* @returns Whether the element is hidden.
|
|
119
|
+
*/
|
|
120
|
+
isHidden(): boolean;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Checks if the element is visible.
|
|
124
|
+
* @returns Whether the element is visible.
|
|
125
|
+
*/
|
|
126
|
+
isVisible(): boolean;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Returns the frame containing the given element.
|
|
130
|
+
* @returns The frame that contains the element handle.
|
|
131
|
+
*/
|
|
132
|
+
ownerFrame(): Frame;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Focuses the element, and then uses `keyboard.down` and `keyboard.up` with the specified key.
|
|
136
|
+
* @param key A keyboard key name or a single character to press.
|
|
137
|
+
* @param options Keyboard press options.
|
|
138
|
+
*/
|
|
139
|
+
press(key: string, options?: KeyboardPressOptions): void;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* This method scrolls element into view, if needed, and then captures a
|
|
143
|
+
* screenshot of it.
|
|
144
|
+
* @param options Screenshot options.
|
|
145
|
+
* @returns An `ArrayBuffer` with the screenshot data.
|
|
146
|
+
*/
|
|
147
|
+
screenshot(options?: ScreenshotOptions & TimeoutOptions): ArrayBuffer;
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* This method checks whether the element is actionable using provided options, and
|
|
151
|
+
* then tries to scroll it into view, unless it is completely visible.
|
|
152
|
+
* @param options Element handle options.
|
|
153
|
+
*/
|
|
154
|
+
scrollIntoViewIfNeeded(options?: ElementHandleOptions): void;
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* Select one or more options of a `<select>` element which match the values.
|
|
158
|
+
* @param values Values of options to select.
|
|
159
|
+
* @param options Element handle options.
|
|
160
|
+
* @returns List of selected options.
|
|
161
|
+
*/
|
|
162
|
+
selectOption(
|
|
163
|
+
values: string | ElementHandle | SelectOptionsObject | string[] | ElementHandle[] | SelectOptionsObject[],
|
|
164
|
+
options?: ElementHandleOptions,
|
|
165
|
+
): string[];
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Focuses the element and selects all its text content.
|
|
169
|
+
* @param options Element handle options.
|
|
170
|
+
*/
|
|
171
|
+
selectText(options?: ElementHandleOptions): void;
|
|
172
|
+
|
|
173
|
+
/**
|
|
174
|
+
* Scrolls element into view if needed, and then uses `page.tapscreen` to tap in the center of the element
|
|
175
|
+
* or at the specified position.
|
|
176
|
+
* @param options Tap options.
|
|
177
|
+
*/
|
|
178
|
+
tap(options?: MouseMoveOptions): void;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Returns the `node.textContent`.
|
|
182
|
+
* @returns The text content of the element.
|
|
183
|
+
*/
|
|
184
|
+
textContent(): string;
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Scrolls element into view, focuses element and types text.
|
|
188
|
+
* @param text Text to type into the element.
|
|
189
|
+
* @param options Typing options.
|
|
190
|
+
*/
|
|
191
|
+
type(text: string, options?: KeyboardPressOptions): void;
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Scrolls element into view, and if it's an input element of type
|
|
195
|
+
* checkbox that is already checked, clicks on it to mark it as unchecked.
|
|
196
|
+
* @param options Click options.
|
|
197
|
+
*/
|
|
198
|
+
uncheck(options?: ElementClickOptions & StrictnessOptions): void;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Returns when the element satisfies the `state`.
|
|
202
|
+
* @param state Wait for element to satisfy this state.
|
|
203
|
+
* @param options Wait options.
|
|
204
|
+
*/
|
|
205
|
+
waitForElementState(state: InputElementState, options?: TimeoutOptions): void;
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Returns when the child element matching `selector` satisfies the `state`.
|
|
209
|
+
* @param selector A selector to query for.
|
|
210
|
+
* @param options Wait options.
|
|
211
|
+
*/
|
|
212
|
+
waitForSelector(selector: string, options?: { state?: ElementState } & StrictnessOptions & TimeoutOptions): void;
|
|
209
213
|
}
|