@types/k6 0.50.0 → 0.50.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. k6/README.md +1 -1
  2. k6/experimental/browser.d.ts +157 -1
  3. k6/package.json +2 -2
k6/README.md CHANGED
@@ -8,7 +8,7 @@ This package contains type definitions for k6 (https://grafana.com/docs/k6/lates
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Mon, 25 Mar 2024 14:35:33 GMT
11
+ * Last updated: Tue, 23 Apr 2024 12:10:41 GMT
12
12
  * Dependencies: none
13
13
 
14
14
  # Credits
@@ -643,6 +643,11 @@ export interface Browser {
643
643
  options?: NewBrowserContextOptions,
644
644
  ): Page;
645
645
 
646
+ /**
647
+ * Returns the browser application's user agent.
648
+ */
649
+ userAgent(): string;
650
+
646
651
  /**
647
652
  * Returns the browser application's version.
648
653
  */
@@ -1045,12 +1050,163 @@ export interface ElementHandle extends JSHandle {
1045
1050
  */
1046
1051
  boundingBox(): Rect;
1047
1052
 
1053
+ /**
1054
+ * Checks the checkbox element.
1055
+ * @param options The options to use.
1056
+ */
1057
+ check(options?: ElementClickOptions & StrictnessOptions): void;
1058
+
1059
+ /**
1060
+ * Clicks the element.
1061
+ * @param options The options to use.
1062
+ * @returns A promise that resolves when the element is clicked.
1063
+ */
1064
+ click(
1065
+ options?: {
1066
+ /**
1067
+ * The mouse button (`left`, `middle` or `right`) to use during the action.
1068
+ * Defaults to `left`.
1069
+ */
1070
+ button?: MouseButton;
1071
+
1072
+ /**
1073
+ * The number of times the action is performed. Defaults to `1`.
1074
+ */
1075
+ clickCount?: number;
1076
+
1077
+ /**
1078
+ * Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
1079
+ */
1080
+ delay?: number;
1081
+
1082
+ /**
1083
+ * Setting this to `true` will bypass the actionability checks (`visible`,
1084
+ * `stable`, `enabled`). Defaults to `false`.
1085
+ */
1086
+ force?: boolean;
1087
+
1088
+ /**
1089
+ * `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
1090
+ * action. If not specified, currently pressed modifiers are used,
1091
+ * otherwise defaults to `null`.
1092
+ */
1093
+ modifiers?: KeyboardModifier[];
1094
+
1095
+ /**
1096
+ * If set to `true` and a navigation occurs from performing this action, it
1097
+ * will not wait for it to complete. Defaults to `false`.
1098
+ */
1099
+ noWaitAfter?: boolean;
1100
+
1101
+ /**
1102
+ * A point to use relative to the top left corner of the element. If not
1103
+ * supplied, a visible point of the element is used.
1104
+ */
1105
+ position?: {
1106
+ x: number;
1107
+
1108
+ y: number;
1109
+ };
1110
+
1111
+ /**
1112
+ * Maximum time in milliseconds. Defaults to `30` seconds. Default is
1113
+ * overridden by the `setDefaultTimeout` option on `BrowserContext` or
1114
+ * `page` methods.
1115
+ *
1116
+ * Setting the value to `0` will disable the timeout.
1117
+ */
1118
+ timeout?: number;
1119
+
1120
+ /**
1121
+ * Setting this to `true` will perform the actionability checks without
1122
+ * performing the action. Useful to wait until the element is ready for the
1123
+ * action without performing it. Defaults to `false`.
1124
+ */
1125
+ trial?: boolean;
1126
+ },
1127
+ ): Promise<void>;
1128
+
1048
1129
  /**
1049
1130
  * Get the content frame for element handles.
1050
1131
  * @returns The content frame handle of the element handle.
1051
1132
  */
1052
1133
  contentFrame(): Frame;
1053
1134
 
1135
+ /**
1136
+ * Double clicks the element.
1137
+ * @param options The options to use.
1138
+ */
1139
+ dblclick(
1140
+ options?: {
1141
+ /**
1142
+ * The mouse button (`left`, `middle` or `right`) to use during the action.
1143
+ * Defaults to `left`.
1144
+ */
1145
+ button?: MouseButton;
1146
+
1147
+ /**
1148
+ * Milliseconds to wait between `mousedown` and `mouseup`. Defaults to `0`.
1149
+ */
1150
+ delay?: number;
1151
+
1152
+ /**
1153
+ * Setting this to `true` will bypass the actionability checks (`visible`,
1154
+ * `stable`, `enabled`). Defaults to `false`.
1155
+ */
1156
+ force?: boolean;
1157
+
1158
+ /**
1159
+ * `Alt`, `Control`, `Meta` or `Shift` modifiers keys pressed during the
1160
+ * action. If not specified, currently pressed modifiers are used,
1161
+ * otherwise defaults to `null`.
1162
+ */
1163
+ modifiers?: KeyboardModifier[];
1164
+
1165
+ /**
1166
+ * If set to `true` and a navigation occurs from performing this action, it
1167
+ * will not wait for it to complete. Defaults to `false`.
1168
+ */
1169
+ noWaitAfter?: boolean;
1170
+
1171
+ /**
1172
+ * A point to use relative to the top left corner of the element. If not
1173
+ * supplied, a visible point of the element is used.
1174
+ */
1175
+ position?: {
1176
+ x: number;
1177
+
1178
+ y: number;
1179
+ };
1180
+
1181
+ /**
1182
+ * Maximum time in milliseconds. Defaults to `30` seconds. Default is
1183
+ * overridden by the `setDefaultTimeout` option on `BrowserContext` or
1184
+ * `page` methods.
1185
+ *
1186
+ * Setting the value to `0` will disable the timeout.
1187
+ */
1188
+ timeout?: number;
1189
+
1190
+ /**
1191
+ * Setting this to `true` will perform the actionability checks without
1192
+ * performing the action. Useful to wait until the element is ready for the
1193
+ * action without performing it. Defaults to `false`.
1194
+ */
1195
+ trial?: boolean;
1196
+ },
1197
+ ): void;
1198
+
1199
+ /**
1200
+ * Dispatches a DOM event to the element.
1201
+ * @param type DOM event type: `"click"` etc.
1202
+ * @param eventInit Optional event-specific initialization properties.
1203
+ * @param options
1204
+ */
1205
+ dispatchEvent(
1206
+ type: string,
1207
+ eventInit?: EvaluationArgument,
1208
+ ): void;
1209
+
1054
1210
  /**
1055
1211
  * Fill the `input` or `textarea` element with the provided `value`.
1056
1212
  * @param value Value to fill for the `input` or `textarea` element.
@@ -1660,7 +1816,7 @@ export interface JSHandle<T = any> {
1660
1816
  evaluateHandle<R, Arg>(pageFunction: PageFunction<Arg, R>, arg?: Arg): JSHandle<R>;
1661
1817
 
1662
1818
  /**
1663
- * Fethes a map with own property names of of the `JSHandle` with their values as
1819
+ * Fetches a map with own property names of of the `JSHandle` with their values as
1664
1820
  * `JSHandle` instances.
1665
1821
  * @returns A map with property names as keys and `JSHandle` instances for the property values.
1666
1822
  */
k6/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/k6",
3
- "version": "0.50.0",
3
+ "version": "0.50.1",
4
4
  "description": "TypeScript definitions for k6",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/k6",
6
6
  "license": "MIT",
@@ -60,6 +60,6 @@
60
60
  },
61
61
  "scripts": {},
62
62
  "dependencies": {},
63
- "typesPublisherContentHash": "4ce3b8afa738b9a5dc17ab2f6215988fae6db390db3e895f7517086b6d109983",
63
+ "typesPublisherContentHash": "2a8f07e9cc2b17f1c90d400665135022e7c3b213f384fe82ffa9ae439704d942",
64
64
  "typeScriptVersion": "4.7"
65
65
  }