appium-android-driver 6.0.0 → 7.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.
Files changed (112) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/README.md +3 -105
  3. package/build/lib/commands/actions.d.ts +0 -1
  4. package/build/lib/commands/actions.d.ts.map +1 -1
  5. package/build/lib/commands/actions.js +14 -139
  6. package/build/lib/commands/actions.js.map +1 -1
  7. package/build/lib/commands/context.d.ts.map +1 -1
  8. package/build/lib/commands/context.js +0 -1
  9. package/build/lib/commands/context.js.map +1 -1
  10. package/build/lib/commands/element.d.ts +0 -1
  11. package/build/lib/commands/element.d.ts.map +1 -1
  12. package/build/lib/commands/element.js +14 -48
  13. package/build/lib/commands/element.js.map +1 -1
  14. package/build/lib/commands/execute.d.ts.map +1 -1
  15. package/build/lib/commands/execute.js +0 -1
  16. package/build/lib/commands/execute.js.map +1 -1
  17. package/build/lib/commands/find.d.ts.map +1 -1
  18. package/build/lib/commands/find.js +1 -1
  19. package/build/lib/commands/find.js.map +1 -1
  20. package/build/lib/commands/general.d.ts +0 -1
  21. package/build/lib/commands/general.d.ts.map +1 -1
  22. package/build/lib/commands/general.js +6 -11
  23. package/build/lib/commands/general.js.map +1 -1
  24. package/build/lib/commands/index.d.ts +23 -23
  25. package/build/lib/commands/mixins.d.ts +2 -6
  26. package/build/lib/commands/mixins.d.ts.map +1 -1
  27. package/build/lib/commands/mixins.js.map +1 -1
  28. package/build/lib/commands/network.d.ts.map +1 -1
  29. package/build/lib/commands/network.js +27 -55
  30. package/build/lib/commands/network.js.map +1 -1
  31. package/build/lib/commands/performance.d.ts +4 -4
  32. package/build/lib/commands/performance.d.ts.map +1 -1
  33. package/build/lib/commands/performance.js +0 -4
  34. package/build/lib/commands/performance.js.map +1 -1
  35. package/build/lib/commands/touch.d.ts +0 -1
  36. package/build/lib/commands/touch.d.ts.map +1 -1
  37. package/build/lib/commands/touch.js +1 -15
  38. package/build/lib/commands/touch.js.map +1 -1
  39. package/build/lib/constraints.d.ts +0 -9
  40. package/build/lib/constraints.d.ts.map +1 -1
  41. package/build/lib/constraints.js +0 -9
  42. package/build/lib/constraints.js.map +1 -1
  43. package/build/lib/driver.d.ts +2 -50
  44. package/build/lib/driver.d.ts.map +1 -1
  45. package/build/lib/driver.js +1 -476
  46. package/build/lib/driver.js.map +1 -1
  47. package/build/lib/helpers/android.d.ts +0 -2
  48. package/build/lib/helpers/android.d.ts.map +1 -1
  49. package/build/lib/helpers/android.js +0 -2
  50. package/build/lib/helpers/android.js.map +1 -1
  51. package/build/lib/helpers/webview.js.map +1 -1
  52. package/build/lib/stubs.d.ts +0 -1
  53. package/build/lib/stubs.d.ts.map +1 -1
  54. package/build/lib/stubs.js +0 -1
  55. package/build/lib/stubs.js.map +1 -1
  56. package/build/lib/utils.d.ts +3 -4
  57. package/build/lib/utils.d.ts.map +1 -1
  58. package/build/lib/utils.js +3 -4
  59. package/build/lib/utils.js.map +1 -1
  60. package/lib/commands/actions.js +15 -163
  61. package/lib/commands/context.js +0 -1
  62. package/lib/commands/element.js +14 -68
  63. package/lib/commands/execute.js +0 -1
  64. package/lib/commands/find.ts +1 -2
  65. package/lib/commands/general.js +6 -11
  66. package/lib/commands/mixins.ts +0 -6
  67. package/lib/commands/network.js +28 -61
  68. package/lib/commands/performance.js +0 -4
  69. package/lib/commands/touch.js +1 -20
  70. package/lib/constraints.ts +0 -9
  71. package/lib/driver.ts +7 -595
  72. package/lib/helpers/android.ts +0 -4
  73. package/lib/helpers/webview.ts +1 -1
  74. package/lib/stubs.ts +0 -1
  75. package/lib/utils.js +4 -5
  76. package/package.json +2 -5
  77. package/bootstrap/README.md +0 -19
  78. package/bootstrap/bin/AppiumBootstrap.jar +0 -0
  79. package/build/index.d.ts +0 -282
  80. package/build/index.d.ts.map +0 -1
  81. package/build/index.js +0 -51
  82. package/build/index.js.map +0 -1
  83. package/build/lib/android-helpers.d.ts +0 -136
  84. package/build/lib/android-helpers.d.ts.map +0 -1
  85. package/build/lib/android-helpers.js +0 -855
  86. package/build/lib/android-helpers.js.map +0 -1
  87. package/build/lib/bootstrap.d.ts +0 -29
  88. package/build/lib/bootstrap.d.ts.map +0 -1
  89. package/build/lib/bootstrap.js +0 -213
  90. package/build/lib/bootstrap.js.map +0 -1
  91. package/build/lib/commands/coverage.d.ts +0 -5
  92. package/build/lib/commands/coverage.d.ts.map +0 -1
  93. package/build/lib/commands/coverage.js +0 -19
  94. package/build/lib/commands/coverage.js.map +0 -1
  95. package/build/lib/desired-caps.d.ts +0 -353
  96. package/build/lib/desired-caps.d.ts.map +0 -1
  97. package/build/lib/desired-caps.js +0 -299
  98. package/build/lib/desired-caps.js.map +0 -1
  99. package/build/lib/uiautomator.d.ts +0 -24
  100. package/build/lib/uiautomator.d.ts.map +0 -1
  101. package/build/lib/uiautomator.js +0 -102
  102. package/build/lib/uiautomator.js.map +0 -1
  103. package/build/lib/unlock-helpers.d.ts +0 -38
  104. package/build/lib/unlock-helpers.d.ts.map +0 -1
  105. package/build/lib/unlock-helpers.js +0 -266
  106. package/build/lib/unlock-helpers.js.map +0 -1
  107. package/build/lib/webview-helpers.d.ts +0 -224
  108. package/build/lib/webview-helpers.d.ts.map +0 -1
  109. package/build/lib/webview-helpers.js +0 -528
  110. package/build/lib/webview-helpers.js.map +0 -1
  111. package/lib/bootstrap.js +0 -227
  112. package/lib/uiautomator.js +0 -109
