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.
Files changed (151) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/build/index.js +43 -40
  3. package/build/lib/android-helpers.d.ts +136 -0
  4. package/build/lib/android-helpers.d.ts.map +1 -0
  5. package/build/lib/android-helpers.js +760 -679
  6. package/build/lib/android-helpers.js.map +1 -1
  7. package/build/lib/bootstrap.d.ts +29 -0
  8. package/build/lib/bootstrap.d.ts.map +1 -0
  9. package/build/lib/bootstrap.js +192 -179
  10. package/build/lib/bootstrap.js.map +1 -1
  11. package/build/lib/commands/actions.d.ts +209 -0
  12. package/build/lib/commands/actions.d.ts.map +1 -0
  13. package/build/lib/commands/actions.js +327 -265
  14. package/build/lib/commands/actions.js.map +1 -1
  15. package/build/lib/commands/alert.d.ts +10 -0
  16. package/build/lib/commands/alert.d.ts.map +1 -0
  17. package/build/lib/commands/alert.js +12 -18
  18. package/build/lib/commands/alert.js.map +1 -1
  19. package/build/lib/commands/app-management.d.ts +314 -0
  20. package/build/lib/commands/app-management.d.ts.map +1 -0
  21. package/build/lib/commands/app-management.js +278 -110
  22. package/build/lib/commands/app-management.js.map +1 -1
  23. package/build/lib/commands/context.d.ts +94 -0
  24. package/build/lib/commands/context.d.ts.map +1 -0
  25. package/build/lib/commands/context.js +412 -260
  26. package/build/lib/commands/context.js.map +1 -1
  27. package/build/lib/commands/coverage.d.ts +5 -0
  28. package/build/lib/commands/coverage.d.ts.map +1 -0
  29. package/build/lib/commands/coverage.js +14 -17
  30. package/build/lib/commands/coverage.js.map +1 -1
  31. package/build/lib/commands/element.d.ts +36 -0
  32. package/build/lib/commands/element.d.ts.map +1 -0
  33. package/build/lib/commands/element.js +97 -127
  34. package/build/lib/commands/element.js.map +1 -1
  35. package/build/lib/commands/emu-console.d.ts +49 -0
  36. package/build/lib/commands/emu-console.d.ts.map +1 -0
  37. package/build/lib/commands/emu-console.js +36 -25
  38. package/build/lib/commands/emu-console.js.map +1 -1
  39. package/build/lib/commands/execute.d.ts +6 -0
  40. package/build/lib/commands/execute.d.ts.map +1 -0
  41. package/build/lib/commands/execute.js +68 -69
  42. package/build/lib/commands/execute.js.map +1 -1
  43. package/build/lib/commands/file-actions.d.ts +129 -0
  44. package/build/lib/commands/file-actions.d.ts.map +1 -0
  45. package/build/lib/commands/file-actions.js +321 -178
  46. package/build/lib/commands/file-actions.js.map +1 -1
  47. package/build/lib/commands/find.d.ts +13 -0
  48. package/build/lib/commands/find.d.ts.map +1 -0
  49. package/build/lib/commands/find.js +69 -51
  50. package/build/lib/commands/find.js.map +1 -1
  51. package/build/lib/commands/general.d.ts +133 -0
  52. package/build/lib/commands/general.d.ts.map +1 -0
  53. package/build/lib/commands/general.js +275 -216
  54. package/build/lib/commands/general.js.map +1 -1
  55. package/build/lib/commands/ime.d.ts +11 -0
  56. package/build/lib/commands/ime.d.ts.map +1 -0
  57. package/build/lib/commands/ime.js +27 -33
  58. package/build/lib/commands/ime.js.map +1 -1
  59. package/build/lib/commands/index.d.ts +3 -0
  60. package/build/lib/commands/index.d.ts.map +1 -0
  61. package/build/lib/commands/index.js +32 -35
  62. package/build/lib/commands/index.js.map +1 -1
  63. package/build/lib/commands/intent.d.ts +418 -0
  64. package/build/lib/commands/intent.d.ts.map +1 -0
  65. package/build/lib/commands/intent.js +281 -151
  66. package/build/lib/commands/intent.js.map +1 -1
  67. package/build/lib/commands/keyboard.d.ts +6 -0
  68. package/build/lib/commands/keyboard.d.ts.map +1 -0
  69. package/build/lib/commands/keyboard.js +6 -14
  70. package/build/lib/commands/keyboard.js.map +1 -1
  71. package/build/lib/commands/log.d.ts +45 -0
  72. package/build/lib/commands/log.d.ts.map +1 -0
  73. package/build/lib/commands/log.js +117 -103
  74. package/build/lib/commands/log.js.map +1 -1
  75. package/build/lib/commands/media-projection.d.ts +144 -0
  76. package/build/lib/commands/media-projection.d.ts.map +1 -0
  77. package/build/lib/commands/media-projection.js +228 -171
  78. package/build/lib/commands/media-projection.js.map +1 -1
  79. package/build/lib/commands/network.d.ts +139 -0
  80. package/build/lib/commands/network.d.ts.map +1 -0
  81. package/build/lib/commands/network.js +249 -181
  82. package/build/lib/commands/network.js.map +1 -1
  83. package/build/lib/commands/performance.d.ts +101 -0
  84. package/build/lib/commands/performance.d.ts.map +1 -0
  85. package/build/lib/commands/performance.js +390 -236
  86. package/build/lib/commands/performance.js.map +1 -1
  87. package/build/lib/commands/permissions.d.ts +93 -0
  88. package/build/lib/commands/permissions.d.ts.map +1 -0
  89. package/build/lib/commands/permissions.js +133 -93
  90. package/build/lib/commands/permissions.js.map +1 -1
  91. package/build/lib/commands/recordscreen.d.ts +194 -0
  92. package/build/lib/commands/recordscreen.d.ts.map +1 -0
  93. package/build/lib/commands/recordscreen.js +293 -224
  94. package/build/lib/commands/recordscreen.js.map +1 -1
  95. package/build/lib/commands/shell.d.ts +8 -0
  96. package/build/lib/commands/shell.d.ts.map +1 -0
  97. package/build/lib/commands/shell.js +38 -43
  98. package/build/lib/commands/shell.js.map +1 -1
  99. package/build/lib/commands/streamscreen.d.ts +104 -0
  100. package/build/lib/commands/streamscreen.d.ts.map +1 -0
  101. package/build/lib/commands/streamscreen.js +364 -305
  102. package/build/lib/commands/streamscreen.js.map +1 -1
  103. package/build/lib/commands/system-bars.d.ts +100 -0
  104. package/build/lib/commands/system-bars.d.ts.map +1 -0
  105. package/build/lib/commands/system-bars.js +148 -90
  106. package/build/lib/commands/system-bars.js.map +1 -1
  107. package/build/lib/commands/touch.d.ts +30 -0
  108. package/build/lib/commands/touch.d.ts.map +1 -0
  109. package/build/lib/commands/touch.js +311 -287
  110. package/build/lib/commands/touch.js.map +1 -1
  111. package/build/lib/desired-caps.d.ts +353 -0
  112. package/build/lib/desired-caps.d.ts.map +1 -0
  113. package/build/lib/desired-caps.js +291 -292
  114. package/build/lib/desired-caps.js.map +1 -1
  115. package/build/lib/driver.d.ts +430 -0
  116. package/build/lib/driver.d.ts.map +1 -0
  117. package/build/lib/driver.js +449 -384
  118. package/build/lib/driver.js.map +1 -1
  119. package/build/lib/logger.d.ts +3 -0
  120. package/build/lib/logger.d.ts.map +1 -0
  121. package/build/lib/logger.js +5 -11
  122. package/build/lib/logger.js.map +1 -1
  123. package/build/lib/method-map.d.ts +389 -0
  124. package/build/lib/method-map.d.ts.map +1 -0
  125. package/build/lib/method-map.js +220 -394
  126. package/build/lib/method-map.js.map +1 -1
  127. package/build/lib/stubs.d.ts +8 -0
  128. package/build/lib/stubs.d.ts.map +1 -0
  129. package/build/lib/stubs.js +5 -0
  130. package/build/lib/stubs.js.map +1 -0
  131. package/build/lib/uiautomator.d.ts +24 -0
  132. package/build/lib/uiautomator.d.ts.map +1 -0
  133. package/build/lib/uiautomator.js +86 -82
  134. package/build/lib/uiautomator.js.map +1 -1
  135. package/build/lib/unlock-helpers.d.ts +38 -0
  136. package/build/lib/unlock-helpers.d.ts.map +1 -0
  137. package/build/lib/unlock-helpers.js +228 -204
  138. package/build/lib/unlock-helpers.js.map +1 -1
  139. package/build/lib/utils.d.ts +11 -0
  140. package/build/lib/utils.d.ts.map +1 -0
  141. package/build/lib/utils.js +23 -18
  142. package/build/lib/utils.js.map +1 -1
  143. package/build/lib/webview-helpers.d.ts +223 -0
  144. package/build/lib/webview-helpers.d.ts.map +1 -0
  145. package/build/lib/webview-helpers.js +476 -298
  146. package/build/lib/webview-helpers.js.map +1 -1
  147. package/index.js +3 -1
  148. package/lib/android-helpers.js +2 -1
  149. package/lib/stubs.ts +8 -0
  150. package/lib/unlock-helpers.js +2 -2
  151. 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"}