appium-android-driver 5.13.1 → 5.13.2
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 +7 -0
- package/build/index.js +43 -40
- package/build/lib/android-helpers.d.ts +136 -0
- package/build/lib/android-helpers.d.ts.map +1 -0
- package/build/lib/android-helpers.js +760 -679
- package/build/lib/android-helpers.js.map +1 -1
- package/build/lib/bootstrap.d.ts +29 -0
- package/build/lib/bootstrap.d.ts.map +1 -0
- package/build/lib/bootstrap.js +192 -179
- package/build/lib/bootstrap.js.map +1 -1
- package/build/lib/commands/actions.d.ts +209 -0
- package/build/lib/commands/actions.d.ts.map +1 -0
- package/build/lib/commands/actions.js +327 -265
- package/build/lib/commands/actions.js.map +1 -1
- package/build/lib/commands/alert.d.ts +10 -0
- package/build/lib/commands/alert.d.ts.map +1 -0
- package/build/lib/commands/alert.js +12 -18
- package/build/lib/commands/alert.js.map +1 -1
- package/build/lib/commands/app-management.d.ts +314 -0
- package/build/lib/commands/app-management.d.ts.map +1 -0
- package/build/lib/commands/app-management.js +278 -110
- package/build/lib/commands/app-management.js.map +1 -1
- package/build/lib/commands/context.d.ts +94 -0
- package/build/lib/commands/context.d.ts.map +1 -0
- package/build/lib/commands/context.js +412 -260
- package/build/lib/commands/context.js.map +1 -1
- package/build/lib/commands/coverage.d.ts +5 -0
- package/build/lib/commands/coverage.d.ts.map +1 -0
- package/build/lib/commands/coverage.js +14 -17
- package/build/lib/commands/coverage.js.map +1 -1
- package/build/lib/commands/element.d.ts +36 -0
- package/build/lib/commands/element.d.ts.map +1 -0
- package/build/lib/commands/element.js +97 -127
- package/build/lib/commands/element.js.map +1 -1
- package/build/lib/commands/emu-console.d.ts +49 -0
- package/build/lib/commands/emu-console.d.ts.map +1 -0
- package/build/lib/commands/emu-console.js +36 -25
- package/build/lib/commands/emu-console.js.map +1 -1
- package/build/lib/commands/execute.d.ts +6 -0
- package/build/lib/commands/execute.d.ts.map +1 -0
- package/build/lib/commands/execute.js +68 -69
- package/build/lib/commands/execute.js.map +1 -1
- package/build/lib/commands/file-actions.d.ts +129 -0
- package/build/lib/commands/file-actions.d.ts.map +1 -0
- package/build/lib/commands/file-actions.js +321 -178
- package/build/lib/commands/file-actions.js.map +1 -1
- package/build/lib/commands/find.d.ts +13 -0
- package/build/lib/commands/find.d.ts.map +1 -0
- package/build/lib/commands/find.js +69 -51
- package/build/lib/commands/find.js.map +1 -1
- package/build/lib/commands/general.d.ts +133 -0
- package/build/lib/commands/general.d.ts.map +1 -0
- package/build/lib/commands/general.js +275 -216
- package/build/lib/commands/general.js.map +1 -1
- package/build/lib/commands/ime.d.ts +11 -0
- package/build/lib/commands/ime.d.ts.map +1 -0
- package/build/lib/commands/ime.js +27 -33
- package/build/lib/commands/ime.js.map +1 -1
- package/build/lib/commands/index.d.ts +3 -0
- package/build/lib/commands/index.d.ts.map +1 -0
- package/build/lib/commands/index.js +32 -35
- package/build/lib/commands/index.js.map +1 -1
- package/build/lib/commands/intent.d.ts +418 -0
- package/build/lib/commands/intent.d.ts.map +1 -0
- package/build/lib/commands/intent.js +281 -151
- package/build/lib/commands/intent.js.map +1 -1
- package/build/lib/commands/keyboard.d.ts +6 -0
- package/build/lib/commands/keyboard.d.ts.map +1 -0
- package/build/lib/commands/keyboard.js +6 -14
- package/build/lib/commands/keyboard.js.map +1 -1
- package/build/lib/commands/log.d.ts +45 -0
- package/build/lib/commands/log.d.ts.map +1 -0
- package/build/lib/commands/log.js +117 -103
- package/build/lib/commands/log.js.map +1 -1
- package/build/lib/commands/media-projection.d.ts +144 -0
- package/build/lib/commands/media-projection.d.ts.map +1 -0
- package/build/lib/commands/media-projection.js +228 -171
- package/build/lib/commands/media-projection.js.map +1 -1
- package/build/lib/commands/network.d.ts +139 -0
- package/build/lib/commands/network.d.ts.map +1 -0
- package/build/lib/commands/network.js +249 -181
- package/build/lib/commands/network.js.map +1 -1
- package/build/lib/commands/performance.d.ts +101 -0
- package/build/lib/commands/performance.d.ts.map +1 -0
- package/build/lib/commands/performance.js +390 -236
- package/build/lib/commands/performance.js.map +1 -1
- package/build/lib/commands/permissions.d.ts +93 -0
- package/build/lib/commands/permissions.d.ts.map +1 -0
- package/build/lib/commands/permissions.js +133 -93
- package/build/lib/commands/permissions.js.map +1 -1
- package/build/lib/commands/recordscreen.d.ts +194 -0
- package/build/lib/commands/recordscreen.d.ts.map +1 -0
- package/build/lib/commands/recordscreen.js +293 -224
- package/build/lib/commands/recordscreen.js.map +1 -1
- package/build/lib/commands/shell.d.ts +8 -0
- package/build/lib/commands/shell.d.ts.map +1 -0
- package/build/lib/commands/shell.js +38 -43
- package/build/lib/commands/shell.js.map +1 -1
- package/build/lib/commands/streamscreen.d.ts +104 -0
- package/build/lib/commands/streamscreen.d.ts.map +1 -0
- package/build/lib/commands/streamscreen.js +364 -305
- package/build/lib/commands/streamscreen.js.map +1 -1
- package/build/lib/commands/system-bars.d.ts +100 -0
- package/build/lib/commands/system-bars.d.ts.map +1 -0
- package/build/lib/commands/system-bars.js +148 -90
- package/build/lib/commands/system-bars.js.map +1 -1
- package/build/lib/commands/touch.d.ts +30 -0
- package/build/lib/commands/touch.d.ts.map +1 -0
- package/build/lib/commands/touch.js +311 -287
- package/build/lib/commands/touch.js.map +1 -1
- package/build/lib/desired-caps.d.ts +353 -0
- package/build/lib/desired-caps.d.ts.map +1 -0
- package/build/lib/desired-caps.js +291 -292
- package/build/lib/desired-caps.js.map +1 -1
- package/build/lib/driver.d.ts +430 -0
- package/build/lib/driver.d.ts.map +1 -0
- package/build/lib/driver.js +449 -384
- package/build/lib/driver.js.map +1 -1
- package/build/lib/logger.d.ts +3 -0
- package/build/lib/logger.d.ts.map +1 -0
- package/build/lib/logger.js +5 -11
- package/build/lib/logger.js.map +1 -1
- package/build/lib/method-map.d.ts +389 -0
- package/build/lib/method-map.d.ts.map +1 -0
- package/build/lib/method-map.js +220 -394
- package/build/lib/method-map.js.map +1 -1
- package/build/lib/stubs.d.ts +8 -0
- package/build/lib/stubs.d.ts.map +1 -0
- package/build/lib/stubs.js +5 -0
- package/build/lib/stubs.js.map +1 -0
- package/build/lib/uiautomator.d.ts +24 -0
- package/build/lib/uiautomator.d.ts.map +1 -0
- package/build/lib/uiautomator.js +86 -82
- package/build/lib/uiautomator.js.map +1 -1
- package/build/lib/unlock-helpers.d.ts +38 -0
- package/build/lib/unlock-helpers.d.ts.map +1 -0
- package/build/lib/unlock-helpers.js +228 -204
- package/build/lib/unlock-helpers.js.map +1 -1
- package/build/lib/utils.d.ts +11 -0
- package/build/lib/utils.d.ts.map +1 -0
- package/build/lib/utils.js +23 -18
- package/build/lib/utils.js.map +1 -1
- package/build/lib/webview-helpers.d.ts +223 -0
- package/build/lib/webview-helpers.d.ts.map +1 -0
- package/build/lib/webview-helpers.js +476 -298
- package/build/lib/webview-helpers.js.map +1 -1
- package/index.js +3 -1
- package/lib/android-helpers.js +2 -1
- package/lib/stubs.ts +8 -0
- package/lib/unlock-helpers.js +2 -2
- package/package.json +23 -14
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
export default extensions;
|
|
2
|
+
export type SetConnectivityOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Either to enable or disable Wi-Fi.
|
|
5
|
+
* An unset value means to not change the state for the given service.
|
|
6
|
+
*/
|
|
7
|
+
wifi: boolean | null;
|
|
8
|
+
/**
|
|
9
|
+
* Either to enable or disable mobile data connection.
|
|
10
|
+
* An unset value means to not change the state for the given service.
|
|
11
|
+
*/
|
|
12
|
+
data: boolean | null;
|
|
13
|
+
/**
|
|
14
|
+
* Either to enable to disable the Airplane Mode
|
|
15
|
+
* An unset value means to not change the state for the given service.
|
|
16
|
+
*/
|
|
17
|
+
airplaneMode: boolean | null;
|
|
18
|
+
};
|
|
19
|
+
export type GetConnectivityResult = {
|
|
20
|
+
/**
|
|
21
|
+
* True if wifi is enabled
|
|
22
|
+
*/
|
|
23
|
+
wifi: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* True if mobile data connection is enabled
|
|
26
|
+
*/
|
|
27
|
+
data: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* True if Airplane Mode is enabled
|
|
30
|
+
*/
|
|
31
|
+
airplaneMode: boolean;
|
|
32
|
+
};
|
|
33
|
+
export type GetConnectivityOptions = {
|
|
34
|
+
/**
|
|
35
|
+
* one or more services to get the connectivity for.
|
|
36
|
+
* Supported service names are: wifi, data, airplaneMode.
|
|
37
|
+
*/
|
|
38
|
+
services: string[] | (string | null);
|
|
39
|
+
};
|
|
40
|
+
export type GpsCacheRefreshOptions = {
|
|
41
|
+
/**
|
|
42
|
+
* [20000] The maximum number of milliseconds
|
|
43
|
+
* to block until GPS cache is refreshed. Providing zero or a negative
|
|
44
|
+
* value to it skips waiting completely.
|
|
45
|
+
*/
|
|
46
|
+
timeoutMs: number;
|
|
47
|
+
};
|
|
48
|
+
export namespace commands {
|
|
49
|
+
function getNetworkConnection(): Promise<number>;
|
|
50
|
+
/**
|
|
51
|
+
* decoupling to override the behaviour in other drivers like UiAutomator2.
|
|
52
|
+
*/
|
|
53
|
+
function isWifiOn(): Promise<any>;
|
|
54
|
+
/**
|
|
55
|
+
* @typedef {Object} SetConnectivityOptions
|
|
56
|
+
* @property {boolean?} wifi Either to enable or disable Wi-Fi.
|
|
57
|
+
* An unset value means to not change the state for the given service.
|
|
58
|
+
* @property {boolean?} data Either to enable or disable mobile data connection.
|
|
59
|
+
* An unset value means to not change the state for the given service.
|
|
60
|
+
* @property {boolean?} airplaneMode Either to enable to disable the Airplane Mode
|
|
61
|
+
* An unset value means to not change the state for the given service.
|
|
62
|
+
*/
|
|
63
|
+
/**
|
|
64
|
+
* Set the connectivity state for different services
|
|
65
|
+
*
|
|
66
|
+
* @param {SetConnectivityOptions} opts
|
|
67
|
+
* @throws {Error} If none of known properties were provided or there was an error
|
|
68
|
+
* while changing connectivity states
|
|
69
|
+
*/
|
|
70
|
+
function mobileSetConnectivity(opts?: SetConnectivityOptions): Promise<void>;
|
|
71
|
+
/**
|
|
72
|
+
* @typedef {Object} GetConnectivityResult
|
|
73
|
+
* @property {boolean} wifi True if wifi is enabled
|
|
74
|
+
* @property {boolean} data True if mobile data connection is enabled
|
|
75
|
+
* @property {boolean} airplaneMode True if Airplane Mode is enabled
|
|
76
|
+
*/
|
|
77
|
+
/**
|
|
78
|
+
* @typedef {Object} GetConnectivityOptions
|
|
79
|
+
* @property {string[]|string?} services one or more services to get the connectivity for.
|
|
80
|
+
* Supported service names are: wifi, data, airplaneMode.
|
|
81
|
+
*/
|
|
82
|
+
/**
|
|
83
|
+
* Retrieves the connectivity properties from the device under test
|
|
84
|
+
*
|
|
85
|
+
* @param {GetConnectivityOptions?} opts If no service names are provided then the
|
|
86
|
+
* connectivity state is returned for all of them.
|
|
87
|
+
* @returns {GetConnectivityResult}
|
|
88
|
+
*/
|
|
89
|
+
function mobileGetConnectivity(opts?: GetConnectivityOptions | null): GetConnectivityResult;
|
|
90
|
+
function setNetworkConnection(type: any): Promise<number>;
|
|
91
|
+
/**
|
|
92
|
+
* decoupling to override behaviour in other drivers like UiAutomator2.
|
|
93
|
+
*/
|
|
94
|
+
function setWifiState(wifi: any): Promise<void>;
|
|
95
|
+
function toggleData(): Promise<void>;
|
|
96
|
+
function toggleWiFi(): Promise<void>;
|
|
97
|
+
function toggleFlightMode(): Promise<void>;
|
|
98
|
+
function setGeoLocation(location: any): Promise<{
|
|
99
|
+
latitude: number;
|
|
100
|
+
longitude: number;
|
|
101
|
+
altitude: number;
|
|
102
|
+
}>;
|
|
103
|
+
/**
|
|
104
|
+
* @typedef {Object} GpsCacheRefreshOptions
|
|
105
|
+
* @property {number} timeoutMs [20000] The maximum number of milliseconds
|
|
106
|
+
* to block until GPS cache is refreshed. Providing zero or a negative
|
|
107
|
+
* value to it skips waiting completely.
|
|
108
|
+
*/
|
|
109
|
+
/**
|
|
110
|
+
* Sends an async request to refresh the GPS cache.
|
|
111
|
+
* This feature only works if the device under test has
|
|
112
|
+
* Google Play Services installed. In case the vanilla
|
|
113
|
+
* LocationManager is used the device API level must be at
|
|
114
|
+
* version 30 (Android R) or higher.
|
|
115
|
+
*
|
|
116
|
+
* @param {GpsCacheRefreshOptions} opts
|
|
117
|
+
*/
|
|
118
|
+
function mobileRefreshGpsCache(opts?: GpsCacheRefreshOptions): Promise<void>;
|
|
119
|
+
function getGeoLocation(): Promise<{
|
|
120
|
+
latitude: number;
|
|
121
|
+
longitude: number;
|
|
122
|
+
altitude: number;
|
|
123
|
+
}>;
|
|
124
|
+
/**
|
|
125
|
+
* Checks if GPS is enabled
|
|
126
|
+
*
|
|
127
|
+
* @returns {Promise<Boolean>} True if yes
|
|
128
|
+
*/
|
|
129
|
+
function isLocationServicesEnabled(): Promise<boolean>;
|
|
130
|
+
/**
|
|
131
|
+
* Toggles GPS state
|
|
132
|
+
*/
|
|
133
|
+
function toggleLocationServices(): Promise<void>;
|
|
134
|
+
}
|
|
135
|
+
export namespace helpers {
|
|
136
|
+
function wrapBootstrapDisconnect(wrapped: any): Promise<any>;
|
|
137
|
+
}
|
|
138
|
+
declare let extensions: {};
|
|
139
|
+
//# sourceMappingURL=network.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../lib/commands/network.js"],"names":[],"mappings":";;;;;;UA8Cc,OAAO;;;;;UAEP,OAAO;;;;;kBAEP,OAAO;;;;;;UAqDP,OAAO;;;;UACP,OAAO;;;;kBACP,OAAO;;;;;;;cAKP,MAAM,EAAE,IAAC,MAAM,QAAC;;;;;;;;eAuJhB,MAAM;;;IAhPpB,iDAcC;IAED;;OAEG;IACH,kCAEC;IAED;;;;;;;;OAQG;IAEH;;;;;;OAMG;IACH,6EAsCC;IAED;;;;;OAKG;IAEH;;;;OAIG;IAEH;;;;;;OAMG;IACH,4FAyBC;IAED,0DAsDC;IAED;;OAEG;IACH,gDAEC;IAED,qCAMC;IAED,qCAMC;IAED,2CAeC;IAED;;;;OAaC;IAED;;;;;OAKG;IAEH;;;;;;;;OAQG;IACH,6EAGC;IAED;;;;OAOC;IAED;;;;OAIG;IACH,uDAEC;IAED;;OAEG;IACH,iDAQC;;;IAED,6DAaC;;AA/TgC,2BAAe"}
|