@midscene/android 1.0.1-beta-20251024063839.0 → 1.0.1-beta-20251024064637.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/index.mjs +12 -1
- package/dist/lib/index.js +12 -1
- package/dist/types/index.d.ts +24 -2
- package/package.json +4 -4
package/dist/es/index.mjs
CHANGED
|
@@ -978,7 +978,18 @@ async function agentFromAdbDevice(deviceId, opts) {
|
|
|
978
978
|
deviceId = devices[0].udid;
|
|
979
979
|
debugAgent('deviceId not specified, will use the first device (id = %s)', deviceId);
|
|
980
980
|
}
|
|
981
|
-
const device = new AndroidDevice(deviceId,
|
|
981
|
+
const device = new AndroidDevice(deviceId, {
|
|
982
|
+
autoDismissKeyboard: null == opts ? void 0 : opts.autoDismissKeyboard,
|
|
983
|
+
androidAdbPath: null == opts ? void 0 : opts.androidAdbPath,
|
|
984
|
+
remoteAdbHost: null == opts ? void 0 : opts.remoteAdbHost,
|
|
985
|
+
remoteAdbPort: null == opts ? void 0 : opts.remoteAdbPort,
|
|
986
|
+
imeStrategy: null == opts ? void 0 : opts.imeStrategy,
|
|
987
|
+
displayId: null == opts ? void 0 : opts.displayId,
|
|
988
|
+
usePhysicalDisplayIdForScreenshot: null == opts ? void 0 : opts.usePhysicalDisplayIdForScreenshot,
|
|
989
|
+
usePhysicalDisplayIdForDisplayLookup: null == opts ? void 0 : opts.usePhysicalDisplayIdForDisplayLookup,
|
|
990
|
+
screenshotResizeScale: null == opts ? void 0 : opts.screenshotResizeScale,
|
|
991
|
+
alwaysRefreshScreenInfo: null == opts ? void 0 : opts.alwaysRefreshScreenInfo
|
|
992
|
+
});
|
|
982
993
|
await device.connect();
|
|
983
994
|
return new AndroidAgent(device, opts);
|
|
984
995
|
}
|
package/dist/lib/index.js
CHANGED
|
@@ -1025,7 +1025,18 @@ async function agentFromAdbDevice(deviceId, opts) {
|
|
|
1025
1025
|
deviceId = devices[0].udid;
|
|
1026
1026
|
debugAgent('deviceId not specified, will use the first device (id = %s)', deviceId);
|
|
1027
1027
|
}
|
|
1028
|
-
const device = new AndroidDevice(deviceId,
|
|
1028
|
+
const device = new AndroidDevice(deviceId, {
|
|
1029
|
+
autoDismissKeyboard: null == opts ? void 0 : opts.autoDismissKeyboard,
|
|
1030
|
+
androidAdbPath: null == opts ? void 0 : opts.androidAdbPath,
|
|
1031
|
+
remoteAdbHost: null == opts ? void 0 : opts.remoteAdbHost,
|
|
1032
|
+
remoteAdbPort: null == opts ? void 0 : opts.remoteAdbPort,
|
|
1033
|
+
imeStrategy: null == opts ? void 0 : opts.imeStrategy,
|
|
1034
|
+
displayId: null == opts ? void 0 : opts.displayId,
|
|
1035
|
+
usePhysicalDisplayIdForScreenshot: null == opts ? void 0 : opts.usePhysicalDisplayIdForScreenshot,
|
|
1036
|
+
usePhysicalDisplayIdForDisplayLookup: null == opts ? void 0 : opts.usePhysicalDisplayIdForDisplayLookup,
|
|
1037
|
+
screenshotResizeScale: null == opts ? void 0 : opts.screenshotResizeScale,
|
|
1038
|
+
alwaysRefreshScreenInfo: null == opts ? void 0 : opts.alwaysRefreshScreenInfo
|
|
1039
|
+
});
|
|
1029
1040
|
await device.connect();
|
|
1030
1041
|
return new AndroidAgent(device, opts);
|
|
1031
1042
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ import { AbstractInterface } from '@midscene/core/device';
|
|
|
2
2
|
import { ADB } from 'appium-adb';
|
|
3
3
|
import { Agent } from '@midscene/core/agent';
|
|
4
4
|
import { AgentOpt } from '@midscene/core/agent';
|
|
5
|
-
import { AndroidDeviceInputOpt } from '@midscene/core/device';
|
|
6
|
-
import { AndroidDeviceOpt } from '@midscene/core/device';
|
|
7
5
|
import { Device } from 'appium-adb';
|
|
8
6
|
import { DeviceAction } from '@midscene/core';
|
|
9
7
|
import type { ElementInfo } from '@midscene/shared/extractor';
|
|
@@ -116,8 +114,32 @@ export declare class AndroidDevice implements AbstractInterface {
|
|
|
116
114
|
hideKeyboard(options?: AndroidDeviceInputOpt, timeoutMs?: number): Promise<boolean>;
|
|
117
115
|
}
|
|
118
116
|
|
|
117
|
+
declare type AndroidDeviceInputOpt = {
|
|
118
|
+
autoDismissKeyboard?: boolean;
|
|
119
|
+
keyboardDismissStrategy?: 'esc-first' | 'back-first';
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
declare type AndroidDeviceOpt = {
|
|
123
|
+
androidAdbPath?: string;
|
|
124
|
+
remoteAdbHost?: string;
|
|
125
|
+
remoteAdbPort?: number;
|
|
126
|
+
imeStrategy?: ImeStrategy;
|
|
127
|
+
displayId?: number;
|
|
128
|
+
usePhysicalDisplayIdForScreenshot?: boolean;
|
|
129
|
+
usePhysicalDisplayIdForDisplayLookup?: boolean;
|
|
130
|
+
customActions?: DeviceAction<any>[];
|
|
131
|
+
screenshotResizeScale?: number;
|
|
132
|
+
alwaysRefreshScreenInfo?: boolean;
|
|
133
|
+
} & AndroidDeviceInputOpt;
|
|
134
|
+
|
|
119
135
|
export declare function getConnectedDevices(): Promise<Device[]>;
|
|
120
136
|
|
|
137
|
+
declare const IME_STRATEGY_ALWAYS_YADB: "always-yadb";
|
|
138
|
+
|
|
139
|
+
declare const IME_STRATEGY_YADB_FOR_NON_ASCII: "yadb-for-non-ascii";
|
|
140
|
+
|
|
141
|
+
declare type ImeStrategy = typeof IME_STRATEGY_ALWAYS_YADB | typeof IME_STRATEGY_YADB_FOR_NON_ASCII;
|
|
142
|
+
|
|
121
143
|
export { overrideAIConfig }
|
|
122
144
|
|
|
123
145
|
export { }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@midscene/android",
|
|
3
|
-
"version": "1.0.1-beta-
|
|
3
|
+
"version": "1.0.1-beta-20251024064637.0",
|
|
4
4
|
"description": "Android automation library for Midscene",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Android UI automation",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"appium-adb": "12.12.1",
|
|
30
|
-
"@midscene/core": "1.0.1-beta-
|
|
31
|
-
"@midscene/shared": "1.0.1-beta-
|
|
30
|
+
"@midscene/core": "1.0.1-beta-20251024064637.0",
|
|
31
|
+
"@midscene/shared": "1.0.1-beta-20251024064637.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@rslib/core": "^0.11.2",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"typescript": "^5.8.3",
|
|
38
38
|
"tsx": "^4.19.2",
|
|
39
39
|
"vitest": "3.0.5",
|
|
40
|
-
"@midscene/playground": "1.0.1-beta-
|
|
40
|
+
"@midscene/playground": "1.0.1-beta-20251024064637.0"
|
|
41
41
|
},
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"scripts": {
|