@midscene/ios 0.30.6-beta-20251022061854.0 → 0.30.6-beta-20251022093704.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.
package/dist/es/bin.mjs CHANGED
@@ -12003,60 +12003,17 @@ class IOSWebDriverClient extends WebDriverClient {
12003
12003
  async swipe(fromX, fromY, toX, toY, duration = 500) {
12004
12004
  this.ensureSession();
12005
12005
  try {
12006
- const actions = {
12007
- actions: [
12008
- {
12009
- type: 'pointer',
12010
- id: 'finger1',
12011
- parameters: {
12012
- pointerType: 'touch'
12013
- },
12014
- actions: [
12015
- {
12016
- type: 'pointerMove',
12017
- duration: 0,
12018
- x: fromX,
12019
- y: fromY
12020
- },
12021
- {
12022
- type: 'pointerDown',
12023
- button: 0
12024
- },
12025
- {
12026
- type: 'pause',
12027
- duration: 100
12028
- },
12029
- {
12030
- type: 'pointerMove',
12031
- duration,
12032
- x: toX,
12033
- y: toY
12034
- },
12035
- {
12036
- type: 'pointerUp',
12037
- button: 0
12038
- }
12039
- ]
12040
- }
12041
- ]
12042
- };
12043
- await this.makeRequest('POST', `/session/${this.sessionId}/actions`, actions);
12044
- debugIOS(`Swiped using W3C Actions from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
12006
+ await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
12007
+ fromX,
12008
+ fromY,
12009
+ toX,
12010
+ toY,
12011
+ duration: duration / 1000
12012
+ });
12013
+ debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
12045
12014
  } catch (error) {
12046
- debugIOS(`W3C Actions failed, falling back to dragfromtoforduration: ${error}`);
12047
- try {
12048
- await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
12049
- fromX,
12050
- fromY,
12051
- toX,
12052
- toY,
12053
- duration: duration / 1000
12054
- });
12055
- debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
12056
- } catch (error2) {
12057
- debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error2}`);
12058
- throw new Error(`Failed to swipe: ${error2}`);
12059
- }
12015
+ debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error}`);
12016
+ throw new Error(`Failed to swipe: ${error}`);
12060
12017
  }
12061
12018
  }
12062
12019
  async longPress(x, y, duration = 1000) {
@@ -12429,7 +12386,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
12429
12386
  x: width / 2,
12430
12387
  y: height / 2
12431
12388
  };
12432
- const scrollDistance = distance || 0.7 * width;
12389
+ const scrollDistance = distance || width / 3;
12433
12390
  await this.swipe(start.x, start.y, start.x + scrollDistance, start.y);
12434
12391
  }
12435
12392
  async scrollRight(distance, startPoint) {
@@ -12441,7 +12398,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
12441
12398
  x: width / 2,
12442
12399
  y: height / 2
12443
12400
  };
12444
- const scrollDistance = distance || 0.7 * width;
12401
+ const scrollDistance = distance || width / 3;
12445
12402
  await this.swipe(start.x, start.y, start.x - scrollDistance, start.y);
12446
12403
  }
12447
12404
  async scrollUntilTop(startPoint) {
package/dist/es/index.mjs CHANGED
@@ -197,60 +197,17 @@ class IOSWebDriverClient extends WebDriverClient {
197
197
  async swipe(fromX, fromY, toX, toY, duration = 500) {
198
198
  this.ensureSession();
199
199
  try {
200
- const actions = {
201
- actions: [
202
- {
203
- type: 'pointer',
204
- id: 'finger1',
205
- parameters: {
206
- pointerType: 'touch'
207
- },
208
- actions: [
209
- {
210
- type: 'pointerMove',
211
- duration: 0,
212
- x: fromX,
213
- y: fromY
214
- },
215
- {
216
- type: 'pointerDown',
217
- button: 0
218
- },
219
- {
220
- type: 'pause',
221
- duration: 100
222
- },
223
- {
224
- type: 'pointerMove',
225
- duration,
226
- x: toX,
227
- y: toY
228
- },
229
- {
230
- type: 'pointerUp',
231
- button: 0
232
- }
233
- ]
234
- }
235
- ]
236
- };
237
- await this.makeRequest('POST', `/session/${this.sessionId}/actions`, actions);
238
- debugIOS(`Swiped using W3C Actions from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
200
+ await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
201
+ fromX,
202
+ fromY,
203
+ toX,
204
+ toY,
205
+ duration: duration / 1000
206
+ });
207
+ debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
239
208
  } catch (error) {
240
- debugIOS(`W3C Actions failed, falling back to dragfromtoforduration: ${error}`);
241
- try {
242
- await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
243
- fromX,
244
- fromY,
245
- toX,
246
- toY,
247
- duration: duration / 1000
248
- });
249
- debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
250
- } catch (error2) {
251
- debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error2}`);
252
- throw new Error(`Failed to swipe: ${error2}`);
253
- }
209
+ debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error}`);
210
+ throw new Error(`Failed to swipe: ${error}`);
254
211
  }
