appium-android-driver 13.3.4 → 14.0.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/CHANGELOG.md +16 -0
- package/build/lib/commands/app-management.d.ts +2 -2
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +41 -67
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/appearance.d.ts +1 -1
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +2 -6
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/bidi/constants.js +4 -8
- package/build/lib/commands/bidi/constants.js.map +1 -1
- package/build/lib/commands/bidi/models.d.ts +1 -1
- package/build/lib/commands/bidi/models.d.ts.map +1 -1
- package/build/lib/commands/bidi/models.js +7 -13
- package/build/lib/commands/bidi/models.js.map +1 -1
- package/build/lib/commands/bidi/types.js +1 -2
- package/build/lib/commands/bluetooth.d.ts +1 -1
- package/build/lib/commands/bluetooth.d.ts.map +1 -1
- package/build/lib/commands/bluetooth.js +3 -6
- package/build/lib/commands/bluetooth.js.map +1 -1
- package/build/lib/commands/context/cache.d.ts +1 -1
- package/build/lib/commands/context/cache.d.ts.map +1 -1
- package/build/lib/commands/context/cache.js +5 -10
- package/build/lib/commands/context/cache.js.map +1 -1
- package/build/lib/commands/context/exports.d.ts +2 -2
- package/build/lib/commands/context/exports.d.ts.map +1 -1
- package/build/lib/commands/context/exports.js +64 -86
- package/build/lib/commands/context/exports.js.map +1 -1
- package/build/lib/commands/context/helpers.d.ts +2 -2
- package/build/lib/commands/context/helpers.d.ts.map +1 -1
- package/build/lib/commands/context/helpers.js +69 -82
- package/build/lib/commands/context/helpers.js.map +1 -1
- package/build/lib/commands/device/common.d.ts +2 -2
- package/build/lib/commands/device/common.d.ts.map +1 -1
- package/build/lib/commands/device/common.js +47 -77
- package/build/lib/commands/device/common.js.map +1 -1
- package/build/lib/commands/device/emulator-actions.d.ts +2 -2
- package/build/lib/commands/device/emulator-actions.d.ts.map +1 -1
- package/build/lib/commands/device/emulator-actions.js +33 -52
- package/build/lib/commands/device/emulator-actions.js.map +1 -1
- package/build/lib/commands/device/emulator-console.d.ts +1 -1
- package/build/lib/commands/device/emulator-console.d.ts.map +1 -1
- package/build/lib/commands/device/emulator-console.js +3 -6
- package/build/lib/commands/device/emulator-console.js.map +1 -1
- package/build/lib/commands/device/utils.d.ts +1 -1
- package/build/lib/commands/device/utils.d.ts.map +1 -1
- package/build/lib/commands/device/utils.js +27 -37
- package/build/lib/commands/device/utils.js.map +1 -1
- package/build/lib/commands/deviceidle.d.ts +1 -1
- package/build/lib/commands/deviceidle.d.ts.map +1 -1
- package/build/lib/commands/deviceidle.js +4 -7
- package/build/lib/commands/deviceidle.js.map +1 -1
- package/build/lib/commands/element.d.ts +2 -2
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +22 -39
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/execute.d.ts +1 -1
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +6 -9
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +1 -1
- package/build/lib/commands/file-actions.d.ts.map +1 -1
- package/build/lib/commands/file-actions.js +25 -34
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +2 -2
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +10 -14
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +1 -1
- package/build/lib/commands/geolocation.d.ts.map +1 -1
- package/build/lib/commands/geolocation.js +21 -35
- package/build/lib/commands/geolocation.js.map +1 -1
- package/build/lib/commands/gestures.d.ts +1 -1
- package/build/lib/commands/gestures.d.ts.map +1 -1
- package/build/lib/commands/gestures.js +4 -7
- package/build/lib/commands/gestures.js.map +1 -1
- package/build/lib/commands/image-injection.d.ts +1 -1
- package/build/lib/commands/image-injection.d.ts.map +1 -1
- package/build/lib/commands/image-injection.js +16 -23
- package/build/lib/commands/image-injection.js.map +1 -1
- package/build/lib/commands/ime.d.ts +1 -1
- package/build/lib/commands/ime.d.ts.map +1 -1
- package/build/lib/commands/ime.js +10 -18
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/intent.d.ts +1 -1
- package/build/lib/commands/intent.d.ts.map +1 -1
- package/build/lib/commands/intent.js +22 -29
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +2 -2
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +21 -33
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/legacy.d.ts +1 -1
- package/build/lib/commands/legacy.d.ts.map +1 -1
- package/build/lib/commands/legacy.js +7 -12
- package/build/lib/commands/legacy.js.map +1 -1
- package/build/lib/commands/lock/exports.d.ts +2 -2
- package/build/lib/commands/lock/exports.d.ts.map +1 -1
- package/build/lib/commands/lock/exports.js +18 -25
- package/build/lib/commands/lock/exports.js.map +1 -1
- package/build/lib/commands/lock/helpers.d.ts +2 -2
- package/build/lib/commands/lock/helpers.d.ts.map +1 -1
- package/build/lib/commands/lock/helpers.js +48 -64
- package/build/lib/commands/lock/helpers.js.map +1 -1
- package/build/lib/commands/log.d.ts +2 -2
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +38 -42
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +2 -2
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +14 -22
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/memory.d.ts +2 -2
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +4 -7
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/misc.d.ts +2 -2
- package/build/lib/commands/misc.d.ts.map +1 -1
- package/build/lib/commands/misc.js +10 -19
- package/build/lib/commands/misc.js.map +1 -1
- package/build/lib/commands/network.d.ts +2 -2
- package/build/lib/commands/network.d.ts.map +1 -1
- package/build/lib/commands/network.js +14 -26
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/nfc.d.ts +2 -2
- package/build/lib/commands/nfc.d.ts.map +1 -1
- package/build/lib/commands/nfc.js +3 -6
- package/build/lib/commands/nfc.js.map +1 -1
- package/build/lib/commands/performance.d.ts +2 -2
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +48 -58
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +1 -1
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +16 -20
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +2 -2
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +32 -39
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/resources.d.ts +1 -1
- package/build/lib/commands/resources.d.ts.map +1 -1
- package/build/lib/commands/resources.js +7 -11
- package/build/lib/commands/resources.js.map +1 -1
- package/build/lib/commands/shell.d.ts +1 -1
- package/build/lib/commands/shell.d.ts.map +1 -1
- package/build/lib/commands/shell.js +9 -12
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +1 -1
- package/build/lib/commands/streamscreen.d.ts.map +1 -1
- package/build/lib/commands/streamscreen.js +32 -37
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +2 -2
- package/build/lib/commands/system-bars.d.ts.map +1 -1
- package/build/lib/commands/system-bars.js +10 -16
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/time.d.ts +1 -1
- package/build/lib/commands/time.d.ts.map +1 -1
- package/build/lib/commands/time.js +9 -17
- package/build/lib/commands/time.js.map +1 -1
- package/build/lib/commands/types.d.ts +15 -1
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/commands/types.js +1 -2
- package/build/lib/constraints.d.ts +3 -0
- package/build/lib/constraints.d.ts.map +1 -1
- package/build/lib/constraints.js +5 -5
- package/build/lib/constraints.js.map +1 -1
- package/build/lib/doctor/checks.js +54 -65
- package/build/lib/doctor/checks.js.map +1 -1
- package/build/lib/doctor/utils.js +4 -7
- package/build/lib/doctor/utils.js.map +1 -1
- package/build/lib/driver.d.ts +39 -39
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +220 -223
- package/build/lib/driver.js.map +1 -1
- package/build/lib/execute-method-map.js +1 -4
- package/build/lib/execute-method-map.js.map +1 -1
- package/build/lib/index.d.ts +7 -7
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +11 -51
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.js +2 -5
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.js +1 -4
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/utils.d.ts +9 -7
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +22 -28
- package/build/lib/utils.js.map +1 -1
- package/lib/commands/app-management.ts +5 -11
- package/lib/commands/appearance.ts +1 -1
- package/lib/commands/bidi/models.ts +3 -3
- package/lib/commands/bluetooth.ts +2 -2
- package/lib/commands/context/cache.ts +1 -1
- package/lib/commands/context/exports.ts +7 -7
- package/lib/commands/context/helpers.ts +4 -4
- package/lib/commands/device/common.ts +36 -20
- package/lib/commands/device/emulator-actions.ts +4 -4
- package/lib/commands/device/emulator-console.ts +2 -2
- package/lib/commands/device/utils.ts +3 -3
- package/lib/commands/deviceidle.ts +2 -2
- package/lib/commands/element.ts +3 -3
- package/lib/commands/execute.ts +2 -2
- package/lib/commands/file-actions.ts +2 -2
- package/lib/commands/find.ts +4 -4
- package/lib/commands/geolocation.ts +2 -2
- package/lib/commands/gestures.ts +3 -3
- package/lib/commands/image-injection.ts +2 -2
- package/lib/commands/ime.ts +3 -3
- package/lib/commands/intent.ts +3 -3
- package/lib/commands/keyboard.ts +3 -3
- package/lib/commands/legacy.ts +2 -2
- package/lib/commands/lock/exports.ts +3 -3
- package/lib/commands/lock/helpers.ts +2 -2
- package/lib/commands/log.ts +18 -11
- package/lib/commands/media-projection.ts +2 -2
- package/lib/commands/memory.ts +3 -3
- package/lib/commands/misc.ts +3 -3
- package/lib/commands/network.ts +3 -3
- package/lib/commands/nfc.ts +3 -3
- package/lib/commands/performance.ts +4 -4
- package/lib/commands/permissions.ts +3 -3
- package/lib/commands/recordscreen.ts +5 -5
- package/lib/commands/resources.ts +2 -2
- package/lib/commands/shell.ts +3 -3
- package/lib/commands/streamscreen.ts +6 -4
- package/lib/commands/system-bars.ts +6 -6
- package/lib/commands/time.ts +3 -3
- package/lib/commands/types.ts +15 -1
- package/lib/constraints.ts +3 -0
- package/lib/doctor/checks.ts +1 -1
- package/lib/driver.ts +44 -44
- package/lib/index.ts +7 -7
- package/lib/method-map.ts +1 -1
- package/lib/utils.ts +10 -8
- package/package.json +12 -3
package/lib/driver.ts
CHANGED
|
@@ -8,14 +8,14 @@ import type {
|
|
|
8
8
|
W3CDriverCaps,
|
|
9
9
|
} from '@appium/types';
|
|
10
10
|
import type {ADB, LogcatListener} from 'appium-adb';
|
|
11
|
-
import type {
|
|
12
|
-
import {BaseDriver} from 'appium/driver';
|
|
13
|
-
import {ANDROID_DRIVER_CONSTRAINTS} from './constraints';
|
|
14
|
-
import type {AndroidDriverConstraints} from './constraints';
|
|
15
|
-
import {newMethodMap} from './method-map';
|
|
11
|
+
import type {Chromedriver as AppiumChromedriver} from 'appium-chromedriver';
|
|
12
|
+
import {BaseDriver} from 'appium/driver.js';
|
|
13
|
+
import {ANDROID_DRIVER_CONSTRAINTS} from './constraints.js';
|
|
14
|
+
import type {AndroidDriverConstraints} from './constraints.js';
|
|
15
|
+
import {newMethodMap} from './method-map.js';
|
|
16
16
|
import {SettingsApp} from 'io.appium.settings';
|
|
17
|
-
import {parseArray, removeAllSessionWebSocketHandlers} from './utils';
|
|
18
|
-
import {CHROME_BROWSER_PACKAGE_ACTIVITY} from './commands/context/helpers';
|
|
17
|
+
import {parseArray, removeAllSessionWebSocketHandlers} from './utils.js';
|
|
18
|
+
import {CHROME_BROWSER_PACKAGE_ACTIVITY} from './commands/context/helpers.js';
|
|
19
19
|
import {
|
|
20
20
|
getContexts,
|
|
21
21
|
setContext,
|
|
@@ -37,13 +37,13 @@ import {
|
|
|
37
37
|
getWindowHandles,
|
|
38
38
|
setWindow,
|
|
39
39
|
notifyBiDiContextChange,
|
|
40
|
-
} from './commands/context/exports';
|
|
40
|
+
} from './commands/context/exports.js';
|
|
41
41
|
import {
|
|
42
42
|
getDeviceInfoFromCaps,
|
|
43
43
|
createADB,
|
|
44
44
|
getLaunchInfo,
|
|
45
45
|
initDevice,
|
|
46
|
-
} from './commands/device/common';
|
|
46
|
+
} from './commands/device/common.js';
|
|
47
47
|
import {
|
|
48
48
|
fingerprint,
|
|
49
49
|
mobileFingerprint,
|
|
@@ -62,8 +62,8 @@ import {
|
|
|
62
62
|
networkSpeed,
|
|
63
63
|
mobileNetworkSpeed,
|
|
64
64
|
sensorSet,
|
|
65
|
-
} from './commands/device/emulator-actions';
|
|
66
|
-
import {mobileExecEmuConsoleCommand} from './commands/device/emulator-console';
|
|
65
|
+
} from './commands/device/emulator-actions.js';
|
|
66
|
+
import {mobileExecEmuConsoleCommand} from './commands/device/emulator-console.js';
|
|
67
67
|
import {
|
|
68
68
|
getThirdPartyPackages,
|
|
69
69
|
uninstallOtherPackages,
|
|
@@ -86,10 +86,10 @@ import {
|
|
|
86
86
|
activateApp,
|
|
87
87
|
queryAppState,
|
|
88
88
|
isAppInstalled,
|
|
89
|
-
} from './commands/app-management';
|
|
90
|
-
import {mobileGetUiMode, mobileSetUiMode} from './commands/appearance';
|
|
91
|
-
import {mobileDeviceidle} from './commands/deviceidle';
|
|
92
|
-
import {mobileBluetooth} from './commands/bluetooth';
|
|
89
|
+
} from './commands/app-management.js';
|
|
90
|
+
import {mobileGetUiMode, mobileSetUiMode} from './commands/appearance.js';
|
|
91
|
+
import {mobileDeviceidle} from './commands/deviceidle.js';
|
|
92
|
+
import {mobileBluetooth} from './commands/bluetooth.js';
|
|
93
93
|
import {
|
|
94
94
|
getAttribute,
|
|
95
95
|
getName,
|
|
@@ -106,10 +106,10 @@ import {
|
|
|
106
106
|
getText,
|
|
107
107
|
getLocation,
|
|
108
108
|
getSize,
|
|
109
|
-
} from './commands/element';
|
|
110
|
-
import {execute} from './commands/execute';
|
|
111
|
-
import {pullFile, pullFolder, pushFile, mobileDeleteFile} from './commands/file-actions';
|
|
112
|
-
import {findElOrEls, doFindElementOrEls} from './commands/find';
|
|
109
|
+
} from './commands/element.js';
|
|
110
|
+
import {execute} from './commands/execute.js';
|
|
111
|
+
import {pullFile, pullFolder, pushFile, mobileDeleteFile} from './commands/file-actions.js';
|
|
112
|
+
import {findElOrEls, doFindElementOrEls} from './commands/find.js';
|
|
113
113
|
import {
|
|
114
114
|
setGeoLocation,
|
|
115
115
|
getGeoLocation,
|
|
@@ -119,8 +119,8 @@ import {
|
|
|
119
119
|
mobileGetGeolocation,
|
|
120
120
|
mobileSetGeolocation,
|
|
121
121
|
mobileResetGeolocation,
|
|
122
|
-
} from './commands/geolocation';
|
|
123
|
-
import {performActions} from './commands/gestures';
|
|
122
|
+
} from './commands/geolocation.js';
|
|
123
|
+
import {performActions} from './commands/gestures.js';
|
|
124
124
|
import {
|
|
125
125
|
isIMEActivated,
|
|
126
126
|
availableIMEEngines,
|
|
@@ -128,14 +128,14 @@ import {
|
|
|
128
128
|
activateIMEEngine,
|
|
129
129
|
deactivateIMEEngine,
|
|
130
130
|
setStylusHandwriting,
|
|
131
|
-
} from './commands/ime';
|
|
131
|
+
} from './commands/ime.js';
|
|
132
132
|
import {
|
|
133
133
|
startActivity,
|
|
134
134
|
mobileStartActivity,
|
|
135
135
|
mobileBroadcast,
|
|
136
136
|
mobileStartService,
|
|
137
137
|
mobileStopService,
|
|
138
|
-
} from './commands/intent';
|
|
138
|
+
} from './commands/intent.js';
|
|
139
139
|
import {
|
|
140
140
|
hideKeyboard,
|
|
141
141
|
isKeyboardShown,
|
|
@@ -144,8 +144,8 @@ import {
|
|
|
144
144
|
pressKeyCode,
|
|
145
145
|
longPressKeyCode,
|
|
146
146
|
mobilePerformEditorAction,
|
|
147
|
-
} from './commands/keyboard';
|
|
148
|
-
import {lock, unlock, mobileUnlock, isLocked} from './commands/lock/exports';
|
|
147
|
+
} from './commands/keyboard.js';
|
|
148
|
+
import {lock, unlock, mobileUnlock, isLocked} from './commands/lock/exports.js';
|
|
149
149
|
import {
|
|
150
150
|
supportedLogTypes,
|
|
151
151
|
mobileStartLogsBroadcast,
|
|
@@ -153,15 +153,15 @@ import {
|
|
|
153
153
|
getLogTypes,
|
|
154
154
|
getLog,
|
|
155
155
|
assignBiDiLogListener,
|
|
156
|
-
} from './commands/log';
|
|
156
|
+
} from './commands/log.js';
|
|
157
157
|
import {
|
|
158
158
|
mobileIsMediaProjectionRecordingRunning,
|
|
159
159
|
mobileStartMediaProjectionRecording,
|
|
160
160
|
mobileStopMediaProjectionRecording,
|
|
161
|
-
} from './commands/media-projection';
|
|
162
|
-
import {mobileSendTrimMemory} from './commands/memory';
|
|
163
|
-
import {mobileNfc} from './commands/nfc';
|
|
164
|
-
import {mobileInjectEmulatorCameraImage} from './commands/image-injection';
|
|
161
|
+
} from './commands/media-projection.js';
|
|
162
|
+
import {mobileSendTrimMemory} from './commands/memory.js';
|
|
163
|
+
import {mobileNfc} from './commands/nfc.js';
|
|
164
|
+
import {mobileInjectEmulatorCameraImage} from './commands/image-injection.js';
|
|
165
165
|
import {
|
|
166
166
|
getWindowRect,
|
|
167
167
|
getWindowSize,
|
|
@@ -170,7 +170,7 @@ import {
|
|
|
170
170
|
mobileListSms,
|
|
171
171
|
openNotifications,
|
|
172
172
|
setUrl,
|
|
173
|
-
} from './commands/misc';
|
|
173
|
+
} from './commands/misc.js';
|
|
174
174
|
import {
|
|
175
175
|
getNetworkConnection,
|
|
176
176
|
isWifiOn,
|
|
@@ -182,23 +182,23 @@ import {
|
|
|
182
182
|
toggleData,
|
|
183
183
|
toggleFlightMode,
|
|
184
184
|
toggleWiFi,
|
|
185
|
-
} from './commands/network';
|
|
185
|
+
} from './commands/network.js';
|
|
186
186
|
import {
|
|
187
187
|
getPerformanceData,
|
|
188
188
|
getPerformanceDataTypes,
|
|
189
189
|
mobileGetPerformanceData,
|
|
190
|
-
} from './commands/performance';
|
|
191
|
-
import {reset, closeApp, launchApp} from './commands/legacy';
|
|
192
|
-
import {mobileChangePermissions, mobileGetPermissions} from './commands/permissions';
|
|
193
|
-
import {startRecordingScreen, stopRecordingScreen} from './commands/recordscreen';
|
|
194
|
-
import {getStrings, ensureDeviceLocale} from './commands/resources';
|
|
195
|
-
import {mobileShell} from './commands/shell';
|
|
196
|
-
import {mobileStartScreenStreaming, mobileStopScreenStreaming} from './commands/streamscreen';
|
|
197
|
-
import {getSystemBars, mobilePerformStatusBarCommand} from './commands/system-bars';
|
|
198
|
-
import {getDeviceTime, mobileGetDeviceTime} from './commands/time';
|
|
199
|
-
import {executeMethodMap} from './execute-method-map';
|
|
190
|
+
} from './commands/performance.js';
|
|
191
|
+
import {reset, closeApp, launchApp} from './commands/legacy.js';
|
|
192
|
+
import {mobileChangePermissions, mobileGetPermissions} from './commands/permissions.js';
|
|
193
|
+
import {startRecordingScreen, stopRecordingScreen} from './commands/recordscreen.js';
|
|
194
|
+
import {getStrings, ensureDeviceLocale} from './commands/resources.js';
|
|
195
|
+
import {mobileShell} from './commands/shell.js';
|
|
196
|
+
import {mobileStartScreenStreaming, mobileStopScreenStreaming} from './commands/streamscreen.js';
|
|
197
|
+
import {getSystemBars, mobilePerformStatusBarCommand} from './commands/system-bars.js';
|
|
198
|
+
import {getDeviceTime, mobileGetDeviceTime} from './commands/time.js';
|
|
199
|
+
import {executeMethodMap} from './execute-method-map.js';
|
|
200
200
|
import {LRUCache} from 'lru-cache';
|
|
201
|
-
import type {ScreenRecordingProperties} from './commands/types';
|
|
201
|
+
import type {ScreenRecordingProperties, ScreenStreamingProps} from './commands/types.js';
|
|
202
202
|
|
|
203
203
|
export type AndroidDriverCaps = DriverCaps<AndroidDriverConstraints>;
|
|
204
204
|
export type W3CAndroidDriverCaps = W3CDriverCaps<AndroidDriverConstraints>;
|
|
@@ -228,7 +228,7 @@ class AndroidDriver
|
|
|
228
228
|
defaultIME?: string;
|
|
229
229
|
_wasWindowAnimationDisabled?: boolean;
|
|
230
230
|
_cachedActivityArgs: StringRecord;
|
|
231
|
-
_screenStreamingProps?:
|
|
231
|
+
_screenStreamingProps?: ScreenStreamingProps;
|
|
232
232
|
_screenRecordingProperties?: ScreenRecordingProperties;
|
|
233
233
|
_logcatWebsocketListener?: LogcatListener;
|
|
234
234
|
_bidiServerLogListener?: (...args: any[]) => void;
|
package/lib/index.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import {AndroidDriver} from './driver';
|
|
2
|
-
import {getChromePkg} from './commands/context/helpers';
|
|
3
|
-
import {parseArray, requireArgs} from './utils';
|
|
1
|
+
import {AndroidDriver} from './driver.js';
|
|
2
|
+
import {getChromePkg} from './commands/context/helpers.js';
|
|
3
|
+
import {parseArray, requireArgs} from './utils.js';
|
|
4
4
|
export const utils = {
|
|
5
5
|
getChromePkg,
|
|
6
6
|
parseArray,
|
|
7
7
|
requireArgs,
|
|
8
8
|
} as const;
|
|
9
|
-
export type * from './commands/types';
|
|
10
|
-
export {ANDROID_DRIVER_CONSTRAINTS as commonCapConstraints} from './constraints';
|
|
11
|
-
export * from './driver';
|
|
12
|
-
export * as doctor from './doctor/checks';
|
|
9
|
+
export type * from './commands/types.js';
|
|
10
|
+
export {ANDROID_DRIVER_CONSTRAINTS as commonCapConstraints} from './constraints.js';
|
|
11
|
+
export * from './driver.js';
|
|
12
|
+
export * as doctor from './doctor/checks.js';
|
|
13
13
|
|
|
14
14
|
export default AndroidDriver;
|
package/lib/method-map.ts
CHANGED
package/lib/utils.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {errors} from 'appium/driver';
|
|
1
|
+
import {errors} from 'appium/driver.js';
|
|
2
2
|
import type {LogEntry} from 'appium-adb';
|
|
3
|
-
import type {AndroidDriver} from './driver';
|
|
3
|
+
import type {AndroidDriver} from './driver.js';
|
|
4
4
|
import {util} from '@appium/support';
|
|
5
5
|
|
|
6
6
|
export type {LogEntry};
|
|
@@ -38,9 +38,10 @@ export function requireArgs(
|
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
/**
|
|
41
|
+
* Parses a capability into an array
|
|
41
42
|
*
|
|
42
|
-
* @param cap
|
|
43
|
-
* @returns
|
|
43
|
+
* @param cap - The capability to parse
|
|
44
|
+
* @returns The parsed capability
|
|
44
45
|
*/
|
|
45
46
|
export function parseArray(cap: string | string[]): string[] {
|
|
46
47
|
let parsedCaps;
|
|
@@ -58,8 +59,7 @@ export function parseArray(cap: string | string[]): string[] {
|
|
|
58
59
|
}
|
|
59
60
|
|
|
60
61
|
/**
|
|
61
|
-
*
|
|
62
|
-
* @returns
|
|
62
|
+
* Removes all session web socket handlers
|
|
63
63
|
*/
|
|
64
64
|
export async function removeAllSessionWebSocketHandlers(this: AndroidDriver): Promise<void> {
|
|
65
65
|
if (!this.sessionId || typeof this.server?.getWebSocketHandlers !== 'function') {
|
|
@@ -73,9 +73,10 @@ export async function removeAllSessionWebSocketHandlers(this: AndroidDriver): Pr
|
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
/**
|
|
76
|
+
* Converts a native log entry to a Selenium log entry
|
|
76
77
|
*
|
|
77
|
-
* @param x
|
|
78
|
-
* @returns
|
|
78
|
+
* @param x - The native log entry
|
|
79
|
+
* @returns The Selenium log entry
|
|
79
80
|
*/
|
|
80
81
|
export function nativeLogEntryToSeleniumEntry(x: LogEntryWithPrefix): LogEntry {
|
|
81
82
|
const msg = util.isEmpty(x.prefix) ? x.message : `[${x.prefix}] ${x.message}`;
|
|
@@ -83,6 +84,7 @@ export function nativeLogEntryToSeleniumEntry(x: LogEntryWithPrefix): LogEntry {
|
|
|
83
84
|
}
|
|
84
85
|
|
|
85
86
|
/**
|
|
87
|
+
* Converts a timestamp and message to a Selenium log entry
|
|
86
88
|
*
|
|
87
89
|
* @see {@link https://github.com/SeleniumHQ/selenium/blob/0d425676b3c9df261dd641917f867d4d5ce7774d/java/client/src/org/openqa/selenium/logging/LogEntry.java}
|
|
88
90
|
* @param timestamp
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "appium-android-driver",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "Android UiAutomator and Chrome support for Appium",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"appium",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"rebuild": "npm run clean; npm run build",
|
|
40
40
|
"format": "prettier -w ./lib ./test",
|
|
41
41
|
"format:check": "prettier --check ./lib ./test",
|
|
42
|
-
"test": "node --test --test-force-exit --test-
|
|
42
|
+
"test": "node --test --test-force-exit --test-timeout=60000 \"./build/test/unit/**/*.spec.js\""
|
|
43
43
|
},
|
|
44
44
|
"prettier": {
|
|
45
45
|
"bracketSpacing": false,
|
|
@@ -76,6 +76,7 @@
|
|
|
76
76
|
"chai": "^6.0.0",
|
|
77
77
|
"chai-as-promised": "^8.0.0",
|
|
78
78
|
"conventional-changelog-conventionalcommits": "^9.3.1",
|
|
79
|
+
"esmock": "^2.7.6",
|
|
79
80
|
"prettier": "^3.0.1",
|
|
80
81
|
"semantic-release": "^25.0.2",
|
|
81
82
|
"sinon": "^22.0.0",
|
|
@@ -88,5 +89,13 @@
|
|
|
88
89
|
"node": "^20.19.0 || ^22.12.0 || >=24.0.0",
|
|
89
90
|
"npm": ">=10"
|
|
90
91
|
},
|
|
91
|
-
"types": "./build/lib/index.d.ts"
|
|
92
|
+
"types": "./build/lib/index.d.ts",
|
|
93
|
+
"type": "module",
|
|
94
|
+
"exports": {
|
|
95
|
+
".": {
|
|
96
|
+
"types": "./build/lib/index.d.ts",
|
|
97
|
+
"import": "./build/lib/index.js"
|
|
98
|
+
},
|
|
99
|
+
"./package.json": "./package.json"
|
|
100
|
+
}
|
|
92
101
|
}
|