appium-xcuitest-driver 10.12.1 → 10.13.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 (48) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/build/lib/commands/context.d.ts +130 -161
  3. package/build/lib/commands/context.d.ts.map +1 -1
  4. package/build/lib/commands/context.js +122 -107
  5. package/build/lib/commands/context.js.map +1 -1
  6. package/build/lib/commands/execute.js +1 -1
  7. package/build/lib/commands/execute.js.map +1 -1
  8. package/build/lib/commands/general.js +1 -1
  9. package/build/lib/commands/general.js.map +1 -1
  10. package/build/lib/commands/gesture.d.ts +103 -119
  11. package/build/lib/commands/gesture.d.ts.map +1 -1
  12. package/build/lib/commands/gesture.js +98 -138
  13. package/build/lib/commands/gesture.js.map +1 -1
  14. package/build/lib/commands/pcap.d.ts +1 -1
  15. package/build/lib/commands/pcap.d.ts.map +1 -1
  16. package/build/lib/commands/performance.d.ts +1 -1
  17. package/build/lib/commands/performance.d.ts.map +1 -1
  18. package/build/lib/commands/record-audio.d.ts +2 -1
  19. package/build/lib/commands/record-audio.d.ts.map +1 -1
  20. package/build/lib/commands/recordscreen.d.ts +2 -1
  21. package/build/lib/commands/recordscreen.d.ts.map +1 -1
  22. package/build/lib/commands/screenshots.d.ts.map +1 -1
  23. package/build/lib/commands/screenshots.js +3 -5
  24. package/build/lib/commands/screenshots.js.map +1 -1
  25. package/build/lib/commands/timeouts.js +1 -1
  26. package/build/lib/commands/timeouts.js.map +1 -1
  27. package/build/lib/commands/web.d.ts +199 -202
  28. package/build/lib/commands/web.d.ts.map +1 -1
  29. package/build/lib/commands/web.js +206 -174
  30. package/build/lib/commands/web.js.map +1 -1
  31. package/build/lib/driver.d.ts +2 -1
  32. package/build/lib/driver.d.ts.map +1 -1
  33. package/build/lib/driver.js +10 -4
  34. package/build/lib/driver.js.map +1 -1
  35. package/build/lib/execute-method-map.d.ts.map +1 -1
  36. package/build/lib/execute-method-map.js +0 -1
  37. package/build/lib/execute-method-map.js.map +1 -1
  38. package/lib/commands/{context.js → context.ts} +172 -145
  39. package/lib/commands/execute.js +1 -1
  40. package/lib/commands/general.js +1 -1
  41. package/lib/commands/{gesture.js → gesture.ts} +225 -183
  42. package/lib/commands/screenshots.js +3 -5
  43. package/lib/commands/timeouts.js +1 -1
  44. package/lib/commands/{web.js → web.ts} +305 -263
  45. package/lib/driver.ts +11 -4
  46. package/lib/execute-method-map.ts +0 -1
  47. package/npm-shrinkwrap.json +14 -89
  48. package/package.json +2 -2
@@ -13,7 +13,7 @@ export async function getScreenshot() {
13
13
  switch (_.toLower(webScreenshotMode)) {
14
14
  case 'page':
15
15
  case 'viewport':
16
- return await (/** @type {import('appium-remote-debugger').RemoteDebugger} */ (this.remote)).captureScreenshot({
16
+ return await this.remote.captureScreenshot({
17
17
  coordinateSystem: /** @type {'Viewport'|'Page'} */ (_.capitalize(webScreenshotMode)),
18
18
  });
19
19
  case 'native':
@@ -83,8 +83,7 @@ export async function getElementScreenshot(el) {
83
83
  throw new errors.UnableToCaptureScreen('Cannot take a screenshot of a zero-size element');
84
84
  }
85
85
  const {x, y} = await this.executeAtom('get_top_left_coordinates', [atomsElement]);
86
- return await (/** @type {import('appium-remote-debugger').RemoteDebugger} */ (this.remote))
87
- .captureScreenshot({rect: {x, y, width, height}});
86
+ return await this.remote.captureScreenshot({rect: {x, y, width, height}});
88
87
  }
89
88
 
90
89
  const data = await this.proxyCommand(`/element/${el}/screenshot`, 'GET');
@@ -102,8 +101,7 @@ export async function getElementScreenshot(el) {
102
101
  */
103
102
  export async function getViewportScreenshot() {
104
103
  if (this.isWebContext()) {
105
- return await (/** @type {import('appium-remote-debugger').RemoteDebugger} */ (this.remote))
106
- .captureScreenshot();
104
+ return await this.remote.captureScreenshot();
107
105
  }
108
106
 
109
107
  const screenshot = await this.getScreenshot();
@@ -49,7 +49,7 @@ export async function asyncScriptTimeout(ms) {
49
49
  export function setPageLoadTimeout(ms) {
50
50
  ms = parseInt(ms, 10);
51
51
  this.pageLoadMs = ms;
52
- if (this.remote) {
52
+ if (this._remote) {
53
53
  this.remote.pageLoadMs = ms;
54
54
  }
55
55
  this.log.debug(`Set page load timeout to ${ms}ms`);