255
212
  }
256
213
  async longPress(x, y, duration = 1000) {
@@ -623,7 +580,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
623
580
  x: width / 2,
624
581
  y: height / 2
625
582
  };
626
- const scrollDistance = distance || 0.7 * width;
583
+ const scrollDistance = distance || width / 3;
627
584
  await this.swipe(start.x, start.y, start.x + scrollDistance, start.y);
628
585
  }
629
586
  async scrollRight(distance, startPoint) {
@@ -635,7 +592,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
635
592
  x: width / 2,
636
593
  y: height / 2
637
594
  };
638
- const scrollDistance = distance || 0.7 * width;
595
+ const scrollDistance = distance || width / 3;
639
596
  await this.swipe(start.x, start.y, start.x - scrollDistance, start.y);
640
597
  }
641
598
  async scrollUntilTop(startPoint) {
package/dist/lib/bin.js CHANGED
@@ -12141,60 +12141,17 @@ var __webpack_exports__ = {};
12141
12141
  async swipe(fromX, fromY, toX, toY, duration = 500) {
12142
12142
  this.ensureSession();
12143
12143
  try {
12144
- const actions = {
12145
- actions: [
12146
- {
12147
- type: 'pointer',
12148
- id: 'finger1',
12149
- parameters: {
12150
- pointerType: 'touch'
12151
- },
12152
- actions: [
12153
- {
12154
- type: 'pointerMove',
12155
- duration: 0,
12156
- x: fromX,
12157
- y: fromY
12158
- },
12159
- {
12160
- type: 'pointerDown',
12161
- button: 0
12162
- },
12163
- {
12164
- type: 'pause',
12165
- duration: 100
12166
- },
12167
- {
12168
- type: 'pointerMove',
12169
- duration,
12170
- x: toX,
12171
- y: toY
12172
- },
12173
- {
12174
- type: 'pointerUp',
12175
- button: 0
12176
- }
12177
- ]
12178
- }
12179
- ]
12180
- };
12181
- await this.makeRequest('POST', `/session/${this.sessionId}/actions`, actions);
12182
- debugIOS(`Swiped using W3C Actions from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
12144
+ await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
12145
+ fromX,
12146
+ fromY,
12147
+ toX,
12148
+ toY,
12149
+ duration: duration / 1000
12150
+ });
12151
+ debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
12183
12152
  } catch (error) {
12184
- debugIOS(`W3C Actions failed, falling back to dragfromtoforduration: ${error}`);
12185
- try {
12186
- await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
12187
- fromX,
12188
- fromY,
12189
- toX,
12190
- toY,
12191
- duration: duration / 1000
12192
- });
12193
- debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
12194
- } catch (error2) {
12195
- debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error2}`);
12196
- throw new Error(`Failed to swipe: ${error2}`);
12197
- }
12153
+ debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error}`);
12154
+ throw new Error(`Failed to swipe: ${error}`);
12198
12155
  }
12199
12156
  }
12200
12157
  async longPress(x, y, duration = 1000) {
@@ -12567,7 +12524,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
12567
12524
  x: width / 2,
12568
12525
  y: height / 2
12569
12526
  };
12570
- const scrollDistance = distance || 0.7 * width;
12527
+ const scrollDistance = distance || width / 3;
12571
12528
  await this.swipe(start.x, start.y, start.x + scrollDistance, start.y);
12572
12529
  }
12573
12530
  async scrollRight(distance, startPoint) {
@@ -12579,7 +12536,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
12579
12536
  x: width / 2,
12580
12537
  y: height / 2
12581
12538
  };
12582
- const scrollDistance = distance || 0.7 * width;
12539
+ const scrollDistance = distance || width / 3;
12583
12540
  await this.swipe(start.x, start.y, start.x - scrollDistance, start.y);
12584
12541
  }
12585
12542
  async scrollUntilTop(startPoint) {
package/dist/lib/index.js CHANGED
@@ -235,60 +235,17 @@ class IOSWebDriverClient extends webdriver_namespaceObject.WebDriverClient {
235
235
  async swipe(fromX, fromY, toX, toY, duration = 500) {
236
236
  this.ensureSession();
237
237
  try {
238
- const actions = {
239
- actions: [
240
- {
241
- type: 'pointer',
242
- id: 'finger1',
243
- parameters: {
244
- pointerType: 'touch'
245
- },
246
- actions: [
247
- {
248
- type: 'pointerMove',
249
- duration: 0,
250
- x: fromX,
251
- y: fromY
252
- },
253
- {
254
- type: 'pointerDown',
255
- button: 0
256
- },
257
- {
258
- type: 'pause',
259
- duration: 100
260
- },
261
- {
262
- type: 'pointerMove',
263
- duration,
264
- x: toX,
265
- y: toY
266
- },
267
- {
268
- type: 'pointerUp',
269
- button: 0
270
- }
271
- ]
272
- }
273
- ]
274
- };
275
- await this.makeRequest('POST', `/session/${this.sessionId}/actions`, actions);
276
- debugIOS(`Swiped using W3C Actions from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
238
+ await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
239
+ fromX,
240
+ fromY,
241
+ toX,
242
+ toY,
243
+ duration: duration / 1000
244
+ });
245
+ debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
277
246
  } catch (error) {
278
- debugIOS(`W3C Actions failed, falling back to dragfromtoforduration: ${error}`);
279
- try {
280
- await this.makeRequest('POST', `/session/${this.sessionId}/wda/dragfromtoforduration`, {
281
- fromX,
282
- fromY,
283
- toX,
284
- toY,
285
- duration: duration / 1000
286
- });
287
- debugIOS(`Swiped from (${fromX}, ${fromY}) to (${toX}, ${toY}) in ${duration}ms`);
288
- } catch (error2) {
289
- debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error2}`);
290
- throw new Error(`Failed to swipe: ${error2}`);
291
- }
247
+ debugIOS(`Failed to swipe from (${fromX}, ${fromY}) to (${toX}, ${toY}): ${error}`);
248
+ throw new Error(`Failed to swipe: ${error}`);
292
249
  }
293
250
  }
294
251
  async longPress(x, y, duration = 1000) {
@@ -661,7 +618,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
661
618
  x: width / 2,
662
619
  y: height / 2
663
620
  };
664
- const scrollDistance = distance || 0.7 * width;
621
+ const scrollDistance = distance || width / 3;
665
622
  await this.swipe(start.x, start.y, start.x + scrollDistance, start.y);
666
623
  }
667
624
  async scrollRight(distance, startPoint) {
@@ -673,7 +630,7 @@ ScreenSize: ${size.width}x${size.height} (DPR: ${size.scale})
673
630
  x: width / 2,
674
631
  y: height / 2
675
632
  };
676
- const scrollDistance = distance || 0.7 * width;
633
+ const scrollDistance = distance || width / 3;
677
634
  await this.swipe(start.x, start.y, start.x - scrollDistance, start.y);
678
635
  }
679
636
  async scrollUntilTop(startPoint) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midscene/ios",
3
- "version": "0.30.6-beta-20251022061854.0",
3
+ "version": "0.30.6-beta-20251022093704.0",
4
4
  "description": "iOS automation library for Midscene",
5
5
  "keywords": [
6
6
  "iOS UI automation",
@@ -38,9 +38,9 @@
38
38
  "dependencies": {
39
39
  "@inquirer/prompts": "^7.8.6",
40
40
  "open": "10.1.0",
41
- "@midscene/core": "0.30.6-beta-20251022061854.0",
42
- "@midscene/shared": "0.30.6-beta-20251022061854.0",
43
- "@midscene/webdriver": "0.30.6-beta-20251022061854.0"
41
+ "@midscene/webdriver": "0.30.6-beta-20251022093704.0",
42
+ "@midscene/shared": "0.30.6-beta-20251022093704.0",
43
+ "@midscene/core": "0.30.6-beta-20251022093704.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@rslib/core": "^0.11.2",
@@ -49,7 +49,7 @@
49
49
  "typescript": "^5.8.3",
50
50
  "tsx": "^4.19.2",
51
51
  "vitest": "3.0.5",
52
- "@midscene/playground": "0.30.6-beta-20251022061854.0"
52
+ "@midscene/playground": "0.30.6-beta-20251022093704.0"
53
53
  },
54
54
  "license": "MIT",
55
55
  "scripts": {
package/static/index.html CHANGED
@@ -1 +1 @@
1
- <!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.f566a9ed.js"></script><script defer src="/static/js/657.5a5fe47b.js"></script><script defer src="/static/js/index.694f8c4a.js"></script><link href="/static/css/index.44466eb4.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
1
+ <!doctype html><html><head><link rel="icon" href="/favicon.ico"><title>Midscene Playground</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/lib-react.f566a9ed.js"></script><script defer src="/static/js/657.5a5fe47b.js"></script><script defer src="/static/js/index.914766d3.js"></script><link href="/static/css/index.44466eb4.css" rel="stylesheet"></head><body><div id="root"></div></body></html>