@midscene/core 1.10.1 → 1.10.2-beta-20260706032158.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.
- package/dist/es/agent/agent.mjs.map +1 -1
- package/dist/es/agent/utils.mjs +1 -1
- package/dist/es/device/index.mjs +4 -2
- package/dist/es/device/index.mjs.map +1 -1
- package/dist/es/utils.mjs +2 -2
- package/dist/lib/agent/agent.js.map +1 -1
- package/dist/lib/agent/utils.js +1 -1
- package/dist/lib/device/index.js +4 -2
- package/dist/lib/device/index.js.map +1 -1
- package/dist/lib/utils.js +2 -2
- package/dist/types/agent/agent.d.ts +2 -0
- package/dist/types/device/device-options.d.ts +28 -0
- package/dist/types/device/index.d.ts +5 -0
- package/package.json +2 -2
|
@@ -102,6 +102,7 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
102
102
|
value: string | number;
|
|
103
103
|
} & {
|
|
104
104
|
autoDismissKeyboard?: boolean;
|
|
105
|
+
keyboardTypeDelay?: number;
|
|
105
106
|
} & {
|
|
106
107
|
mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
|
|
107
108
|
}): Promise<void>;
|
|
@@ -110,6 +111,7 @@ export declare class Agent<InterfaceType extends AbstractInterface = AbstractInt
|
|
|
110
111
|
*/
|
|
111
112
|
aiInput(value: string | number, locatePrompt: TUserPrompt, opt?: LocateOption & {
|
|
112
113
|
autoDismissKeyboard?: boolean;
|
|
114
|
+
keyboardTypeDelay?: number;
|
|
113
115
|
} & {
|
|
114
116
|
mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
|
|
115
117
|
}): Promise<void>;
|
|
@@ -7,6 +7,18 @@ export type AndroidDeviceInputOpt = {
|
|
|
7
7
|
autoDismissKeyboard?: boolean;
|
|
8
8
|
/** Strategy for dismissing the keyboard: 'esc-first' tries ESC before BACK, 'back-first' tries BACK before ESC */
|
|
9
9
|
keyboardDismissStrategy?: 'esc-first' | 'back-first';
|
|
10
|
+
/**
|
|
11
|
+
* Delay in milliseconds between keystrokes when typing text.
|
|
12
|
+
*
|
|
13
|
+
* When set, text is typed one character at a time with this delay between
|
|
14
|
+
* each character, instead of sending the whole string at once. This helps
|
|
15
|
+
* on devices or input fields that drop characters when input arrives too
|
|
16
|
+
* fast (e.g. WiFi password fields on automotive displays).
|
|
17
|
+
*
|
|
18
|
+
* Only applies to the `input text` path (non-yadb). When yadb is used, the
|
|
19
|
+
* entire string is committed atomically and this option is ignored.
|
|
20
|
+
*/
|
|
21
|
+
keyboardTypeDelay?: number;
|
|
10
22
|
};
|
|
11
23
|
/**
|
|
12
24
|
* Android device options
|
|
@@ -109,6 +121,14 @@ export type AndroidDeviceOpt = {
|
|
|
109
121
|
export type IOSDeviceInputOpt = {
|
|
110
122
|
/** Automatically dismiss the keyboard after input is completed */
|
|
111
123
|
autoDismissKeyboard?: boolean;
|
|
124
|
+
/**
|
|
125
|
+
* Delay in milliseconds between keystrokes when typing text.
|
|
126
|
+
*
|
|
127
|
+
* When set, text is typed one character at a time with this delay between
|
|
128
|
+
* each character, instead of sending the whole string at once. This helps
|
|
129
|
+
* on devices or input fields that drop characters when input arrives too fast.
|
|
130
|
+
*/
|
|
131
|
+
keyboardTypeDelay?: number;
|
|
112
132
|
};
|
|
113
133
|
/**
|
|
114
134
|
* iOS device options
|
|
@@ -146,6 +166,14 @@ export type HarmonyDeviceInputOpt = {
|
|
|
146
166
|
autoDismissKeyboard?: boolean;
|
|
147
167
|
/** Strategy for dismissing the keyboard. Defaults to 'esc-first'. */
|
|
148
168
|
keyboardDismissStrategy?: 'esc-first' | 'back-first';
|
|
169
|
+
/**
|
|
170
|
+
* Delay in milliseconds between keystrokes when typing text.
|
|
171
|
+
*
|
|
172
|
+
* When set, text is typed one character at a time with this delay between
|
|
173
|
+
* each character, instead of sending the whole string at once. This helps
|
|
174
|
+
* on devices or input fields that drop characters when input arrives too fast.
|
|
175
|
+
*/
|
|
176
|
+
keyboardTypeDelay?: number;
|
|
149
177
|
};
|
|
150
178
|
/**
|
|
151
179
|
* HarmonyOS device options
|
|
@@ -59,6 +59,7 @@ export interface KeyboardInputPrimitives {
|
|
|
59
59
|
typeText(value: string, opts?: {
|
|
60
60
|
autoDismissKeyboard?: boolean;
|
|
61
61
|
keyboardDismissStrategy?: 'esc-first' | 'back-first';
|
|
62
|
+
keyboardTypeDelay?: number;
|
|
62
63
|
target?: unknown;
|
|
63
64
|
replace?: boolean;
|
|
64
65
|
focusOnly?: boolean;
|
|
@@ -898,6 +899,7 @@ export declare const actionInputParamSchema: z.ZodObject<{
|
|
|
898
899
|
}, z.ZodTypeAny, "passthrough">>>;
|
|
899
900
|
mode: z.ZodDefault<z.ZodEnum<["replace", "clear", "typeOnly"]>>;
|
|
900
901
|
autoDismissKeyboard: z.ZodOptional<z.ZodBoolean>;
|
|
902
|
+
keyboardTypeDelay: z.ZodOptional<z.ZodNumber>;
|
|
901
903
|
}, "strip", z.ZodTypeAny, {
|
|
902
904
|
value: string;
|
|
903
905
|
mode: "replace" | "clear" | "typeOnly";
|
|
@@ -939,6 +941,7 @@ export declare const actionInputParamSchema: z.ZodObject<{
|
|
|
939
941
|
xpath: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodBoolean]>>;
|
|
940
942
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
941
943
|
autoDismissKeyboard?: boolean | undefined;
|
|
944
|
+
keyboardTypeDelay?: number | undefined;
|
|
942
945
|
}, {
|
|
943
946
|
value: string | number;
|
|
944
947
|
locate?: z.objectInputType<{
|
|
@@ -980,12 +983,14 @@ export declare const actionInputParamSchema: z.ZodObject<{
|
|
|
980
983
|
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
981
984
|
mode?: "replace" | "clear" | "typeOnly" | undefined;
|
|
982
985
|
autoDismissKeyboard?: boolean | undefined;
|
|
986
|
+
keyboardTypeDelay?: number | undefined;
|
|
983
987
|
}>;
|
|
984
988
|
export type ActionInputParam = {
|
|
985
989
|
value: string;
|
|
986
990
|
locate?: LocateResultElement;
|
|
987
991
|
mode?: 'replace' | 'clear' | 'typeOnly' | 'append';
|
|
988
992
|
autoDismissKeyboard?: boolean;
|
|
993
|
+
keyboardTypeDelay?: number;
|
|
989
994
|
};
|
|
990
995
|
export declare const defineActionInput: (keyboard: KeyboardInputPrimitives) => DeviceAction<ActionInputParam>;
|
|
991
996
|
export declare const actionKeyboardPressParamSchema: z.ZodObject<{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/core",
|
|
3
3
|
"description": "Automate browser actions, extract data, and perform assertions using AI. It offers JavaScript SDK, Chrome extension, and support for scripting in YAML. See https://midscenejs.com/ for details.",
|
|
4
|
-
"version": "1.10.
|
|
4
|
+
"version": "1.10.2-beta-20260706032158.0",
|
|
5
5
|
"repository": "https://github.com/web-infra-dev/midscene",
|
|
6
6
|
"homepage": "https://midscenejs.com/",
|
|
7
7
|
"main": "./dist/lib/index.js",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"semver": "7.5.2",
|
|
108
108
|
"undici": "^6.0.0",
|
|
109
109
|
"zod": "^3.25.1",
|
|
110
|
-
"@midscene/shared": "1.10.
|
|
110
|
+
"@midscene/shared": "1.10.2-beta-20260706032158.0"
|
|
111
111
|
},
|
|
112
112
|
"devDependencies": {
|
|
113
113
|
"@rslib/core": "^0.18.3",
|