appium-uiautomator2-driver 6.7.6 → 6.7.8

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 (91) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/actions.d.ts +26 -29
  3. package/build/lib/commands/actions.d.ts.map +1 -1
  4. package/build/lib/commands/actions.js +19 -27
  5. package/build/lib/commands/actions.js.map +1 -1
  6. package/build/lib/commands/alert.d.ts +14 -22
  7. package/build/lib/commands/alert.d.ts.map +1 -1
  8. package/build/lib/commands/alert.js +8 -19
  9. package/build/lib/commands/alert.js.map +1 -1
  10. package/build/lib/commands/app-management.d.ts +7 -10
  11. package/build/lib/commands/app-management.d.ts.map +1 -1
  12. package/build/lib/commands/app-management.js +4 -14
  13. package/build/lib/commands/app-management.js.map +1 -1
  14. package/build/lib/commands/battery.d.ts +4 -5
  15. package/build/lib/commands/battery.d.ts.map +1 -1
  16. package/build/lib/commands/battery.js +4 -9
  17. package/build/lib/commands/battery.js.map +1 -1
  18. package/build/lib/commands/clipboard.d.ts +9 -13
  19. package/build/lib/commands/clipboard.d.ts.map +1 -1
  20. package/build/lib/commands/clipboard.js +7 -14
  21. package/build/lib/commands/clipboard.js.map +1 -1
  22. package/build/lib/commands/element.d.ts +29 -0
  23. package/build/lib/commands/element.d.ts.map +1 -1
  24. package/build/lib/commands/element.js +29 -0
  25. package/build/lib/commands/element.js.map +1 -1
  26. package/build/lib/commands/find.d.ts +13 -9
  27. package/build/lib/commands/find.d.ts.map +1 -1
  28. package/build/lib/commands/find.js +4 -16
  29. package/build/lib/commands/find.js.map +1 -1
  30. package/build/lib/commands/gestures.d.ts +63 -0
  31. package/build/lib/commands/gestures.d.ts.map +1 -1
  32. package/build/lib/commands/gestures.js +63 -0
  33. package/build/lib/commands/gestures.js.map +1 -1
  34. package/build/lib/commands/keyboard.d.ts +30 -41
  35. package/build/lib/commands/keyboard.d.ts.map +1 -1
  36. package/build/lib/commands/keyboard.js +22 -37
  37. package/build/lib/commands/keyboard.js.map +1 -1
  38. package/build/lib/commands/misc.d.ts +4 -0
  39. package/build/lib/commands/misc.d.ts.map +1 -1
  40. package/build/lib/commands/misc.js +4 -0
  41. package/build/lib/commands/misc.js.map +1 -1
  42. package/build/lib/commands/navigation.d.ts +11 -16
  43. package/build/lib/commands/navigation.d.ts.map +1 -1
  44. package/build/lib/commands/navigation.js +9 -17
  45. package/build/lib/commands/navigation.js.map +1 -1
  46. package/build/lib/commands/viewport.d.ts +23 -22
  47. package/build/lib/commands/viewport.d.ts.map +1 -1
  48. package/build/lib/commands/viewport.js +17 -24
  49. package/build/lib/commands/viewport.js.map +1 -1
  50. package/build/lib/doctor/optional-checks.d.ts +4 -4
  51. package/build/lib/doctor/optional-checks.d.ts.map +1 -1
  52. package/build/lib/doctor/optional-checks.js.map +1 -1
  53. package/build/lib/doctor/required-checks.d.ts +5 -21
  54. package/build/lib/doctor/required-checks.d.ts.map +1 -1
  55. package/build/lib/doctor/required-checks.js.map +1 -1
  56. package/build/lib/index.d.ts +4 -0
  57. package/build/lib/index.d.ts.map +1 -0
  58. package/build/{index.js → lib/index.js} +1 -1
  59. package/build/lib/index.js.map +1 -0
  60. package/build/tsconfig.tsbuildinfo +1 -1
  61. package/lib/commands/actions.ts +95 -0
  62. package/lib/commands/alert.ts +46 -0
  63. package/lib/commands/app-management.ts +25 -0
  64. package/lib/commands/battery.ts +19 -0
  65. package/lib/commands/clipboard.ts +29 -0
  66. package/lib/commands/element.ts +29 -0
  67. package/lib/commands/find.ts +48 -0
  68. package/lib/commands/gestures.ts +63 -0
  69. package/lib/commands/keyboard.ts +102 -0
  70. package/lib/commands/misc.ts +4 -0
  71. package/lib/commands/navigation.ts +32 -0
  72. package/lib/commands/viewport.ts +78 -0
  73. package/lib/doctor/optional-checks.ts +7 -0
  74. package/lib/doctor/required-checks.ts +8 -0
  75. package/{index.js → lib/index.ts} +2 -1
  76. package/npm-shrinkwrap.json +2 -2
  77. package/package.json +3 -7
  78. package/build/index.d.ts +0 -4
  79. package/build/index.d.ts.map +0 -1
  80. package/build/index.js.map +0 -1
  81. package/lib/commands/actions.js +0 -107
  82. package/lib/commands/alert.js +0 -63
  83. package/lib/commands/app-management.js +0 -32
  84. package/lib/commands/battery.js +0 -23
  85. package/lib/commands/clipboard.js +0 -37
  86. package/lib/commands/find.js +0 -47
  87. package/lib/commands/keyboard.js +0 -108
  88. package/lib/commands/navigation.js +0 -33
  89. package/lib/commands/viewport.js +0 -100
  90. package/lib/doctor/optional-checks.js +0 -5
  91. package/lib/doctor/required-checks.js +0 -6
