@midscene/android 1.0.1-beta-20251024064637.0 → 1.0.1-beta-20251027034431.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 +1 -12
- package/dist/lib/index.js +1 -12
- package/dist/types/index.d.ts +2 -24
- package/package.json +4 -4
package/dist/es/index.mjs
CHANGED
|
@@ -978,18 +978,7 @@ 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, {
|
|
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
|
-
});
|
|
981
|
+
const device = new AndroidDevice(deviceId, opts || {});
|
|
993
982
|
await device.connect();
|
|
994
983
|
return new AndroidAgent(device, opts);
|
|
995
984
|
}
|
package/dist/lib/index.js
CHANGED
|
@@ -1025,18 +1025,7 @@ 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, {
|
|
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
|
-
});
|
|
1028
|
+
const device = new AndroidDevice(deviceId, opts || {});
|
|
1040
1029
|
await device.connect();
|
|
1041
1030
|
return new AndroidAgent(device, opts);
|
|
1042
1031
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ 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';
|
|
5
7
|
import { Device } from 'appium-adb';
|
|
6
8
|
import { DeviceAction } from '@midscene/core';
|
|
7
9
|
import type { ElementInfo } from '@midscene/shared/extractor';
|
|
@@ -114,32 +116,8 @@ export declare class AndroidDevice implements AbstractInterface {
|
|
|
114
116
|
hideKeyboard(options?: AndroidDeviceInputOpt, timeoutMs?: number): Promise<boolean>;
|
|
115
117
|
}
|
|
116
118
|
|
|
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
|
-
|
|
135
119
|
export declare function getConnectedDevices(): Promise<Device[]>;
|
|
136
120
|
|
|
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
|
-
|
|
143
121
|
export { overrideAIConfig }
|
|
144
122
|
|
|
145
123
|
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-20251027034431.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-20251027034431.0",
|
|
31
|
+
"@midscene/shared": "1.0.1-beta-20251027034431.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-20251027034431.0"
|
|
41
41
|
},
|
|
42
42
|
"license": "MIT",
|
|
43
43
|
"scripts": {
|