appium-android-driver 7.8.3 → 8.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 +25 -0
- package/build/lib/commands/app-management.d.ts +129 -5
- package/build/lib/commands/app-management.d.ts.map +1 -1
- package/build/lib/commands/app-management.js +433 -128
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/appearance.d.ts +17 -4
- package/build/lib/commands/appearance.d.ts.map +1 -1
- package/build/lib/commands/appearance.js +32 -33
- package/build/lib/commands/appearance.js.map +1 -1
- package/build/lib/commands/context/cache.d.ts +19 -0
- package/build/lib/commands/context/cache.d.ts.map +1 -0
- package/build/lib/commands/context/cache.js +32 -0
- package/build/lib/commands/context/cache.js.map +1 -0
- package/build/lib/commands/context/exports.d.ts +141 -0
- package/build/lib/commands/context/exports.d.ts.map +1 -0
- package/build/lib/commands/context/exports.js +351 -0
- package/build/lib/commands/context/exports.js.map +1 -0
- package/build/lib/commands/context/helpers.d.ts +98 -0
- package/build/lib/commands/context/helpers.d.ts.map +1 -0
- package/build/lib/commands/context/helpers.js +715 -0
- package/build/lib/commands/context/helpers.js.map +1 -0
- package/build/lib/commands/device/common.d.ts +23 -0
- package/build/lib/commands/device/common.d.ts.map +1 -0
- package/build/lib/commands/device/common.js +230 -0
- package/build/lib/commands/device/common.js.map +1 -0
- package/build/lib/commands/device/emulator-actions.d.ts +114 -0
- package/build/lib/commands/device/emulator-actions.d.ts.map +1 -0
- package/build/lib/commands/device/emulator-actions.js +197 -0
- package/build/lib/commands/device/emulator-actions.js.map +1 -0
- package/build/lib/commands/device/emulator-console.d.ts +7 -0
- package/build/lib/commands/device/emulator-console.d.ts.map +1 -0
- package/build/lib/commands/device/emulator-console.js +24 -0
- package/build/lib/commands/device/emulator-console.js.map +1 -0
- package/build/lib/commands/device/utils.d.ts +50 -0
- package/build/lib/commands/device/utils.d.ts.map +1 -0
- package/build/lib/commands/device/utils.js +238 -0
- package/build/lib/commands/device/utils.js.map +1 -0
- package/build/lib/commands/deviceidle.d.ts +8 -5
- package/build/lib/commands/deviceidle.d.ts.map +1 -1
- package/build/lib/commands/deviceidle.js +31 -37
- package/build/lib/commands/deviceidle.js.map +1 -1
- package/build/lib/commands/element.d.ts +99 -5
- package/build/lib/commands/element.d.ts.map +1 -1
- package/build/lib/commands/element.js +152 -116
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/execute.d.ts +12 -4
- package/build/lib/commands/execute.d.ts.map +1 -1
- package/build/lib/commands/execute.js +83 -78
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +42 -5
- package/build/lib/commands/file-actions.d.ts.map +1 -1
- package/build/lib/commands/file-actions.js +230 -194
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +5 -4
- package/build/lib/commands/find.d.ts.map +1 -1
- package/build/lib/commands/find.js +7 -10
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/geolocation.d.ts +45 -0
- package/build/lib/commands/geolocation.d.ts.map +1 -0
- package/build/lib/commands/geolocation.js +182 -0
- package/build/lib/commands/geolocation.js.map +1 -0
- package/build/lib/commands/ime.d.ts +25 -5
- package/build/lib/commands/ime.d.ts.map +1 -1
- package/build/lib/commands/ime.js +59 -42
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/intent.d.ts +56 -5
- package/build/lib/commands/intent.d.ts.map +1 -1
- package/build/lib/commands/intent.js +135 -83
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +58 -4
- package/build/lib/commands/keyboard.d.ts.map +1 -1
- package/build/lib/commands/keyboard.js +119 -17
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/lock/exports.d.ts +301 -0
- package/build/lib/commands/lock/exports.d.ts.map +1 -0
- package/build/lib/commands/lock/exports.js +121 -0
- package/build/lib/commands/lock/exports.js.map +1 -0
- package/build/lib/commands/lock/helpers.d.ts +349 -0
- package/build/lib/commands/lock/helpers.d.ts.map +1 -0
- package/build/lib/commands/lock/helpers.js +375 -0
- package/build/lib/commands/lock/helpers.js.map +1 -0
- package/build/lib/commands/log.d.ts +59 -5
- package/build/lib/commands/log.d.ts.map +1 -1
- package/build/lib/commands/log.js +150 -140
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +16 -5
- package/build/lib/commands/media-projection.d.ts.map +1 -1
- package/build/lib/commands/media-projection.js +69 -58
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/memory.d.ts +9 -5
- package/build/lib/commands/memory.d.ts.map +1 -1
- package/build/lib/commands/memory.js +19 -24
- package/build/lib/commands/memory.js.map +1 -1
- package/build/lib/commands/misc.d.ts +42 -0
- package/build/lib/commands/misc.d.ts.map +1 -0
- package/build/lib/commands/misc.js +100 -0
- package/build/lib/commands/misc.js.map +1 -0
- package/build/lib/commands/network.d.ts +61 -5
- package/build/lib/commands/network.d.ts.map +1 -1
- package/build/lib/commands/network.js +196 -189
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/performance.d.ts +67 -27
- package/build/lib/commands/performance.d.ts.map +1 -1
- package/build/lib/commands/performance.js +105 -80
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +12 -6
- package/build/lib/commands/permissions.d.ts.map +1 -1
- package/build/lib/commands/permissions.js +65 -62
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +44 -5
- package/build/lib/commands/recordscreen.d.ts.map +1 -1
- package/build/lib/commands/recordscreen.js +131 -126
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/resources.d.ts +16 -0
- package/build/lib/commands/resources.d.ts.map +1 -0
- package/build/lib/commands/resources.js +91 -0
- package/build/lib/commands/resources.js.map +1 -0
- package/build/lib/commands/shell.d.ts +8 -5
- package/build/lib/commands/shell.d.ts.map +1 -1
- package/build/lib/commands/shell.js +29 -33
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +34 -6
- package/build/lib/commands/streamscreen.d.ts.map +1 -1
- package/build/lib/commands/streamscreen.js +166 -162
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +18 -13
- package/build/lib/commands/system-bars.d.ts.map +1 -1
- package/build/lib/commands/system-bars.js +68 -64
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/time.d.ts +14 -0
- package/build/lib/commands/time.d.ts.map +1 -0
- package/build/lib/commands/time.js +39 -0
- package/build/lib/commands/time.js.map +1 -0
- package/build/lib/commands/touch.d.ts +99 -6
- package/build/lib/commands/touch.d.ts.map +1 -1
- package/build/lib/commands/touch.js +399 -280
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/commands/types.d.ts +110 -2
- package/build/lib/commands/types.d.ts.map +1 -1
- package/build/lib/doctor/checks.d.ts.map +1 -1
- package/build/lib/doctor/checks.js +4 -4
- package/build/lib/doctor/checks.js.map +1 -1
- package/build/lib/driver.d.ts +224 -27
- package/build/lib/driver.d.ts.map +1 -1
- package/build/lib/driver.js +232 -7
- package/build/lib/driver.js.map +1 -1
- package/build/lib/index.d.ts +1 -4
- package/build/lib/index.d.ts.map +1 -1
- package/build/lib/index.js +1 -13
- package/build/lib/index.js.map +1 -1
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.d.ts +0 -23
- package/build/lib/method-map.d.ts.map +1 -1
- package/build/lib/method-map.js +0 -11
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/utils.d.ts +12 -0
- package/build/lib/utils.d.ts.map +1 -1
- package/build/lib/utils.js +38 -2
- package/build/lib/utils.js.map +1 -1
- package/lib/commands/app-management.js +470 -145
- package/lib/commands/appearance.js +29 -36
- package/lib/commands/context/cache.js +29 -0
- package/lib/commands/context/exports.js +379 -0
- package/lib/commands/context/helpers.js +802 -0
- package/lib/commands/device/common.js +264 -0
- package/lib/commands/device/emulator-actions.js +194 -0
- package/lib/commands/device/emulator-console.js +24 -0
- package/lib/commands/device/utils.js +285 -0
- package/lib/commands/deviceidle.js +31 -44
- package/lib/commands/element.js +149 -142
- package/lib/commands/execute.js +86 -87
- package/lib/commands/file-actions.js +249 -222
- package/lib/commands/find.ts +13 -19
- package/lib/commands/geolocation.js +179 -0
- package/lib/commands/ime.js +53 -45
- package/lib/commands/intent.js +149 -91
- package/lib/commands/keyboard.js +114 -17
- package/lib/commands/lock/exports.js +139 -0
- package/lib/commands/lock/helpers.js +379 -0
- package/lib/commands/log.js +170 -166
- package/lib/commands/media-projection.js +75 -70
- package/lib/commands/memory.js +17 -29
- package/lib/commands/misc.js +94 -0
- package/lib/commands/network.js +209 -223
- package/lib/commands/performance.js +88 -73
- package/lib/commands/permissions.js +83 -84
- package/lib/commands/recordscreen.js +171 -170
- package/lib/commands/resources.js +96 -0
- package/lib/commands/shell.js +28 -42
- package/lib/commands/streamscreen.js +207 -206
- package/lib/commands/system-bars.js +76 -77
- package/lib/commands/time.js +36 -0
- package/lib/commands/touch.js +442 -346
- package/lib/commands/types.ts +123 -2
- package/lib/doctor/checks.js +24 -16
- package/lib/driver.ts +454 -12
- package/lib/index.ts +1 -13
- package/lib/logger.js +1 -1
- package/lib/method-map.js +0 -11
- package/lib/utils.js +40 -3
- package/package.json +1 -1
- package/build/lib/commands/actions.d.ts +0 -8
- package/build/lib/commands/actions.d.ts.map +0 -1
- package/build/lib/commands/actions.js +0 -207
- package/build/lib/commands/actions.js.map +0 -1
- package/build/lib/commands/alert.d.ts +0 -8
- package/build/lib/commands/alert.d.ts.map +0 -1
- package/build/lib/commands/alert.js +0 -29
- package/build/lib/commands/alert.js.map +0 -1
- package/build/lib/commands/context.d.ts +0 -10
- package/build/lib/commands/context.d.ts.map +0 -1
- package/build/lib/commands/context.js +0 -431
- package/build/lib/commands/context.js.map +0 -1
- package/build/lib/commands/emu-console.d.ts +0 -7
- package/build/lib/commands/emu-console.d.ts.map +0 -1
- package/build/lib/commands/emu-console.js +0 -27
- package/build/lib/commands/emu-console.js.map +0 -1
- package/build/lib/commands/general.d.ts +0 -9
- package/build/lib/commands/general.d.ts.map +0 -1
- package/build/lib/commands/general.js +0 -293
- package/build/lib/commands/general.js.map +0 -1
- package/build/lib/commands/index.d.ts +0 -28
- package/build/lib/commands/index.d.ts.map +0 -1
- package/build/lib/commands/index.js +0 -57
- package/build/lib/commands/index.js.map +0 -1
- package/build/lib/commands/mixins.d.ts +0 -747
- package/build/lib/commands/mixins.d.ts.map +0 -1
- package/build/lib/commands/mixins.js +0 -19
- package/build/lib/commands/mixins.js.map +0 -1
- package/build/lib/helpers/android.d.ts +0 -163
- package/build/lib/helpers/android.d.ts.map +0 -1
- package/build/lib/helpers/android.js +0 -818
- package/build/lib/helpers/android.js.map +0 -1
- package/build/lib/helpers/index.d.ts +0 -7
- package/build/lib/helpers/index.d.ts.map +0 -1
- package/build/lib/helpers/index.js +0 -29
- package/build/lib/helpers/index.js.map +0 -1
- package/build/lib/helpers/types.d.ts +0 -122
- package/build/lib/helpers/types.d.ts.map +0 -1
- package/build/lib/helpers/types.js +0 -3
- package/build/lib/helpers/types.js.map +0 -1
- package/build/lib/helpers/unlock.d.ts +0 -32
- package/build/lib/helpers/unlock.d.ts.map +0 -1
- package/build/lib/helpers/unlock.js +0 -273
- package/build/lib/helpers/unlock.js.map +0 -1
- package/build/lib/helpers/webview.d.ts +0 -74
- package/build/lib/helpers/webview.d.ts.map +0 -1
- package/build/lib/helpers/webview.js +0 -448
- package/build/lib/helpers/webview.js.map +0 -1
- package/lib/commands/actions.js +0 -244
- package/lib/commands/alert.js +0 -34
- package/lib/commands/context.js +0 -507
- package/lib/commands/emu-console.js +0 -31
- package/lib/commands/general.js +0 -343
- package/lib/commands/index.ts +0 -54
- package/lib/commands/mixins.ts +0 -976
- package/lib/helpers/android.ts +0 -1153
- package/lib/helpers/index.ts +0 -6
- package/lib/helpers/types.ts +0 -136
- package/lib/helpers/unlock.ts +0 -329
- package/lib/helpers/webview.ts +0 -610
package/build/lib/driver.js
CHANGED
|
@@ -4,16 +4,213 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
5
|
};
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.AndroidDriver =
|
|
7
|
+
exports.AndroidDriver = void 0;
|
|
8
8
|
const lodash_1 = __importDefault(require("lodash"));
|
|
9
9
|
const driver_1 = require("appium/driver");
|
|
10
10
|
const constraints_1 = __importDefault(require("./constraints"));
|
|
11
|
-
const helpers_1 = require("./helpers");
|
|
12
11
|
const method_map_1 = require("./method-map");
|
|
13
12
|
const io_appium_settings_1 = require("io.appium.settings");
|
|
13
|
+
const utils_1 = require("./utils");
|
|
14
|
+
const helpers_1 = require("./commands/context/helpers");
|
|
15
|
+
const exports_1 = require("./commands/context/exports");
|
|
16
|
+
const common_1 = require("./commands/device/common");
|
|
17
|
+
const emulator_actions_1 = require("./commands/device/emulator-actions");
|
|
18
|
+
const emulator_console_1 = require("./commands/device/emulator-console");
|
|
19
|
+
const app_management_1 = require("./commands/app-management");
|
|
20
|
+
const appearance_1 = require("./commands/appearance");
|
|
21
|
+
const deviceidle_1 = require("./commands/deviceidle");
|
|
22
|
+
const element_1 = require("./commands/element");
|
|
23
|
+
const execute_1 = require("./commands/execute");
|
|
24
|
+
const file_actions_1 = require("./commands/file-actions");
|
|
25
|
+
const find_1 = require("./commands/find");
|
|
26
|
+
const geolocation_1 = require("./commands/geolocation");
|
|
27
|
+
const ime_1 = require("./commands/ime");
|
|
28
|
+
const intent_1 = require("./commands/intent");
|
|
29
|
+
const keyboard_1 = require("./commands/keyboard");
|
|
30
|
+
const exports_2 = require("./commands/lock/exports");
|
|
31
|
+
const log_1 = require("./commands/log");
|
|
32
|
+
const media_projection_1 = require("./commands/media-projection");
|
|
33
|
+
const memory_1 = require("./commands/memory");
|
|
34
|
+
const misc_1 = require("./commands/misc");
|
|
35
|
+
const network_1 = require("./commands/network");
|
|
36
|
+
const performance_1 = require("./commands/performance");
|
|
37
|
+
const permissions_1 = require("./commands/permissions");
|
|
38
|
+
const recordscreen_1 = require("./commands/recordscreen");
|
|
39
|
+
const resources_1 = require("./commands/resources");
|
|
40
|
+
const shell_1 = require("./commands/shell");
|
|
41
|
+
const streamscreen_1 = require("./commands/streamscreen");
|
|
42
|
+
const system_bars_1 = require("./commands/system-bars");
|
|
43
|
+
const time_1 = require("./commands/time");
|
|
44
|
+
const touch_1 = require("./commands/touch");
|
|
45
|
+
const EMULATOR_PATTERN = /\bemulator\b/i;
|
|
14
46
|
class AndroidDriver extends driver_1.BaseDriver {
|
|
15
47
|
constructor(opts = {}, shouldValidateCaps = true) {
|
|
16
48
|
super(opts, shouldValidateCaps);
|
|
49
|
+
this.getContexts = exports_1.getContexts;
|
|
50
|
+
this.getCurrentContext = exports_1.getCurrentContext;
|
|
51
|
+
this.defaultContextName = exports_1.defaultContextName;
|
|
52
|
+
this.assignContexts = exports_1.assignContexts;
|
|
53
|
+
this.switchContext = exports_1.switchContext;
|
|
54
|
+
this.defaultWebviewName = exports_1.defaultWebviewName;
|
|
55
|
+
this.isChromedriverContext = exports_1.isChromedriverContext;
|
|
56
|
+
this.startChromedriverProxy = exports_1.startChromedriverProxy;
|
|
57
|
+
this.stopChromedriverProxies = exports_1.stopChromedriverProxies;
|
|
58
|
+
this.suspendChromedriverProxy = exports_1.suspendChromedriverProxy;
|
|
59
|
+
this.startChromeSession = exports_1.startChromeSession;
|
|
60
|
+
this.onChromedriverStop = exports_1.onChromedriverStop;
|
|
61
|
+
this.isWebContext = exports_1.isWebContext;
|
|
62
|
+
this.mobileGetContexts = exports_1.mobileGetContexts;
|
|
63
|
+
this.setContext = exports_1.setContext;
|
|
64
|
+
this.getDeviceInfoFromCaps = common_1.getDeviceInfoFromCaps;
|
|
65
|
+
this.createADB = common_1.createADB;
|
|
66
|
+
this.getLaunchInfo = common_1.getLaunchInfo;
|
|
67
|
+
this.initDevice = common_1.initDevice;
|
|
68
|
+
this.fingerprint = emulator_actions_1.fingerprint;
|
|
69
|
+
this.mobileFingerprint = emulator_actions_1.mobileFingerprint;
|
|
70
|
+
this.sendSMS = emulator_actions_1.sendSMS;
|
|
71
|
+
this.mobileSendSms = emulator_actions_1.mobileSendSms;
|
|
72
|
+
this.gsmCall = emulator_actions_1.gsmCall;
|
|
73
|
+
this.mobileGsmCall = emulator_actions_1.mobileGsmCall;
|
|
74
|
+
this.gsmSignal = emulator_actions_1.gsmSignal;
|
|
75
|
+
this.mobileGsmSignal = emulator_actions_1.mobileGsmSignal;
|
|
76
|
+
this.gsmVoice = emulator_actions_1.gsmVoice;
|
|
77
|
+
this.mobileGsmVoice = emulator_actions_1.mobileGsmVoice;
|
|
78
|
+
this.powerAC = emulator_actions_1.powerAC;
|
|
79
|
+
this.mobilePowerAc = emulator_actions_1.mobilePowerAc;
|
|
80
|
+
this.powerCapacity = emulator_actions_1.powerCapacity;
|
|
81
|
+
this.mobilePowerCapacity = emulator_actions_1.mobilePowerCapacity;
|
|
82
|
+
this.networkSpeed = emulator_actions_1.networkSpeed;
|
|
83
|
+
this.mobileNetworkSpeed = emulator_actions_1.mobileNetworkSpeed;
|
|
84
|
+
this.sensorSet = emulator_actions_1.sensorSet;
|
|
85
|
+
this.mobileExecEmuConsoleCommand = emulator_console_1.mobileExecEmuConsoleCommand;
|
|
86
|
+
this.getThirdPartyPackages = app_management_1.getThirdPartyPackages;
|
|
87
|
+
this.uninstallOtherPackages = app_management_1.uninstallOtherPackages;
|
|
88
|
+
this.installOtherApks = app_management_1.installOtherApks;
|
|
89
|
+
this.installApk = app_management_1.installApk;
|
|
90
|
+
this.resetApp = app_management_1.resetApp;
|
|
91
|
+
this.background = app_management_1.background;
|
|
92
|
+
this.getCurrentActivity = app_management_1.getCurrentActivity;
|
|
93
|
+
this.getCurrentPackage = app_management_1.getCurrentPackage;
|
|
94
|
+
this.mobileClearApp = app_management_1.mobileClearApp;
|
|
95
|
+
this.mobileInstallApp = app_management_1.mobileInstallApp;
|
|
96
|
+
this.installApp = app_management_1.installApp;
|
|
97
|
+
this.mobileActivateApp = app_management_1.mobileActivateApp;
|
|
98
|
+
this.mobileIsAppInstalled = app_management_1.mobileIsAppInstalled;
|
|
99
|
+
this.mobileQueryAppState = app_management_1.mobileQueryAppState;
|
|
100
|
+
this.mobileRemoveApp = app_management_1.mobileRemoveApp;
|
|
101
|
+
this.mobileTerminateApp = app_management_1.mobileTerminateApp;
|
|
102
|
+
this.terminateApp = app_management_1.terminateApp;
|
|
103
|
+
this.removeApp = app_management_1.removeApp;
|
|
104
|
+
this.activateApp = app_management_1.activateApp;
|
|
105
|
+
this.queryAppState = app_management_1.queryAppState;
|
|
106
|
+
this.isAppInstalled = app_management_1.isAppInstalled;
|
|
107
|
+
this.mobileGetUiMode = appearance_1.mobileGetUiMode;
|
|
108
|
+
this.mobileSetUiMode = appearance_1.mobileSetUiMode;
|
|
109
|
+
this.mobileDeviceidle = deviceidle_1.mobileDeviceidle;
|
|
110
|
+
this.getAttribute = element_1.getAttribute;
|
|
111
|
+
this.getName = element_1.getName;
|
|
112
|
+
this.elementDisplayed = element_1.elementDisplayed;
|
|
113
|
+
this.elementEnabled = element_1.elementEnabled;
|
|
114
|
+
this.elementSelected = element_1.elementSelected;
|
|
115
|
+
this.setElementValue = element_1.setElementValue;
|
|
116
|
+
this.doSetElementValue = element_1.doSetElementValue;
|
|
117
|
+
this.replaceValue = element_1.replaceValue;
|
|
118
|
+
this.setValueImmediate = element_1.setValueImmediate;
|
|
119
|
+
this.click = element_1.click;
|
|
120
|
+
this.getLocationInView = element_1.getLocationInView;
|
|
121
|
+
this.getText = element_1.getText;
|
|
122
|
+
this.getLocation = element_1.getLocation;
|
|
123
|
+
this.getSize = element_1.getSize;
|
|
124
|
+
this.execute = execute_1.execute;
|
|
125
|
+
this.executeMobile = execute_1.executeMobile;
|
|
126
|
+
this.pullFile = file_actions_1.pullFile;
|
|
127
|
+
this.mobilePullFile = file_actions_1.mobilePullFile;
|
|
128
|
+
this.pullFolder = file_actions_1.pullFolder;
|
|
129
|
+
this.mobilePullFolder = file_actions_1.mobilePullFolder;
|
|
130
|
+
this.pushFile = file_actions_1.pushFile;
|
|
131
|
+
this.mobilePushFile = file_actions_1.mobilePushFile;
|
|
132
|
+
this.mobileDeleteFile = file_actions_1.mobileDeleteFile;
|
|
133
|
+
this.findElOrEls = find_1.findElOrEls;
|
|
134
|
+
this.doFindElementOrEls = find_1.doFindElementOrEls;
|
|
135
|
+
this.setGeoLocation = geolocation_1.setGeoLocation;
|
|
136
|
+
this.getGeoLocation = geolocation_1.getGeoLocation;
|
|
137
|
+
this.mobileRefreshGpsCache = geolocation_1.mobileRefreshGpsCache;
|
|
138
|
+
this.toggleLocationServices = geolocation_1.toggleLocationServices;
|
|
139
|
+
this.isLocationServicesEnabled = geolocation_1.isLocationServicesEnabled;
|
|
140
|
+
this.isIMEActivated = ime_1.isIMEActivated;
|
|
141
|
+
this.availableIMEEngines = ime_1.availableIMEEngines;
|
|
142
|
+
this.getActiveIMEEngine = ime_1.getActiveIMEEngine;
|
|
143
|
+
this.activateIMEEngine = ime_1.activateIMEEngine;
|
|
144
|
+
this.deactivateIMEEngine = ime_1.deactivateIMEEngine;
|
|
145
|
+
this.startActivity = intent_1.startActivity;
|
|
146
|
+
this.mobileBroadcast = intent_1.mobileBroadcast;
|
|
147
|
+
this.mobileStartService = intent_1.mobileStartService;
|
|
148
|
+
this.mobileStopService = intent_1.mobileStopService;
|
|
149
|
+
this.hideKeyboard = keyboard_1.hideKeyboard;
|
|
150
|
+
this.isKeyboardShown = keyboard_1.isKeyboardShown;
|
|
151
|
+
this.keys = keyboard_1.keys;
|
|
152
|
+
this.doSendKeys = keyboard_1.doSendKeys;
|
|
153
|
+
this.pressKeyCode = keyboard_1.pressKeyCode;
|
|
154
|
+
this.longPressKeyCode = keyboard_1.longPressKeyCode;
|
|
155
|
+
this.mobilePerformEditorAction = keyboard_1.mobilePerformEditorAction;
|
|
156
|
+
this.lock = exports_2.lock;
|
|
157
|
+
this.unlock = exports_2.unlock;
|
|
158
|
+
this.mobileLock = exports_2.mobileLock;
|
|
159
|
+
this.mobileUnlock = exports_2.mobileUnlock;
|
|
160
|
+
this.isLocked = exports_2.isLocked;
|
|
161
|
+
this.supportedLogTypes = log_1.supportedLogTypes;
|
|
162
|
+
this.mobileStartLogsBroadcast = log_1.mobileStartLogsBroadcast;
|
|
163
|
+
this.mobileStopLogsBroadcast = log_1.mobileStopLogsBroadcast;
|
|
164
|
+
this.getLogTypes = log_1.getLogTypes;
|
|
165
|
+
this.getLog = log_1.getLog;
|
|
166
|
+
this.mobileIsMediaProjectionRecordingRunning = media_projection_1.mobileIsMediaProjectionRecordingRunning;
|
|
167
|
+
this.mobileStartMediaProjectionRecording = media_projection_1.mobileStartMediaProjectionRecording;
|
|
168
|
+
this.mobileStopMediaProjectionRecording = media_projection_1.mobileStopMediaProjectionRecording;
|
|
169
|
+
this.mobileSendTrimMemory = memory_1.mobileSendTrimMemory;
|
|
170
|
+
this.getWindowRect = misc_1.getWindowRect;
|
|
171
|
+
this.getWindowSize = misc_1.getWindowSize;
|
|
172
|
+
this.getDisplayDensity = misc_1.getDisplayDensity;
|
|
173
|
+
this.mobileGetNotifications = misc_1.mobileGetNotifications;
|
|
174
|
+
this.mobileListSms = misc_1.mobileListSms;
|
|
175
|
+
this.openNotifications = misc_1.openNotifications;
|
|
176
|
+
this.setUrl = misc_1.setUrl;
|
|
177
|
+
this.getNetworkConnection = network_1.getNetworkConnection;
|
|
178
|
+
this.isWifiOn = network_1.isWifiOn;
|
|
179
|
+
this.mobileGetConnectivity = network_1.mobileGetConnectivity;
|
|
180
|
+
this.mobileSetConnectivity = network_1.mobileSetConnectivity;
|
|
181
|
+
this.setNetworkConnection = network_1.setNetworkConnection;
|
|
182
|
+
this.setWifiState = network_1.setWifiState;
|
|
183
|
+
this.setDataState = network_1.setDataState;
|
|
184
|
+
this.toggleData = network_1.toggleData;
|
|
185
|
+
this.toggleFlightMode = network_1.toggleFlightMode;
|
|
186
|
+
this.toggleWiFi = network_1.toggleWiFi;
|
|
187
|
+
this.getPerformanceData = performance_1.getPerformanceData;
|
|
188
|
+
this.getPerformanceDataTypes = performance_1.getPerformanceDataTypes;
|
|
189
|
+
this.mobileGetPerformanceData = performance_1.mobileGetPerformanceData;
|
|
190
|
+
this.mobileChangePermissions = permissions_1.mobileChangePermissions;
|
|
191
|
+
this.mobileGetPermissions = permissions_1.mobileGetPermissions;
|
|
192
|
+
this.startRecordingScreen = recordscreen_1.startRecordingScreen;
|
|
193
|
+
this.stopRecordingScreen = recordscreen_1.stopRecordingScreen;
|
|
194
|
+
this.getStrings = resources_1.getStrings;
|
|
195
|
+
this.ensureDeviceLocale = resources_1.ensureDeviceLocale;
|
|
196
|
+
this.mobileShell = shell_1.mobileShell;
|
|
197
|
+
this.mobileStartScreenStreaming = streamscreen_1.mobileStartScreenStreaming;
|
|
198
|
+
this.mobileStopScreenStreaming = streamscreen_1.mobileStopScreenStreaming;
|
|
199
|
+
this.getSystemBars = system_bars_1.getSystemBars;
|
|
200
|
+
this.mobilePerformStatusBarCommand = system_bars_1.mobilePerformStatusBarCommand;
|
|
201
|
+
this.getDeviceTime = time_1.getDeviceTime;
|
|
202
|
+
this.mobileGetDeviceTime = time_1.mobileGetDeviceTime;
|
|
203
|
+
this.tap = touch_1.tap;
|
|
204
|
+
this.touchLongClick = touch_1.touchLongClick;
|
|
205
|
+
this.touchDown = touch_1.touchDown;
|
|
206
|
+
this.touchUp = touch_1.touchUp;
|
|
207
|
+
this.touchMove = touch_1.touchMove;
|
|
208
|
+
this.doSwipe = touch_1.doSwipe;
|
|
209
|
+
this.doTouchDrag = touch_1.doTouchDrag;
|
|
210
|
+
this.doTouchAction = touch_1.doTouchAction;
|
|
211
|
+
this.performMultiAction = touch_1.performMultiAction;
|
|
212
|
+
this.performTouch = touch_1.performTouch;
|
|
213
|
+
this.doPerformMultiAction = touch_1.doPerformMultiAction;
|
|
17
214
|
this.locatorStrategies = [
|
|
18
215
|
'xpath',
|
|
19
216
|
'id',
|
|
@@ -25,9 +222,9 @@ class AndroidDriver extends driver_1.BaseDriver {
|
|
|
25
222
|
this.sessionChromedrivers = {};
|
|
26
223
|
this.jwpProxyActive = false;
|
|
27
224
|
this.apkStrings = {};
|
|
28
|
-
this.unlocker = helpers_1.helpers.unlocker;
|
|
29
225
|
this.curContext = this.defaultContextName();
|
|
30
226
|
this.opts = opts;
|
|
227
|
+
this._cachedActivityArgs = {};
|
|
31
228
|
}
|
|
32
229
|
get settingsApp() {
|
|
33
230
|
if (!this._settingsApp) {
|
|
@@ -36,14 +233,42 @@ class AndroidDriver extends driver_1.BaseDriver {
|
|
|
36
233
|
return this._settingsApp;
|
|
37
234
|
}
|
|
38
235
|
isEmulator() {
|
|
39
|
-
|
|
236
|
+
const possibleNames = [this.opts?.udid, this.adb?.curDeviceId];
|
|
237
|
+
return !!this.opts?.avd || possibleNames.some((x) => EMULATOR_PATTERN.test(String(x)));
|
|
40
238
|
}
|
|
41
239
|
get isChromeSession() {
|
|
42
|
-
return
|
|
240
|
+
return lodash_1.default.includes(Object.keys(helpers_1.CHROME_BROWSER_PACKAGE_ACTIVITY), (this.opts.browserName || '').toLowerCase());
|
|
241
|
+
}
|
|
242
|
+
validateDesiredCaps(caps) {
|
|
243
|
+
if (!super.validateDesiredCaps(caps)) {
|
|
244
|
+
return false;
|
|
245
|
+
}
|
|
246
|
+
if (caps.browserName) {
|
|
247
|
+
if (caps.app) {
|
|
248
|
+
// warn if the capabilities have both `app` and `browser, although this is common with selenium grid
|
|
249
|
+
this.log.warn(`The desired capabilities should generally not include both an 'app' and a 'browserName'`);
|
|
250
|
+
}
|
|
251
|
+
if (caps.appPackage) {
|
|
252
|
+
throw this.log.errorAndThrow(`The desired should not include both of an 'appPackage' and a 'browserName'`);
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
if (caps.uninstallOtherPackages) {
|
|
256
|
+
try {
|
|
257
|
+
(0, utils_1.parseArray)(caps.uninstallOtherPackages);
|
|
258
|
+
}
|
|
259
|
+
catch (e) {
|
|
260
|
+
throw this.log.errorAndThrow(`Could not parse "uninstallOtherPackages" capability: ${e.message}`);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
return true;
|
|
264
|
+
}
|
|
265
|
+
async deleteSession(sessionId) {
|
|
266
|
+
if (this.server) {
|
|
267
|
+
await (0, utils_1.removeAllSessionWebSocketHandlers)(this.server, sessionId);
|
|
268
|
+
}
|
|
269
|
+
await super.deleteSession(sessionId);
|
|
43
270
|
}
|
|
44
271
|
}
|
|
45
272
|
exports.AndroidDriver = AndroidDriver;
|
|
46
273
|
AndroidDriver.newMethodMap = method_map_1.newMethodMap;
|
|
47
|
-
var commands_1 = require("./commands");
|
|
48
|
-
Object.defineProperty(exports, "androidCommands", { enumerable: true, get: function () { return commands_1.commands; } });
|
|
49
274
|
//# sourceMappingURL=driver.js.map
|
package/build/lib/driver.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.ts"],"names":[],"mappings":";AAAA,6DAA6D;;;;;;AAW7D,oDAAuB;
|
|
1
|
+
{"version":3,"file":"driver.js","sourceRoot":"","sources":["../../lib/driver.ts"],"names":[],"mappings":";AAAA,6DAA6D;;;;;;AAW7D,oDAAuB;AAIvB,0CAAyC;AACzC,gEAAmF;AACnF,6CAA0C;AAC1C,2DAA+C;AAC/C,mCAAsE;AACtE,wDAA2E;AAC3E,wDAgBoC;AACpC,qDAKkC;AAClC,yEAkB4C;AAC5C,yEAA+E;AAC/E,8DAsBmC;AACnC,sDAAuE;AACvE,sDAAuD;AACvD,gDAe4B;AAC5B,gDAA0D;AAC1D,0DAQiC;AACjC,0CAAgE;AAChE,wDAMgC;AAChC,wCAMwB;AACxB,8CAK2B;AAC3B,kDAQ6B;AAC7B,qDAAyF;AACzF,wCAMwB;AACxB,kEAI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,yFAAyF,CAC1F,CAAC;aACH;YACD,IAAI,IAAI,CAAC,UAAU,EAAE;gBACnB,MAAM,IAAI,CAAC,GAAG,CAAC,aAAa,CAC1B,4EAA4E,CAC7E,CAAC;aACH;SACF;QAED,IAAI,IAAI,CAAC,sBAAsB,EAAE;YAC/B,IAAI;gBACF,IAAA,kBAAU,EAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;aACzC;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,IAAI,CAAC,GAAG,CAAC,aAAa,CAC1B,wDAAyD,CAAW,CAAC,OAAO,EAAE,CAC/E,CAAC;aACH;SACF;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEQ,KAAK,CAAC,aAAa,CAAC,SAAyB;QACpD,IAAI,IAAI,CAAC,MAAM,EAAE;YACf,MAAM,IAAA,yCAAiC,EAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;SACjE;QAED,MAAM,KAAK,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACvC,CAAC;;AAgNK,sCAAa;AAlUZ,0BAAY,GAAG,yBAAY,AAAf,CAAgB"}
|
package/build/lib/index.d.ts
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { AndroidDriver } from './driver';
|
|
2
|
-
export type * from './commands';
|
|
2
|
+
export type * from './commands/types';
|
|
3
3
|
export { ANDROID_DRIVER_CONSTRAINTS as commonCapConstraints } from './constraints';
|
|
4
4
|
export * from './driver';
|
|
5
5
|
export * as doctor from './doctor/checks';
|
|
6
|
-
export { SETTINGS_HELPER_ID as SETTINGS_HELPER_PKG_ID, default as androidHelpers } from './helpers/android';
|
|
7
|
-
export type * from './helpers/types';
|
|
8
|
-
export { CHROMIUM_WIN, NATIVE_WIN, WEBVIEW_BASE, WEBVIEW_WIN, default as webviewHelpers, } from './helpers/webview';
|
|
9
6
|
export default AndroidDriver;
|
|
10
7
|
//# sourceMappingURL=index.d.ts.map
|
package/build/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,mBAAmB,kBAAkB,CAAC;AACtC,OAAO,EAAC,0BAA0B,IAAI,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACjF,cAAc,UAAU,CAAC;AACzB,OAAO,KAAK,MAAM,MAAM,iBAAiB,CAAC;AAE1C,eAAe,aAAa,CAAC"}
|
package/build/lib/index.js
CHANGED
|
@@ -25,11 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
__setModuleDefault(result, mod);
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
29
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
30
|
-
};
|
|
31
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
32
|
-
exports.
|
|
29
|
+
exports.doctor = exports.commonCapConstraints = void 0;
|
|
33
30
|
const source_map_support_1 = require("source-map-support");
|
|
34
31
|
(0, source_map_support_1.install)();
|
|
35
32
|
const driver_1 = require("./driver");
|
|
@@ -37,14 +34,5 @@ var constraints_1 = require("./constraints");
|
|
|
37
34
|
Object.defineProperty(exports, "commonCapConstraints", { enumerable: true, get: function () { return constraints_1.ANDROID_DRIVER_CONSTRAINTS; } });
|
|
38
35
|
__exportStar(require("./driver"), exports);
|
|
39
36
|
exports.doctor = __importStar(require("./doctor/checks"));
|
|
40
|
-
var android_1 = require("./helpers/android");
|
|
41
|
-
Object.defineProperty(exports, "SETTINGS_HELPER_PKG_ID", { enumerable: true, get: function () { return android_1.SETTINGS_HELPER_ID; } });
|
|
42
|
-
Object.defineProperty(exports, "androidHelpers", { enumerable: true, get: function () { return __importDefault(android_1).default; } });
|
|
43
|
-
var webview_1 = require("./helpers/webview");
|
|
44
|
-
Object.defineProperty(exports, "CHROMIUM_WIN", { enumerable: true, get: function () { return webview_1.CHROMIUM_WIN; } });
|
|
45
|
-
Object.defineProperty(exports, "NATIVE_WIN", { enumerable: true, get: function () { return webview_1.NATIVE_WIN; } });
|
|
46
|
-
Object.defineProperty(exports, "WEBVIEW_BASE", { enumerable: true, get: function () { return webview_1.WEBVIEW_BASE; } });
|
|
47
|
-
Object.defineProperty(exports, "WEBVIEW_WIN", { enumerable: true, get: function () { return webview_1.WEBVIEW_WIN; } });
|
|
48
|
-
Object.defineProperty(exports, "webviewHelpers", { enumerable: true, get: function () { return __importDefault(webview_1).default; } });
|
|
49
37
|
exports.default = driver_1.AndroidDriver;
|
|
50
38
|
//# sourceMappingURL=index.js.map
|
package/build/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2DAA2C;AAC3C,IAAA,4BAAO,GAAE,CAAC;AAEV,qCAAuC;AAEvC,6CAAiF;AAAzE,mHAAA,0BAA0B,OAAwB;AAC1D,2CAAyB;AACzB,0DAA0C;AAE1C,kBAAe,sBAAa,CAAC"}
|
package/build/lib/logger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";;AAAA,
|
|
1
|
+
{"version":3,"file":"logger.js","sourceRoot":"","sources":["../../lib/logger.js"],"names":[],"mappings":";;AAAA,6CAAuC;AACvC,MAAM,GAAG,GAAG,gBAAM,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;AAE9C,kBAAe,GAAG,CAAC"}
|
|
@@ -103,14 +103,6 @@ export const newMethodMap: {
|
|
|
103
103
|
};
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
|
-
readonly '/session/:sessionId/touch/flick': {
|
|
107
|
-
readonly POST: {
|
|
108
|
-
readonly command: "flick";
|
|
109
|
-
readonly payloadParams: {
|
|
110
|
-
readonly optional: readonly ["element", "xspeed", "yspeed", "xoffset", "yoffset", "speed"];
|
|
111
|
-
};
|
|
112
|
-
};
|
|
113
|
-
};
|
|
114
106
|
readonly '/session/:sessionId/touch/perform': {
|
|
115
107
|
readonly POST: {
|
|
116
108
|
readonly command: "performTouch";
|
|
@@ -330,21 +322,6 @@ export const newMethodMap: {
|
|
|
330
322
|
readonly command: "getDisplayDensity";
|
|
331
323
|
};
|
|
332
324
|
};
|
|
333
|
-
readonly '/session/:sessionId/appium/app/launch': {
|
|
334
|
-
readonly POST: {
|
|
335
|
-
readonly command: "launchApp";
|
|
336
|
-
};
|
|
337
|
-
};
|
|
338
|
-
readonly '/session/:sessionId/appium/app/close': {
|
|
339
|
-
readonly POST: {
|
|
340
|
-
readonly command: "closeApp";
|
|
341
|
-
};
|
|
342
|
-
};
|
|
343
|
-
readonly '/session/:sessionId/appium/app/reset': {
|
|
344
|
-
readonly POST: {
|
|
345
|
-
readonly command: "reset";
|
|
346
|
-
};
|
|
347
|
-
};
|
|
348
325
|
readonly '/session/:sessionId/appium/app/background': {
|
|
349
326
|
readonly POST: {
|
|
350
327
|
readonly command: "background";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-map.d.ts","sourceRoot":"","sources":["../../lib/method-map.js"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"method-map.d.ts","sourceRoot":"","sources":["../../lib/method-map.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoMG"}
|
package/build/lib/method-map.js
CHANGED
|
@@ -40,14 +40,6 @@ exports.newMethodMap = ({
|
|
|
40
40
|
payloadParams: { required: ['elements'] },
|
|
41
41
|
},
|
|
42
42
|
},
|
|
43
|
-
'/session/:sessionId/touch/flick': {
|
|
44
|
-
POST: {
|
|
45
|
-
command: 'flick',
|
|
46
|
-
payloadParams: {
|
|
47
|
-
optional: ['element', 'xspeed', 'yspeed', 'xoffset', 'yoffset', 'speed'],
|
|
48
|
-
},
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
43
|
'/session/:sessionId/touch/perform': {
|
|
52
44
|
POST: {
|
|
53
45
|
command: 'performTouch',
|
|
@@ -181,9 +173,6 @@ exports.newMethodMap = ({
|
|
|
181
173
|
},
|
|
182
174
|
'/session/:sessionId/appium/device/system_bars': { GET: { command: 'getSystemBars' } },
|
|
183
175
|
'/session/:sessionId/appium/device/display_density': { GET: { command: 'getDisplayDensity' } },
|
|
184
|
-
'/session/:sessionId/appium/app/launch': { POST: { command: 'launchApp' } },
|
|
185
|
-
'/session/:sessionId/appium/app/close': { POST: { command: 'closeApp' } },
|
|
186
|
-
'/session/:sessionId/appium/app/reset': { POST: { command: 'reset' } },
|
|
187
176
|
'/session/:sessionId/appium/app/background': {
|
|
188
177
|
POST: {
|
|
189
178
|
command: 'background',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-map.js","sourceRoot":"","sources":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oBACb,yBAAyB;oBACzB,oBAAoB;iBACrB;aACF;SACF;KACF;IACD,+CAA+C,EAAE,EAAC,GAAG,EAAE,EAAC,OAAO,EAAE,eAAe,EAAC,EAAC;IAClF,mDAAmD,EAAE,EAAC,GAAG,EAAE,EAAC,OAAO,EAAE,mBAAmB,EAAC,EAAC;IAC1F,2CAA2C,EAAE;QAC3C,IAAI,EAAE;YACJ,OAAO,EAAE,YAAY;YACrB,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,SAAS,CAAC,EAAC;SACvC;KACF;IACD,wCAAwC,EAAE;QACxC,IAAI,EAAE;YACJ,OAAO,EAAE,YAAY;YACrB,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC,EAAC;SACtD;KACF;IACD,qDAAqD,EAAE;QACrD,IAAI,EAAE;YACJ,OAAO,EAAE,mBAAmB;YAC5B,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAC;SACpC;KACF;IACD,6DAA6D,EAAE;QAC7D,IAAI,EAAE;YACJ,OAAO,EAAE,cAAc;YACvB,aAAa,EAAE,EAAC,QAAQ,EAAE,CAAC,MAAM,CAAC,EAAC;SACpC;KACF;CACF,CAAC,CAAC"}
|
package/build/lib/utils.d.ts
CHANGED
|
@@ -6,5 +6,17 @@
|
|
|
6
6
|
* @returns {Record<string, any>} the same given object
|
|
7
7
|
*/
|
|
8
8
|
export function requireArgs(argNames: string | string[], opts: any): Record<string, any>;
|
|
9
|
+
/**
|
|
10
|
+
*
|
|
11
|
+
* @param {string | string[]} cap
|
|
12
|
+
* @returns {string[]}
|
|
13
|
+
*/
|
|
14
|
+
export function parseArray(cap: string | string[]): string[];
|
|
15
|
+
/**
|
|
16
|
+
* @param {import('@appium/types').AppiumServer} server
|
|
17
|
+
* @param {string?} [sessionId]
|
|
18
|
+
* @returns {Promise<void>}
|
|
19
|
+
*/
|
|
20
|
+
export function removeAllSessionWebSocketHandlers(server: import('@appium/types').AppiumServer, sessionId?: string | null | undefined): Promise<void>;
|
|
9
21
|
export const ADB_SHELL_FEATURE: "adb_shell";
|
|
10
22
|
//# sourceMappingURL=utils.d.ts.map
|
package/build/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,sCAJW,MAAM,GAAC,MAAM,EAAE,QACf,GAAG,GACD,OAAO,MAAM,EAAE,GAAG,CAAC,CAS/B;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,sCAJW,MAAM,GAAC,MAAM,EAAE,QACf,GAAG,GACD,OAAO,MAAM,EAAE,GAAG,CAAC,CAS/B;AAED;;;;GAIG;AACH,gCAHW,MAAM,GAAG,MAAM,EAAE,GACf,MAAM,EAAE,CAgBpB;AAED;;;;GAIG;AACH,0DAJW,OAAO,eAAe,EAAE,YAAY,0CAElC,QAAQ,IAAI,CAAC,CAWzB;AArDD,4CAA6C"}
|
package/build/lib/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.requireArgs = exports.ADB_SHELL_FEATURE = void 0;
|
|
6
|
+
exports.removeAllSessionWebSocketHandlers = exports.parseArray = exports.requireArgs = exports.ADB_SHELL_FEATURE = void 0;
|
|
7
7
|
const lodash_1 = __importDefault(require("lodash"));
|
|
8
8
|
const driver_1 = require("appium/driver");
|
|
9
9
|
exports.ADB_SHELL_FEATURE = 'adb_shell';
|
|
@@ -15,7 +15,7 @@ exports.ADB_SHELL_FEATURE = 'adb_shell';
|
|
|
15
15
|
* @returns {Record<string, any>} the same given object
|
|
16
16
|
*/
|
|
17
17
|
function requireArgs(argNames, opts) {
|
|
18
|
-
for (const argName of
|
|
18
|
+
for (const argName of lodash_1.default.isArray(argNames) ? argNames : [argNames]) {
|
|
19
19
|
if (!lodash_1.default.has(opts, argName)) {
|
|
20
20
|
throw new driver_1.errors.InvalidArgumentError(`'${argName}' argument must be provided`);
|
|
21
21
|
}
|
|
@@ -23,4 +23,40 @@ function requireArgs(argNames, opts) {
|
|
|
23
23
|
return opts;
|
|
24
24
|
}
|
|
25
25
|
exports.requireArgs = requireArgs;
|
|
26
|
+
/**
|
|
27
|
+
*
|
|
28
|
+
* @param {string | string[]} cap
|
|
29
|
+
* @returns {string[]}
|
|
30
|
+
*/
|
|
31
|
+
function parseArray(cap) {
|
|
32
|
+
let parsedCaps;
|
|
33
|
+
try {
|
|
34
|
+
// @ts-ignore this is fine
|
|
35
|
+
parsedCaps = JSON.parse(cap);
|
|
36
|
+
}
|
|
37
|
+
catch (ign) { }
|
|
38
|
+
if (lodash_1.default.isArray(parsedCaps)) {
|
|
39
|
+
return parsedCaps;
|
|
40
|
+
}
|
|
41
|
+
else if (lodash_1.default.isString(cap)) {
|
|
42
|
+
return [cap];
|
|
43
|
+
}
|
|
44
|
+
throw new Error(`must provide a string or JSON Array; received ${cap}`);
|
|
45
|
+
}
|
|
46
|
+
exports.parseArray = parseArray;
|
|
47
|
+
/**
|
|
48
|
+
* @param {import('@appium/types').AppiumServer} server
|
|
49
|
+
* @param {string?} [sessionId]
|
|
50
|
+
* @returns {Promise<void>}
|
|
51
|
+
*/
|
|
52
|
+
async function removeAllSessionWebSocketHandlers(server, sessionId) {
|
|
53
|
+
if (!server || !lodash_1.default.isFunction(server.getWebSocketHandlers)) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
const activeHandlers = await server.getWebSocketHandlers(sessionId);
|
|
57
|
+
for (const pathname of lodash_1.default.keys(activeHandlers)) {
|
|
58
|
+
await server.removeWebSocketHandler(pathname);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
exports.removeAllSessionWebSocketHandlers = removeAllSessionWebSocketHandlers;
|
|
26
62
|
//# sourceMappingURL=utils.js.map
|
package/build/lib/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../lib/utils.js"],"names":[],"mappings":";;;;;;AAAA,oDAAuB;AACvB,0CAAqC;AAExB,QAAA,iBAAiB,GAAG,WAAW,CAAC;AAE7C;;;;;;GAMG;AACH,SAAgB,WAAW,CAAC,QAAQ,EAAE,IAAI;IACxC,KAAK,MAAM,OAAO,IAAI,gBAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE;QACjE,IAAI,CAAC,gBAAC,CAAC,GAAG,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE;YACzB,MAAM,IAAI,eAAM,CAAC,oBAAoB,CAAC,IAAI,OAAO,6BAA6B,CAAC,CAAC;SACjF;KACF;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAPD,kCAOC;AAED;;;;GAIG;AACH,SAAgB,UAAU,CAAC,GAAG;IAC5B,IAAI,UAAU,CAAC;IACf,IAAI;QACF,0BAA0B;QAC1B,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KAC9B;IAAC,OAAO,GAAG,EAAE,GAAE;IAEhB,IAAI,gBAAC,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE;QACzB,OAAO,UAAU,CAAC;KACnB;SAAM,IAAI,gBAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QAC1B,OAAO,CAAC,GAAG,CAAC,CAAC;KACd;IAED,MAAM,IAAI,KAAK,CAAC,iDAAiD,GAAG,EAAE,CA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