package/lib/utils.js CHANGED
@@ -6,16 +6,15 @@ export const ADB_SHELL_FEATURE = 'adb_shell';
6
6
  /**
7
7
  * Assert the presence of particular keys in the given object
8
8
  *
9
- * @template {Object} T
10
9
  * @param {string|string[]} argNames one or more key names
11
- * @param {T} opts the object to check
12
- * @returns {T} the same given object
10
+ * @param {any} opts the object to check
11
+ * @returns {Record<string, any>} the same given object
13
12
  */
14
- export function requireArgs (argNames, opts = {}) {
13
+ export function requireArgs (argNames, opts) {
15
14
  for (const argName of (_.isArray(argNames) ? argNames : [argNames])) {
16
15
  if (!_.has(opts, argName)) {
17
16
  throw new errors.InvalidArgumentError(`'${argName}' argument must be provided`);
18
17
  }
19
18
  }
20
19
  return opts;
21
- }
20
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "appium-android-driver",
3
- "version": "6.0.0",
3
+ "version": "7.0.0",
4
4
  "description": "Android UiAutomator and Chrome support for Appium",
5
5
  "keywords": [
6
6
  "appium",
@@ -27,7 +27,6 @@
27
27
  "files": [
28
28
  "lib",
29
29
  "build",
30
- "bootstrap/bin/AppiumBootstrap.jar",
31
30
  "CHANGELOG.md",
32
31
  "!build/test",
33
32
  "!build/tsconfig.tsbuildinfo"
@@ -36,7 +35,6 @@
36
35
  "build": "tsc -b",
37
36
  "clean": "npm run build -- --clean",
38
37
  "dev": "npm run build -- --watch",
39
- "e2e-test": "mocha --exit --timeout 10m \"./test/functional/**/*-specs.js\"",
40
38
  "lint": "eslint .",
41
39
  "lint:commit": "commitlint",
42
40
  "lint:fix": "npm run lint -- --fix",
@@ -70,7 +68,6 @@
70
68
  "portfinder": "^1.0.6",
71
69
  "portscanner": "2.2.0",
72
70
  "semver": "^7.0.0",
73
- "shared-preferences-builder": "^0.x",
74
71
  "source-map-support": "^0.x",
75
72
  "teen_process": "^2.0.0",
76
73
  "type-fest": "^3.11.1",
@@ -106,7 +103,7 @@
106
103
  "appium": "^2.0.0-rc.5",
107
104
  "chai": "^4.1.2",
108
105
  "chai-as-promised": "^7.1.1",
109
- "conventional-changelog-conventionalcommits": "^6.0.0",
106
+ "conventional-changelog-conventionalcommits": "^7.0.1",
110
107
  "eslint": "^8.40.0",
111
108
  "eslint-config-prettier": "^8.8.0",
112
109
  "eslint-import-resolver-typescript": "^3.5.5",
@@ -1,19 +0,0 @@
1
- Bootstrap Android
2
- ===
3
-
4
- To install the Android Maven dependencies in your local environment, run the following:
5
-
6
- * Clone https://github.com/mosabua/maven-android-sdk-deployer into your workstation
7
- * Set the ANDROID_HOME environment to the location of the Android SDK, eg. `export ANDROID_HOME=/Developer/adt-bundle-mac-x86_64-20130219/sdk/`
8
- * Run `mvn install -P 4.4` from the `maven-android-sdk-deployer` directory. The build will fail if API 19 and some extra packages are not installed.
9
- * Please install all sdk and api versions of android for building `maven-android-sdk-deployer`.
10
-
11
- You can then compile the bootstrap project by running
12
-
13
- mvn package -P 4.4
14
-
15
- If mvn package fails, try deleting your ANDROID_HOME folder and downloading everything again. If it still doesn't work try:
16
-
17
- android-sdk/tools/android update sdk --no-ui --obsolete --force
18
-
19
- and then run `mvn clean ; mvn install`
Binary file
package/build/index.d.ts DELETED
@@ -1,282 +0,0 @@
1
- #!/usr/bin/env node
2
- export default AndroidDriver;
3
- export const AndroidDriver: typeof driver.AndroidDriver;
4
- export const androidHelpers: typeof androidHelperIndex.helpers;
5
- export const androidCommands: {};
6
- export const commonCapConstraints: {
7
- platformName: {
8
- isString: boolean;
9
- inclusionCaseInsensitive: string[];
10
- presence: boolean;
11
- };
12
- app: {
13
- isString: boolean;
14
- };
15
- appActivity: {
16
- isString: boolean;
17
- };
18
- appPackage: {
19
- isString: boolean;
20
- };
21
- appWaitActivity: {
22
- isString: boolean;
23
- };
24
- appWaitPackage: {
25
- isString: boolean;
26
- };
27
- appWaitDuration: {
28
- isNumber: boolean;
29
- };
30
- deviceReadyTimeout: {
31
- isNumber: boolean;
32
- };
33
- androidCoverage: {
34
- isString: boolean;
35
- };
36
- androidDeviceReadyTimeout: {
37
- isNumber: boolean;
38
- };
39
- androidDeviceSocket: {
40
- isString: boolean;
41
- };
42
- androidInstallTimeout: {
43
- isNumber: boolean;
44
- };
45
- adbPort: {
46
- isNumber: boolean;
47
- };
48
- remoteAdbHost: {
49
- isString: boolean;
50
- };
51
- adbExecTimeout: {
52
- isNumber: boolean;
53
- };
54
- avd: {
55
- isString: boolean;
56
- };
57
- avdLaunchTimeout: {
58
- isNumber: boolean;
59
- };
60
- avdReadyTimeout: {
61
- isNumber: boolean;
62
- };
63
- avdArgs: {};
64
- avdEnv: {
65
- isObject: boolean;
66
- };
67
- useKeystore: {
68
- isBoolean: boolean;
69
- };
70
- keystorePath: {
71
- isString: boolean;
72
- };
73
- keystorePassword: {
74
- isString: boolean;
75
- };
76
- keyAlias: {
77
- isString: boolean;
78
- };
79
- keyPassword: {
80
- isString: boolean;
81
- };
82
- webviewDevtoolsPort: {
83
- isNumber: boolean;
84
- };
85
- ensureWebviewsHavePages: {
86
- isBoolean: boolean;
87
- };
88
- enableWebviewDetailsCollection: {
89
- isBoolean: boolean;
90
- };
91
- chromeDriverPort: {
92
- isNumber: boolean;
93
- };
94
- chromedriverPort: {
95
- isNumber: boolean;
96
- };
97
- chromedriverPorts: {
98
- isArray: boolean;
99
- };
100
- chromedriverArgs: {
101
- isObject: boolean;
102
- };
103
- chromedriverExecutable: {
104
- isString: boolean;
105
- };
106
- chromedriverExecutableDir: {
107
- isString: boolean;
108
- };
109
- chromedriverChromeMappingFile: {
110
- isString: boolean;
111
- };
112
- chromedriverUseSystemExecutable: {
113
- isBoolean: boolean;
114
- };
115
- chromedriverDisableBuildCheck: {
116
- isBoolean: boolean;
117
- };
118
- chromeLoggingPrefs: {
119
- isObject: boolean;
120
- };
121
- autoWebviewTimeout: {
122
- isNumber: boolean;
123
- };
124
- autoWebviewName: {
125
- isString: boolean;
126
- };
127
- intentAction: {
128
- isString: boolean;
129
- };
130
- intentCategory: {
131
- isString: boolean;
132
- };
133
- intentFlags: {
134
- isString: boolean;
135
- };
136
- optionalIntentArguments: {
137
- isString: boolean;
138
- };
139
- dontStopAppOnReset: {
140
- isBoolean: boolean;
141
- };
142
- unicodeKeyboard: {
143
- isBoolean: boolean;
144
- };
145
- resetKeyboard: {
146
- isBoolean: boolean;
147
- };
148
- noSign: {
149
- isBoolean: boolean;
150
- };
151
- recreateChromeDriverSessions: {
152
- isBoolean: boolean;
153
- };
154
- autoLaunch: {
155
- isBoolean: boolean;
156
- };
157
- nativeWebScreenshot: {
158
- isBoolean: boolean;
159
- };
160
- androidScreenshotPath: {
161
- isString: boolean;
162
- };
163
- androidInstallPath: {
164
- isString: boolean;
165
- };
166
- clearSystemFiles: {
167
- isBoolean: boolean;
168
- };
169
- extractChromeAndroidPackageFromContextName: {
170
- isBoolean: boolean;
171
- };
172
- autoGrantPermissions: {
173
- isBoolean: boolean;
174
- };
175
- sharedPreferences: {
176
- isObject: boolean;
177
- };
178
- networkSpeed: {
179
- isString: boolean;
180
- };
181
- gpsEnabled: {
182
- isBoolean: boolean;
183
- };
184
- isHeadless: {
185
- isBoolean: boolean;
186
- };
187
- showChromedriverLog: {
188
- isBoolean: boolean;
189
- };
190
- skipUnlock: {
191
- isBoolean: boolean;
192
- };
193
- clearDeviceLogsOnStart: {
194
- isBoolean: boolean;
195
- };
196
- unlockType: {
197
- isString: boolean;
198
- };
199
- unlockKey: {
200
- isString: boolean;
201
- };
202
- unlockStrategy: {
203
- isString: boolean;
204
- inclusionCaseInsensitive: string[];
205
- };
206
- otherApps: {
207
- isString: boolean;
208
- };
209
- uninstallOtherPackages: {
210
- isString: boolean;
211
- };
212
- allowTestPackages: {
213
- isBoolean: boolean;
214
- };
215
- pageLoadStrategy: {
216
- isString: boolean;
217
- };
218
- localeScript: {
219
- isString: boolean;
220
- };
221
- skipDeviceInitialization: {
222
- isBoolean: boolean;
223
- };
224
- remoteAppsCacheLimit: {
225
- isNumber: boolean;
226
- };
227
- buildToolsVersion: {
228
- isString: boolean;
229
- };
230
- skipLogcatCapture: {
231
- isBoolean: boolean;
232
- };
233
- chromeOptions: {
234
- isObject: boolean;
235
- };
236
- enablePerformanceLogging: {
237
- isBoolean: boolean;
238
- };
239
- userProfile: {
240
- isNumber: boolean;
241
- };
242
- browserName: {
243
- isString: boolean;
244
- };
245
- enforceAppInstall: {
246
- isBoolean: boolean;
247
- };
248
- suppressKillServer: {
249
- isBoolean: boolean;
250
- };
251
- allowOfflineDevices: {
252
- isBoolean: boolean;
253
- };
254
- ignoreHiddenApiPolicyError: {
255
- isBoolean: boolean;
256
- };
257
- unlockSuccessTimeout: {
258
- isNumber: boolean;
259
- };
260
- mockLocationApp: {
261
- isString: boolean;
262
- };
263
- logcatFormat: {
264
- isString: boolean;
265
- };
266
- logcatFilterSpecs: {
267
- isArray: boolean;
268
- };
269
- allowDelayAdb: {
270
- isBoolean: boolean;
271
- };
272
- };
273
- export const webviewHelpers: typeof webview.helpers;
274
- export const NATIVE_WIN: "NATIVE_APP";
275
- export const WEBVIEW_WIN: "WEBVIEW";
276
- export const WEBVIEW_BASE: "WEBVIEW_";
277
- export const CHROMIUM_WIN: "CHROMIUM";
278
- export const SETTINGS_HELPER_PKG_ID: "io.appium.settings";
279
- import * as driver from './lib/driver';
280
- import * as androidHelperIndex from './lib/android-helpers';
281
- import * as webview from './lib/webview-helpers';
282
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wBAIwB,cAAc;oCACF,uBAAuB;yBAElC,uBAAuB"}
package/build/index.js DELETED
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
- if (k2 === undefined) k2 = k;
5
- var desc = Object.getOwnPropertyDescriptor(m, k);
6
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
- desc = { enumerable: true, get: function() { return m[k]; } };
8
- }
9
- Object.defineProperty(o, k2, desc);
10
- }) : (function(o, m, k, k2) {
11
- if (k2 === undefined) k2 = k;
12
- o[k2] = m[k];
13
- }));
14
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
- Object.defineProperty(o, "default", { enumerable: true, value: v });
16
- }) : function(o, v) {
17
- o["default"] = v;
18
- });
19
- var __importStar = (this && this.__importStar) || function (mod) {
20
- if (mod && mod.__esModule) return mod;
21
- var result = {};
22
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
- __setModuleDefault(result, mod);
24
- return result;
25
- };
26
- Object.defineProperty(exports, "__esModule", { value: true });
27
- exports.SETTINGS_HELPER_PKG_ID = exports.CHROMIUM_WIN = exports.WEBVIEW_BASE = exports.WEBVIEW_WIN = exports.NATIVE_WIN = exports.webviewHelpers = exports.commonCapConstraints = exports.AndroidDriver = exports.androidCommands = exports.androidHelpers = void 0;
28
- const source_map_support_1 = require("source-map-support");
29
- (0, source_map_support_1.install)();
30
- const driver = __importStar(require("./lib/driver"));
31
- const androidHelperIndex = __importStar(require("./lib/android-helpers"));
32
- const commandIndex = __importStar(require("./lib/commands/index"));
33
- const webview = __importStar(require("./lib/webview-helpers"));
34
- const caps = __importStar(require("./lib/desired-caps"));
35
- const { AndroidDriver } = driver;
36
- exports.AndroidDriver = AndroidDriver;
37
- const { helpers: webviewHelpers, NATIVE_WIN, WEBVIEW_WIN, WEBVIEW_BASE, CHROMIUM_WIN } = webview;
38
- exports.webviewHelpers = webviewHelpers;
39
- exports.NATIVE_WIN = NATIVE_WIN;
40
- exports.WEBVIEW_WIN = WEBVIEW_WIN;
41
- exports.WEBVIEW_BASE = WEBVIEW_BASE;
42
- exports.CHROMIUM_WIN = CHROMIUM_WIN;
43
- const { commonCapConstraints } = caps;
44
- exports.commonCapConstraints = commonCapConstraints;
45
- const { commands: androidCommands } = commandIndex;
46
- exports.androidCommands = androidCommands;
47
- const { helpers: androidHelpers, SETTINGS_HELPER_PKG_ID } = androidHelperIndex;
48
- exports.androidHelpers = androidHelpers;
49
- exports.SETTINGS_HELPER_PKG_ID = SETTINGS_HELPER_PKG_ID;
50
- exports.default = AndroidDriver;
51
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2DAA2C;AAC3C,IAAA,4BAAO,GAAE,CAAC;AAEV,qDAAuC;AACvC,0EAA4D;AAC5D,mEAAqD;AACrD,+DAAiD;AACjD,yDAA2C;AAE3C,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAAC;AAUE,sCAAa;AAThD,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,WAAW,EAAE,YAAY,EAC9D,YAAY,EAAE,GAAG,OAAO,CAAC;AAST,wCAAc;AAAE,gCAAU;AAAE,kCAAW;AAC7D,oCAAY;AAAE,oCAAY;AAT5B,MAAM,EAAE,oBAAoB,EAAE,GAAG,IAAI,CAAC;AAQpC,oDAAoB;AAPtB,MAAM,EAAE,QAAQ,EAAE,eAAe,EAAE,GAAG,YAAY,CAAC;AAMjC,0CAAe;AALjC,MAAM,EAAE,OAAO,EAAE,cAAc,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAAC;AAK7E,wCAAc;AAEc,wDAAsB;AAJpD,kBAAe,aAAa,CAAC"}
@@ -1,136 +0,0 @@
1
- export default helpers;
2
- export namespace helpers {
3
- export function createBaseADB(opts?: {}): Promise<any>;
4
- export function prepareEmulator(adb: any, opts: any): Promise<void>;
5
- /**
6
- * Set and ensure the locale name of the device under test.
7
- *
8
- * @param {Object} adb - The adb module instance.
9
- * @param {string} language - Language. The language field is case insensitive, but Locale always canonicalizes to lower case.
10
- * format: [a-zA-Z]{2,8}. e.g. en, ja : https://developer.android.com/reference/java/util/Locale.html
11
- * @param {string} country - Country. The country (region) field is case insensitive, but Locale always canonicalizes to upper case.
12
- * format: [a-zA-Z]{2} | [0-9]{3}. e.g. US, JP : https://developer.android.com/reference/java/util/Locale.html
13
- * @param {?string} script - Script. The script field is case insensitive but Locale always canonicalizes to title case.
14
- * format: [a-zA-Z]{4}. e.g. Hans in zh-Hans-CN : https://developer.android.com/reference/java/util/Locale.html
15
- * @throws {Error} If it failed to set locale properly
16
- */
17
- export function ensureDeviceLocale(adb: any, language: string, country: string, script?: string | null): Promise<void>;
18
- export function getDeviceInfoFromCaps(opts?: {}): Promise<{
19
- udid: any;
20
- emPort: any;
21
- }>;
22
- export function createADB(opts?: {}): Promise<any>;
23
- export function validatePackageActivityNames(opts: any): void;
24
- export function getLaunchInfo(adb: any, opts: any): Promise<{
25
- appPackage: any;
26
- appWaitPackage: any;
27
- appActivity: any;
28
- appWaitActivity: any;
29
- } | undefined>;
30
- export function resetApp(adb: any, opts?: {}): Promise<void>;
31
- export function installApk(adb: any, opts?: {}): Promise<void>;
32
- /**
33
- * Installs an array of apks
34
- * @param {ADB} adb Instance of Appium ADB object
35
- * @param {Object} opts Opts defined in driver.js
36
- */
37
- export function installOtherApks(otherApps: any, adb: any, opts: any): Promise<void>;
38
- /**
39
- * Uninstall an array of packages
40
- * @param {ADB} adb Instance of Appium ADB object
41
- * @param {Array<string>} appPackages An array of package names to uninstall. If this includes `'*'`, uninstall all of 3rd party apps
42
- * @param {Array<string>} filterPackages An array of packages does not uninstall when `*` is provided as `appPackages`
43
- */
44
- export function uninstallOtherPackages(adb: any, appPackages: string[], filterPackages?: string[]): Promise<void>;
45
- /**
46
- * Get third party packages filtered with `filterPackages`
47
- * @param {ADB} adb Instance of Appium ADB object
48
- * @param {Array<string>} filterPackages An array of packages does not uninstall when `*` is provided as `appPackages`
49
- * @returns {Array<string>} An array of installed third pary packages
50
- */
51
- export function getThirdPartyPackages(adb: any, filterPackages?: string[]): string[];
52
- export function initUnicodeKeyboard(adb: any): Promise<any>;
53
- export function setMockLocationApp(adb: any, app: any): Promise<void>;
54
- export function resetMockLocation(adb: any): Promise<void>;
55
- export function installHelperApp(adb: any, apkPath: any, packageId: any): Promise<void>;
56
- /**
57
- * Pushes and installs io.appium.settings app.
58
- * Throws an error if the setting app is required
59
- *
60
- * @param {Adb} adb - The adb module instance.
61
- * @param {Object} opts - Driver options dictionary.
62
- * @param {boolean} throwError [false] - Whether throw an error if Settings app fails to start
63
- * @throws {Error} If throwError is true and something happens in installation step
64
- */
65
- export function pushSettingsApp(adb: Adb, throwError?: boolean, opts?: any): Promise<void>;
66
- /**
67
- * Extracts string.xml and converts it to string.json and pushes
68
- * it to /data/local/tmp/string.json on for use of bootstrap
69
- * If app is not present to extract string.xml it deletes remote strings.json
70
- * If app does not have strings.xml we push an empty json object to remote
71
- *
72
- * @param {?string} language - Language abbreviation, for example 'fr'. The default language
73
- * is used if this argument is not defined.
74
- * @param {Object} adb - The adb module instance.
75
- * @param {Object} opts - Driver options dictionary.
76
- * @returns {Object} The dictionary, where string resource identifiers are keys
77
- * along with their corresponding values for the given language or an empty object
78
- * if no matching resources were extracted.
79
- */
80
- export function pushStrings(language: string | null, adb: any, opts: any): any;
81
- export function unlock(driver: any, adb: any, capabilities: any): Promise<void>;
82
- export function verifyUnlock(adb: any, timeoutMs?: null): Promise<void>;
83
- export function initDevice(adb: any, opts: any): Promise<any>;
84
- export function removeNullProperties(obj: any): void;
85
- export function truncateDecimals(number: any, digits: any): number;
86
- export function isChromeBrowser(browser: any): boolean;
87
- export function getChromePkg(browser: any): any;
88
- export function removeAllSessionWebSocketHandlers(server: any, sessionId: any): Promise<void>;
89
- /**
90
- * Takes a desired capability and tries to JSON.parse it as an array,
91
- * and either returns the parsed array or a singleton array.
92
- *
93
- * @param {any} cap A desired capability
94
- */
95
- export function parseArray(cap: any): any[];
96
- /**
97
- * Validate desired capabilities. Returns true if capability is valid
98
- *
99
- * @param {*} cap A desired capability
100
- * @return {boolean} Returns true if the capability is valid
101
- * @throws {Error} If the caps has invalid capability
102
- */
103
- export function validateDesiredCaps(caps: any): boolean;
104
- /**
105
- * Adjust the capabilities for a browser session
106
- *
107
- * @param {Object} caps - Current capabilities object
108
- * !!! The object is mutated by this method call !!!
109
- * @returns {Object} The same possibly mutated `opts` instance.
110
- * No mutation is happening is the current session if
111
- * appPackage/appActivity caps have already been provided.
112
- */
113
- export function adjustBrowserSessionCaps(caps?: any): any;
114
- /**
115
- * Checks whether the current device under test is an emulator
116
- *
117
- * @param {ADB} adb - appium-adb instance
118
- * @param {Object} opts - driver options mapping
119
- * @returns {boolean} `true` if the device is an Android emulator
120
- */
121
- export function isEmulator(adb: any, opts: any): boolean;
122
- export { Bootstrap as bootstrap };
123
- export { unlocker };
124
- }
125
- export const SETTINGS_HELPER_PKG_ID: "io.appium.settings";
126
- export const APP_STATE: Readonly<{
127
- NOT_INSTALLED: 0;
128
- NOT_RUNNING: 1;
129
- RUNNING_IN_BACKGROUND: 3;
130
- RUNNING_IN_FOREGROUND: 4;
131
- }>;
132
- export function prepareAvdArgs(adb: any, opts: any): any[];
133
- export function ensureNetworkSpeed(adb: any, networkSpeed: any): any;
134
- import Bootstrap from './bootstrap';
135
- import { helpers as unlocker } from './unlock-helpers';
136
- //# sourceMappingURL=android-helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"android-helpers.d.ts","sourceRoot":"","sources":["../../lib/android-helpers.js"],"names":[],"mappings":";;IAiHA,uDAmCC;IAED,oEAuCC;IAED;;;;;;;;;;;OAWG;IACH,uHAaC;IAED;;;OA4FC;IAGD,mDASC;IAED,8DAeC;IAED;;;;;mBA8BC;IAED,6DAsDC;IAED,+DAsCC;IAED;;;;OAIG;IACH,qFAgBC;IAED;;;;;OAKG;IACH,kHAQC;IAED;;;;;OAKG;IACH,qFAUC;IAED,4DAYC;IAED,sEAiCC;IAED,2DA+BC;IAED,wFAQC;IAED;;;;;;;;OAQG;IACH,2FA0DC;IAED;;;;;;;;;;;;;OAaG;IACH,+EAiCC;IAED,gFAsCC;IAED,wEAUC;IAED,8DA6DC;IAED,qDAMC;IAED,mEAMC;IAED,uDAEC;IAED,gDAEC;IAED,8FASC;IAED;;;;;OAKG;IACH,4CAaC;IAED;;;;;;OAMG;IACH,wDAoBC;IAED;;;;;;;;OAQG;IACH,0DAmBC;IAED;;;;;;OAMG;IACH,yDAGC;;;;AA55BD,0DAAoD;AAKpD;;;;;GAKG;AAYH,2DAqBC;AA9BD,qEAOC;sBAlEqB,aAAa;oCAO5B,kBAAkB"}