@@ -12,11 +12,10 @@ exports.keyevent = keyevent;
12
12
  const driver_1 = require("appium/driver");
13
13
  const lodash_1 = __importDefault(require("lodash"));
14
14
  /**
15
- * @this {AndroidUiautomator2Driver}
16
- * @param {string|number} keycode
17
- * @param {number} [metastate]
18
- * @param {number} [flags]
19
- * @returns {Promise<void>}
15
+ * Presses a key code with optional metastate and flags.
16
+ * @param keycode - Android key code to press.
17
+ * @param metastate - Optional meta state modifier keys.
18
+ * @param flags - Optional flags for the key event.
20
19
  */
21
20
  async function pressKeyCode(keycode, metastate, flags) {
22
21
  await this.uiautomator2.jwproxy.command('/appium/device/press_keycode', 'POST', {
@@ -26,11 +25,10 @@ async function pressKeyCode(keycode, metastate, flags) {
26
25
  });
27
26
  }
28
27
  /**
29
- * @this {AndroidUiautomator2Driver}
30
- * @param {string|number} keycode
31
- * @param {number} metastate
32
- * @param {number} [flags]
33
- * @returns {Promise<void>}
28
+ * Long presses a key code with optional metastate and flags.
29
+ * @param keycode - Android key code to long press.
30
+ * @param metastate - Meta state modifier keys.
31
+ * @param flags - Optional flags for the key event.
34
32
  */
35
33
  async function longPressKeyCode(keycode, metastate, flags) {
36
34
  await this.uiautomator2.jwproxy.command('/appium/device/long_press_keycode', 'POST', {
@@ -40,15 +38,11 @@ async function longPressKeyCode(keycode, metastate, flags) {
40
38
  });
41
39
  }
42
40
  /**
43
- * @this {AndroidUiautomator2Driver}
44
- * @param {number} keycode A valid Android key code. See https://developer.android.com/reference/android/view/KeyEvent
45
- * for the list of available key codes.
46
- * @param {number} [metastate] An integer in which each bit set to 1 represents a pressed meta key. See
47
- * https://developer.android.com/reference/android/view/KeyEvent for more details.
48
- * @param {string} [flags] Flags for the particular key event. See
49
- * https://developer.android.com/reference/android/view/KeyEvent for more details.
50
- * @param {boolean} [isLongPress=false] Whether to emulate long key press
51
- * @returns {Promise<void>}
41
+ * Presses a key code with optional metastate, flags, and long press support.
42
+ * @param keycode - Android key code to press.
43
+ * @param metastate - Optional meta state modifier keys.
44
+ * @param flags - Optional flags for the key event.
45
+ * @param isLongPress - Whether to perform a long press. Defaults to false.
52
46
  */
53
47
  async function mobilePressKey(keycode, metastate, flags, isLongPress = false) {
54
48
  await this.uiautomator2.jwproxy.command(`/appium/device/${isLongPress ? 'long_' : ''}press_keycode`, 'POST', {
@@ -58,14 +52,10 @@ async function mobilePressKey(keycode, metastate, flags, isLongPress = false) {
58
52
  });
59
53
  }
60
54
  /**
61
- * Types the given Unicode string.
62
- * It is expected that the focus is already put
63
- * to the destination input field before this method is called.
64
- *
65
- * @this {AndroidUiautomator2Driver}
66
- * @param {string | number | boolean} text The text to type. Can be a string, number or boolean.
67
- * @returns {Promise<boolean>} `true` if the input text has been successfully sent to adb
68
- * @throws {Error} if `text` property has not been provided
55
+ * Types the given Unicode string. The focus should already be on the destination input field.
56
+ * @param text - Text to type. Can be a string, number, or boolean.
57
+ * @returns True if the input text has been successfully sent to adb.
58
+ * @throws {errors.InvalidArgumentError} If the text argument is not provided.
69
59
  */
70
60
  async function mobileType(text) {
71
61
  if (lodash_1.default.isUndefined(text)) {
@@ -74,24 +64,19 @@ async function mobileType(text) {
74
64
  return await this.settingsApp.typeUnicode(String(text));
75
65
  }
76
66
  /**
77
- * @this {AndroidUiautomator2Driver}
78
- * @param {import('appium-android-driver').SendKeysOpts} params
79
- * @returns {Promise<void>}
67
+ * Sends keys to the current element.
68
+ * @param params - Options containing the text to send and optional replace flag.
80
69
  */
81
70
  async function doSendKeys(params) {
82
71
  await this.uiautomator2.jwproxy.command('/keys', 'POST', params);
83
72
  }
84
73
  /**
85
- * @this {AndroidUiautomator2Driver}
86
- * @param {string|number} keycode
87
- * @param {number} [metastate]
88
- * @returns {Promise<void>}
74
+ * Sends a key event to the device.
75
+ * @param keycode - Android key code to send.
76
+ * @param metastate - Optional meta state (ignored in this implementation).
89
77
  */
90
78
  async function keyevent(keycode, metastate) {
91
79
  this.log.debug(`Ignoring metastate ${metastate}`);
92
80
  await this.adb.keyevent(keycode);
93
81
  }
94
- /**
95
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
96
- */
97
82
  //# sourceMappingURL=keyboard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../../lib/commands/keyboard.js"],"names":[],"mappings":";;;;;AAUA,oCAUC;AASD,4CAUC;AAaD,wCAUC;AAYD,gCAKC;AAOD,gCAMC;AAQD,4BAGC;AAvGD,0CAAuC;AACvC,oDAAuB;AAEvB;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK;IAC1D,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,8BAA8B,EAC9B,MAAM,EACN;QACE,OAAO;QACP,SAAS;QACT,KAAK;KACN,CACF,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,gBAAgB,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK;IAC9D,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,mCAAmC,EACnC,MAAM,EACN;QACE,OAAO;QACP,SAAS;QACT,KAAK;KACN,CACF,CAAC;AACJ,CAAC;AAED;;;;;;;;;;GAUG;AACI,KAAK,UAAU,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,WAAW,GAAG,KAAK;IACjF,MA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GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC"}
@@ -2,14 +2,17 @@ import type { Orientation, StringRecord } from '@appium/types';
2
2
  import type { AndroidUiautomator2Driver } from '../driver';
3
3
  /**
4
4
  * Retrieves the current page source.
5
+ * @returns The XML page source of the current screen.
5
6
  */
6
7
  export declare function getPageSource(this: AndroidUiautomator2Driver): Promise<string>;
7
8
  /**
8
9
  * Gets the current device orientation.
10
+ * @returns The current device orientation ('LANDSCAPE' or 'PORTRAIT').
9
11
  */
10
12
  export declare function getOrientation(this: AndroidUiautomator2Driver): Promise<Orientation>;
11
13
  /**
12
14
  * Sets the device orientation.
15
+ * @param orientation - The desired orientation ('LANDSCAPE' or 'PORTRAIT').
13
16
  */
14
17
  export declare function setOrientation(this: AndroidUiautomator2Driver, orientation: Orientation): Promise<void>;
15
18
  /**
@@ -22,6 +25,7 @@ export declare function openNotifications(this: AndroidUiautomator2Driver): Prom
22
25
  export declare function suspendChromedriverProxy(this: AndroidUiautomator2Driver): void;
23
26
  /**
24
27
  * Retrieves device info via the UIA2 server.
28
+ * @returns Device information as a string record.
25
29
  */
26
30
  export declare function mobileGetDeviceInfo(this: AndroidUiautomator2Driver): Promise<StringRecord>;
27
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"misc.d.ts","sourceRoot":"","sources":["../../../lib/commands/misc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AAEzD;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAEpF;AAED;;GAEG;AACH,wBAAsB,cAAc,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,WAAW,CAAC,CAE1F;AAED;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,yBA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;;GAEG;AACH,wBAAsB,6BAA6B,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAElG"}
@@ -9,18 +9,21 @@ exports.mobileGetDeviceInfo = mobileGetDeviceInfo;
9
9
  exports.mobileResetAccessibilityCache = mobileResetAccessibilityCache;
10
10
  /**
11
11
  * Retrieves the current page source.
12
+ * @returns The XML page source of the current screen.
12
13
  */
13
14
  async function getPageSource() {
14
15
  return String(await this.uiautomator2.jwproxy.command('/source', 'GET', {}));
15
16
  }
16
17
  /**
17
18
  * Gets the current device orientation.
19
+ * @returns The current device orientation ('LANDSCAPE' or 'PORTRAIT').
18
20
  */
19
21
  async function getOrientation() {
20
22
  return (await this.uiautomator2.jwproxy.command(`/orientation`, 'GET', {}));
21
23
  }
22
24
  /**
23
25
  * Sets the device orientation.
26
+ * @param orientation - The desired orientation ('LANDSCAPE' or 'PORTRAIT').
24
27
  */
25
28
  async function setOrientation(orientation) {
26
29
  const normalizedOrientation = orientation.toUpperCase();
@@ -46,6 +49,7 @@ function suspendChromedriverProxy() {
46
49
  }
47
50
  /**
48
51
  * Retrieves device info via the UIA2 server.
52
+ * @returns Device information as a string record.
49
53
  */
50
54
  async function mobileGetDeviceInfo() {
51
55
  return (await this.uiautomator2.jwproxy.command('/appium/device/info', 'GET'));
@@ -1 +1 @@
1
- {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../lib/commands/misc.ts"],"names":[],"mappings":";;AAMA,sCAEC;AAKD,wCAEC;AAKD,wCAMC;AAKD,8CAEC;AAKD,4DASC;AAKD,kDAEC;AAKD,sEAEC;AA1DD;;GAEG;AACI,KAAK,UAAU,aAAa;IACjC,OAAO,MAAM,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,cAAc;IAClC,OAAO,CAAC,MAAM,IAA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AAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IACzE,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3E,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;AAC7B,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,mBAAmB;IACvC,OAAO,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,qBAAqB,EAAE,KAAK,CAAC,CAAiB,CAAC;AACjG,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,6BAA6B;IACjD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,wBAAwB,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC;AAChF,CAAC"}
@@ -1,23 +1,18 @@
1
+ import type { AndroidUiautomator2Driver } from '../driver';
1
2
  /**
2
- * @this {AndroidUiautomator2Driver}
3
- * @param {string} url
4
- * @returns {Promise<void>}
3
+ * Sets the URL for the current app.
4
+ * @param url - The URL to navigate to.
5
5
  */
6
- export function setUrl(this: import("../driver").AndroidUiautomator2Driver, url: string): Promise<void>;
6
+ export declare function setUrl(this: AndroidUiautomator2Driver, url: string): Promise<void>;
7
7
  /**
8
- * Start URL that take users directly to specific content in the app
9
- * @this {AndroidUiautomator2Driver}
10
- * @param {string} url The name of URL to start.
11
- * @param {string} [pkg] The name of the package to start the URI with.
12
- * @param {boolean} [waitForLaunch=true] If `false` then adb won't wait for
13
- * the started activity to return the control.
14
- * @returns {Promise<void>}
8
+ * Starts a URL that takes users directly to specific content in the app.
9
+ * @param url - The deep link URL to start.
10
+ * @param pkg - Optional package name to start the URI with. If not provided, uses the current app package.
11
+ * @param waitForLaunch - If false, adb won't wait for the started activity to return control. Defaults to true.
15
12
  */
16
- export function mobileDeepLink(this: import("../driver").AndroidUiautomator2Driver, url: string, pkg?: string, waitForLaunch?: boolean): Promise<void>;
13
+ export declare function mobileDeepLink(this: AndroidUiautomator2Driver, url: string, pkg?: string, waitForLaunch?: boolean): Promise<void>;
17
14
  /**
18
- * @this {AndroidUiautomator2Driver}
19
- * @returns {Promise<void>}
15
+ * Navigates back in the app.
20
16
  */
21
- export function back(this: import("../driver").AndroidUiautomator2Driver): Promise<void>;
22
- export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
17
+ export declare function back(this: AndroidUiautomator2Driver): Promise<void>;
23
18
  //# sourceMappingURL=navigation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,iFAHW,MAAM,GACJ,OAAO,CAAC,IAAI,CAAC,CAIzB;AAED;;;;;;;;GAQG;AACH,yFANW,MAAM,QACN,MAAM,kBACN,OAAO,GAEL,OAAO,CAAC,IAAI,CAAC,CAIzB;AAED;;;GAGG;AACH,2EAFa,OAAO,CAAC,IAAI,CAAC,CAIzB;wCAGY,OAAO,WAAW,EAAE,yBAAyB"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../lib/commands/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AAEzD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,IAAI,EAAE,yBAAyB,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExF;AAED;;;;;GAKG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,yBAAyB,EAC/B,GAAG,EAAE,MAAM,EACX,GAAG,CAAC,EAAE,MAAM,EACZ,aAAa,GAAE,OAAc,GAC5B,OAAO,CAAC,IAAI,CAAC,CAEf;AAED;;GAEG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE"}
@@ -4,33 +4,25 @@ exports.setUrl = setUrl;
4
4
  exports.mobileDeepLink = mobileDeepLink;
5
5
  exports.back = back;
6
6
  /**
7
- * @this {AndroidUiautomator2Driver}
8
- * @param {string} url
9
- * @returns {Promise<void>}
7
+ * Sets the URL for the current app.
8
+ * @param url - The URL to navigate to.
10
9
  */
11
10
  async function setUrl(url) {
12
- await this.adb.startUri(url, /** @type {string} */ (this.opts.appPackage));
11
+ await this.adb.startUri(url, this.opts.appPackage);
13
12
  }
14
13
  /**
15
- * Start URL that take users directly to specific content in the app
16
- * @this {AndroidUiautomator2Driver}
17
- * @param {string} url The name of URL to start.
18
- * @param {string} [pkg] The name of the package to start the URI with.
19
- * @param {boolean} [waitForLaunch=true] If `false` then adb won't wait for
20
- * the started activity to return the control.
21
- * @returns {Promise<void>}
14
+ * Starts a URL that takes users directly to specific content in the app.
15
+ * @param url - The deep link URL to start.
16
+ * @param pkg - Optional package name to start the URI with. If not provided, uses the current app package.
17
+ * @param waitForLaunch - If false, adb won't wait for the started activity to return control. Defaults to true.
22
18
  */
23
- async function mobileDeepLink(url, pkg, waitForLaunch) {
19
+ async function mobileDeepLink(url, pkg, waitForLaunch = true) {
24
20
  return await this.adb.startUri(url, pkg, { waitForLaunch });
25
21
  }
26
22
  /**
27
- * @this {AndroidUiautomator2Driver}
28
- * @returns {Promise<void>}
23
+ * Navigates back in the app.
29
24
  */
30
25
  async function back() {
31
26
  await this.adb.keyevent(4);
32
27
  }
33
- /**
34
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
35
- */
36
28
  //# sourceMappingURL=navigation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../lib/commands/navigation.js"],"names":[],"mappings":";;AAKA,wBAEC;AAWD,wCAEC;AAMD,oBAEC;AA5BD;;;;GAIG;AACI,KAAK,UAAU,MAAM,CAAC,GAAG;IAC9B,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,qBAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED;;;;;;;;GAQG;AACI,KAAK,UAAU,cAAc,CAAC,GAAG,EAAE,GAAG,EAAE,aAAa;IAC1D,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAC,aAAa,EAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,IAAI;IACxB,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../../lib/commands/navigation.ts"],"names":[],"mappings":";;AAMA,wBAEC;AAQD,wCAOC;AAKD,oBAEC;AA5BD;;;GAGG;AACI,KAAK,UAAU,MAAM,CAAkC,GAAW;IACvE,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,IAAI,CAAC,UAAoB,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;GAKG;AACI,KAAK,UAAU,cAAc,CAElC,GAAW,EACX,GAAY,EACZ,gBAAyB,IAAI;IAE7B,OAAO,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,EAAE,EAAC,aAAa,EAAC,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,IAAI;IACxB,MAAM,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC7B,CAAC"}
@@ -1,38 +1,39 @@
1
+ import type { Rect, Size } from '@appium/types';
2
+ import type { AndroidUiautomator2Driver } from '../driver';
3
+ import type { RelativeRect } from './types';
1
4
  /**
2
- * @this {AndroidUiautomator2Driver}
3
- * @returns {Promise<number>}
5
+ * Gets the status bar height in pixels.
6
+ * @returns The status bar height in pixels.
4
7
  */
5
- export function getStatusBarHeight(this: import("../driver").AndroidUiautomator2Driver): Promise<number>;
8
+ export declare function getStatusBarHeight(this: AndroidUiautomator2Driver): Promise<number>;
6
9
  /**
7
- * @this {AndroidUiautomator2Driver}
8
- * @returns {Promise<string>}
10
+ * Gets the device pixel ratio.
11
+ * @returns The device pixel ratio as a string.
9
12
  */
10
- export function getDevicePixelRatio(this: import("../driver").AndroidUiautomator2Driver): Promise<string>;
13
+ export declare function getDevicePixelRatio(this: AndroidUiautomator2Driver): Promise<string>;
11
14
  /**
12
- * @this {AndroidUiautomator2Driver}
13
- * @returns {Promise<import('./types').RelativeRect>}
15
+ * Gets the viewport rectangle coordinates.
16
+ * @returns The viewport rectangle (left, top, width, height), accounting for status bar height.
14
17
  */
15
- export function getViewPortRect(this: import("../driver").AndroidUiautomator2Driver): Promise<import("./types").RelativeRect>;
18
+ export declare function getViewPortRect(this: AndroidUiautomator2Driver): Promise<RelativeRect>;
16
19
  /**
17
20
  * Returns the viewport coordinates.
18
- * @this {AndroidUiautomator2Driver}
19
- * @returns {Promise<import('./types').RelativeRect>} The viewport coordinates.
21
+ * @returns The viewport rectangle (left, top, width, height).
20
22
  */
21
- export function mobileViewPortRect(this: import("../driver").AndroidUiautomator2Driver): Promise<import("./types").RelativeRect>;
23
+ export declare function mobileViewPortRect(this: AndroidUiautomator2Driver): Promise<RelativeRect>;
22
24
  /**
23
- * @this {AndroidUiautomator2Driver}
24
- * @returns {Promise<import('@appium/types').Rect>}
25
+ * Gets the window rectangle (W3C endpoint).
26
+ * @returns The window rectangle (x, y, width, height).
25
27
  */
26
- export function getWindowRect(this: import("../driver").AndroidUiautomator2Driver): Promise<import("@appium/types").Rect>;
28
+ export declare function getWindowRect(this: AndroidUiautomator2Driver): Promise<Rect>;
27
29
  /**
28
- * @this {AndroidUiautomator2Driver}
29
- * @returns {Promise<number>}
30
+ * Gets the display density.
31
+ * @returns The display density value.
30
32
  */
31
- export function getDisplayDensity(this: import("../driver").AndroidUiautomator2Driver): Promise<number>;
33
+ export declare function getDisplayDensity(this: AndroidUiautomator2Driver): Promise<number>;
32
34
  /**
33
- * @this {AndroidUiautomator2Driver}
34
- * @returns {Promise<import('@appium/types').Size>}
35
+ * Gets the window size.
36
+ * @returns The window size (width, height).
35
37
  */
36
- export function getWindowSize(this: import("../driver").AndroidUiautomator2Driver): Promise<import("@appium/types").Size>;
37
- export type AndroidUiautomator2Driver = import("../driver").AndroidUiautomator2Driver;
38
+ export declare function getWindowSize(this: AndroidUiautomator2Driver): Promise<Size>;
38
39
  //# sourceMappingURL=viewport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../../lib/commands/viewport.js"],"names":[],"mappings":"AAEA;;;GAGG;AACH,yFAFa,OAAO,CAAC,MAAM,CAAC,CAS3B;AAGD;;;GAGG;AACH,0FAFa,OAAO,CAAC,MAAM,CAAC,CAQ3B;AAED;;;GAGG;AACH,sFAFa,OAAO,CAAC,OAAO,SAAS,EAAE,YAAY,CAAC,CAanD;AAED;;;;GAIG;AACH,yFAFa,OAAO,CAAC,OAAO,SAAS,EAAE,YAAY,CAAC,CAInD;AAGD;;;GAGG;AACH,oFAFa,OAAO,CAAC,OAAO,eAAe,EAAE,IAAI,CAAC,CAUjD;AAED;;;GAGG;AACH,wFAFa,OAAO,CAAC,MAAM,CAAC,CAU3B;AAED;;;GAGG;AACH,oFAFa,OAAO,CAAC,OAAO,eAAe,EAAE,IAAI,CAAC,CAUjD;wCAGY,OAAO,WAAW,EAAE,yBAAyB"}
1
+ {"version":3,"file":"viewport.d.ts","sourceRoot":"","sources":["../../../lib/commands/viewport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,IAAI,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AAC9C,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,WAAW,CAAC;AACzD,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,SAAS,CAAC;AAE1C;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAKzF;AAED;;;GAGG;AACH,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAE1F;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAW5F;AAED;;;GAGG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,YAAY,CAAC,CAE/F;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAQlF;AAED;;;GAGG;AACH,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,MAAM,CAAC,CAExF;AAED;;;GAGG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAElF"}
@@ -7,26 +7,24 @@ exports.mobileViewPortRect = mobileViewPortRect;
7
7
  exports.getWindowRect = getWindowRect;
8
8
  exports.getDisplayDensity = getDisplayDensity;
9
9
  exports.getWindowSize = getWindowSize;
10
- // memoized in constructor
11
10
  /**
12
- * @this {AndroidUiautomator2Driver}
13
- * @returns {Promise<number>}
11
+ * Gets the status bar height in pixels.
12
+ * @returns The status bar height in pixels.
14
13
  */
15
14
  async function getStatusBarHeight() {
16
- const { statusBar } = /** @type {{statusBar: number}} */ (await /** @type {import('../uiautomator2').UiAutomator2Server} */ (this.uiautomator2).jwproxy.command(`/appium/device/system_bars`, 'GET', {}));
15
+ const { statusBar } = (await this.uiautomator2.jwproxy.command(`/appium/device/system_bars`, 'GET', {}));
17
16
  return statusBar;
18
17
  }
19
- // memoized in constructor
20
18
  /**
21
- * @this {AndroidUiautomator2Driver}
22
- * @returns {Promise<string>}
19
+ * Gets the device pixel ratio.
20
+ * @returns The device pixel ratio as a string.
23
21
  */
24
22
  async function getDevicePixelRatio() {
25
- return String(await /** @type {import('../uiautomator2').UiAutomator2Server} */ (this.uiautomator2).jwproxy.command('/appium/device/pixel_ratio', 'GET', {}));
23
+ return String(await this.uiautomator2.jwproxy.command('/appium/device/pixel_ratio', 'GET', {}));
26
24
  }
27
25
  /**
28
- * @this {AndroidUiautomator2Driver}
29
- * @returns {Promise<import('./types').RelativeRect>}
26
+ * Gets the viewport rectangle coordinates.
27
+ * @returns The viewport rectangle (left, top, width, height), accounting for status bar height.
30
28
  */
31
29
  async function getViewPortRect() {
32
30
  const windowSize = await this.getWindowSize();
@@ -42,16 +40,14 @@ async function getViewPortRect() {
42
40
  }
43
41
  /**
44
42
  * Returns the viewport coordinates.
45
- * @this {AndroidUiautomator2Driver}
46
- * @returns {Promise<import('./types').RelativeRect>} The viewport coordinates.
43
+ * @returns The viewport rectangle (left, top, width, height).
47
44
  */
48
45
  async function mobileViewPortRect() {
49
46
  return await this.getViewPortRect();
50
47
  }
51
- // For W3C
52
48
  /**
53
- * @this {AndroidUiautomator2Driver}
54
- * @returns {Promise<import('@appium/types').Rect>}
49
+ * Gets the window rectangle (W3C endpoint).
50
+ * @returns The window rectangle (x, y, width, height).
55
51
  */
56
52
  async function getWindowRect() {
57
53
  const { width, height } = await this.getWindowSize();
@@ -63,20 +59,17 @@ async function getWindowRect() {
63
59
  };
64
60
  }
65
61
  /**
66
- * @this {AndroidUiautomator2Driver}
67
- * @returns {Promise<number>}
62
+ * Gets the display density.
63
+ * @returns The display density value.
68
64
  */
69
65
  async function getDisplayDensity() {
70
- return /** @type {number} */ (await this.uiautomator2.jwproxy.command('/appium/device/display_density', 'GET', {}));
66
+ return (await this.uiautomator2.jwproxy.command('/appium/device/display_density', 'GET', {}));
71
67
  }
72
68
  /**
73
- * @this {AndroidUiautomator2Driver}
74
- * @returns {Promise<import('@appium/types').Size>}
69
+ * Gets the window size.
70
+ * @returns The window size (width, height).
75
71
  */
76
72
  async function getWindowSize() {
77
- return /** @type {import('@appium/types').Size} */ (await this.uiautomator2.jwproxy.command('/window/current/size', 'GET', {}));
73
+ return (await this.uiautomator2.jwproxy.command('/window/current/size', 'GET', {}));
78
74
  }
79
- /**
80
- * @typedef {import('../driver').AndroidUiautomator2Driver} AndroidUiautomator2Driver
81
- */
82
75
  //# sourceMappingURL=viewport.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../lib/commands/viewport.js"],"names":[],"mappings":";;AAMA,gDAOC;AAOD,kDAMC;AAMD,0CAWC;AAOD,gDAEC;AAOD,sCAQC;AAMD,8CAQC;AAMD,sCAQC;AA9FD,0BAA0B;AAC1B;;;GAGG;AACI,KAAK,UAAU,kBAAkB;IACtC,MAAM,EAAC,SAAS,EAAC,GAAG,kCAAkC,CAAC,CACrD,MAAM,2DAA2D,CAAC,CAChE,IAAI,CAAC,YAAY,CAClB,CAAC,OAAO,CAAC,OAAO,CAAC,4BAA4B,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3D,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,0BAA0B;AAC1B;;;GAGG;AACI,KAAK,UAAU,mBAAmB;IACvC,OAAO,MAAM,CACX,MAAM,2DAA2D,CAAC,CAChE,IAAI,CAAC,YAAY,CAClB,CAAC,OAAO,CAAC,OAAO,CAAC,4BAA4B,EAAE,KAAK,EAAE,EAAE,CAAC,CAC3D,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,eAAe;IACnC,MAAM,UAAU,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IAC9C,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,kBAAkB,EAAE,CAAC;IACxD,2EAA2E;IAC3E,4BAA4B;IAC5B,OAAO;QACL,IAAI,EAAE,CAAC;QACP,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,UAAU,CAAC,KAAK;QACvB,MAAM,EAAE,UAAU,CAAC,MAAM,GAAG,eAAe;KAC5C,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACI,KAAK,UAAU,kBAAkB;IACtC,OAAO,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;AACtC,CAAC;AAED,UAAU;AACV;;;GAGG;AACI,KAAK,UAAU,aAAa;IACjC,MAAM,EAAC,KAAK,EAAE,MAAM,EAAC,GAAG,MAAM,IAAI,CAAC,aAAa,EAAE,CAAC;IACnD,OAAO;QACL,KAAK;QACL,MAAM;QACN,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACL,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,iBAAiB;IACrC,OAAO,qBAAqB,CAAC,CAC3B,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,gCAAgC,EAChC,KAAK,EACL,EAAE,CACH,CACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,aAAa;IACjC,OAAO,2CAA2C,CAAC,CACjD,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CACrC,sBAAsB,EACtB,KAAK,EACL,EAAE,CACH,CACF,CAAC;AACJ,CAAC;AAED;;GAEG"}
1
+ {"version":3,"file":"viewport.js","sourceRoot":"","sources":["../../../lib/commands/viewport.ts"],"names":[],"mappings":";;AAQA,gDAKC;AAMD,kDAEC;AAMD,0CAWC;AAMD,gDAEC;AAMD,sCAQC;AAMD,8CAEC;AAMD,sCAEC;AAxED;;;GAGG;AACI,KAAK,UAAU,kBAAkB;IACtC,MAAM,EAAC,SAAS,EAAC,GAAG,CAAC,MAAM,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,4BAA4B,EAAE,KAAK,EAAE,EAAE,CAAC,CAEpG,CAAC;IACF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;GAGG;AACI,KAAK,UAAU,mBAAmB;IACvC,OAAO,MAAM,CAAC,MAA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ionalGstreamerCheck;
3
- export const optionalFfmpegCheck: doctor.OptionalFfmpegCheck;
4
- import { doctor } from 'appium-android-driver';
1
+ import type { IDoctorCheck } from '@appium/types';
2
+ export declare const optionalBundletoolCheck: IDoctorCheck;
3
+ export declare const optionalGstreamerCheck: IDoctorCheck;
4
+ export declare const optionalFfmpegCheck: IDoctorCheck;
5
5
  //# sourceMappingURL=optional-checks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"optional-checks.d.ts","sourceRoot":"","sources":["../../../lib/doctor/optional-checks.js"],"names":[],"mappings":"AAEA,qEAAsE;AACtE,mEAAoE;AACpE,6DAA8D;uBAJvC,uBAAuB"}
1
+ {"version":3,"file":"optional-checks.d.ts","sourceRoot":"","sources":["../../../lib/doctor/optional-checks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,uBAAuB,EAAE,YAA6C,CAAC;AACpF,eAAO,MAAM,sBAAsB,EAAE,YAA4C,CAAC;AAClF,eAAO,MAAM,mBAAmB,EAAE,YAAyC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"optional-checks.js","sourceRoot":"","sources":["../../../lib/doctor/optional-checks.js"],"names":[],"mappings":";;;AAAA,iEAA+C;AAElC,QAAA,uBAAuB,GAAG,8BAAM,CAAC,uBAAuB,CAAC;AACzD,QAAA,sBAAsB,GAAG,8BAAM,CAAC,sBAAsB,CAAC;AACvD,QAAA,mBAAmB,GAAG,8BAAM,CAAC,mBAAmB,CAAC"}
1
+ {"version":3,"file":"optional-checks.js","sourceRoot":"","sources":["../../../lib/doctor/optional-checks.ts"],"names":[],"mappings":";;;AAAA,iEAA6C;AAGhC,QAAA,uBAAuB,GAAiB,8BAAM,CAAC,uBAAuB,CAAC;AACvE,QAAA,sBAAsB,GAAiB,8BAAM,CAAC,sBAAsB,CAAC;AACrE,QAAA,mBAAmB,GAAiB,8BAAM,CAAC,mBAAmB,CAAC"}
@@ -1,22 +1,6 @@
1
- export const androidHomeCheck: {
2
- log: import("@appium/types").AppiumLogger;
3
- varName: string;
4
- opts: doctor.EnvVarCheckOptions;
5
- diagnose(): Promise<import("@appium/types").DoctorCheckResult>;
6
- fix(): Promise<string>;
7
- hasAutofix(): boolean;
8
- isOptional(): boolean;
9
- };
10
- export const javaHomeCheck: {
11
- log: import("@appium/types").AppiumLogger;
12
- varName: string;
13
- opts: doctor.EnvVarCheckOptions;
14
- diagnose(): Promise<import("@appium/types").DoctorCheckResult>;
15
- fix(): Promise<string>;
16
- hasAutofix(): boolean;
17
- isOptional(): boolean;
18
- };
19
- export const javaHomeValueCheck: doctor.JavaHomeValueCheck;
20
- export const androidSdkCheck: doctor.AndroidSdkCheck;
21
- import { doctor } from 'appium-android-driver';
1
+ import type { IDoctorCheck } from '@appium/types';
2
+ export declare const androidHomeCheck: IDoctorCheck;
3
+ export declare const javaHomeCheck: IDoctorCheck;
4
+ export declare const javaHomeValueCheck: IDoctorCheck;
5
+ export declare const androidSdkCheck: IDoctorCheck;
22
6
  //# sourceMappingURL=required-checks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"required-checks.d.ts","sourceRoot":"","sources":["../../../lib/doctor/required-checks.js"],"names":[],"mappings":"AAEA;;;;;;;;EAAwD;AACxD;;;;;;;;EAAkD;AAClD,2DAA4D;AAC5D,qDAAsD;uBAL/B,uBAAuB"}
1
+ {"version":3,"file":"required-checks.d.ts","sourceRoot":"","sources":["../../../lib/doctor/required-checks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,YAAY,EAAC,MAAM,eAAe,CAAC;AAEhD,eAAO,MAAM,gBAAgB,EAAE,YAAsC,CAAC;AACtE,eAAO,MAAM,aAAa,EAAE,YAAmC,CAAC;AAChE,eAAO,MAAM,kBAAkB,EAAE,YAAwC,CAAC;AAC1E,eAAO,MAAM,eAAe,EAAE,YAAqC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"required-checks.js","sourceRoot":"","sources":["../../../lib/doctor/required-checks.js"],"names":[],"mappings":";;;AAAA,iEAA+C;AAElC,QAAA,gBAAgB,GAAG,8BAAM,CAAC,gBAAgB,CAAC;AAC3C,QAAA,aAAa,GAAG,8BAAM,CAAC,aAAa,CAAC;AACrC,QAAA,kBAAkB,GAAG,8BAAM,CAAC,kBAAkB,CAAC;AAC/C,QAAA,eAAe,GAAG,8BAAM,CAAC,eAAe,CAAC"}
1
+ {"version":3,"file":"required-checks.js","sourceRoot":"","sources":["../../../lib/doctor/required-checks.ts"],"names":[],"mappings":";;;AAAA,iEAA6C;AAGhC,QAAA,gBAAgB,GAAiB,8BAAM,CAAC,gBAAgB,CAAC;AACzD,QAAA,aAAa,GAAiB,8BAAM,CAAC,aAAa,CAAC;AACnD,QAAA,kBAAkB,GAAiB,8BAAM,CAAC,kBAAkB,CAAC;AAC7D,QAAA,eAAe,GAAiB,8BAAM,CAAC,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { AndroidUiautomator2Driver } from './driver';
2
+ export { AndroidUiautomator2Driver };
3
+ export default AndroidUiautomator2Driver;
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,yBAAyB,EAAC,MAAM,UAAU,CAAC;AAEnD,OAAO,EAAC,yBAAyB,EAAC,CAAC;AACnC,eAAe,yBAAyB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.AndroidUiautomator2Driver = void 0;
4
- const driver_1 = require("./lib/driver");
4
+ const driver_1 = require("./driver");
5
5
  Object.defineProperty(exports, "AndroidUiautomator2Driver", { enumerable: true, get: function () { return driver_1.AndroidUiautomator2Driver; } });
6
6
  exports.default = driver_1.AndroidUiautomator2Driver;
7
7
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../lib/index.ts"],"names":[],"mappings":";;;AAAA,qCAAmD;AAE3C,0GAFA,kCAAyB,OAEA;AACjC,kBAAe,kCAAyB,CAAC"}