@samsara-dev/appwright 0.2.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 (81) hide show
  1. package/.eslintrc.js +4 -0
  2. package/CHANGELOG.md +538 -0
  3. package/LICENSE +202 -0
  4. package/README.md +183 -0
  5. package/dist/bin/index.d.ts +3 -0
  6. package/dist/bin/index.d.ts.map +1 -0
  7. package/dist/bin/index.js +53 -0
  8. package/dist/config.d.ts +4 -0
  9. package/dist/config.d.ts.map +1 -0
  10. package/dist/config.js +65 -0
  11. package/dist/device/index.d.ts +171 -0
  12. package/dist/device/index.d.ts.map +1 -0
  13. package/dist/device/index.js +415 -0
  14. package/dist/fixture/index.d.ts +38 -0
  15. package/dist/fixture/index.d.ts.map +1 -0
  16. package/dist/fixture/index.js +78 -0
  17. package/dist/fixture/workerInfo.d.ts +27 -0
  18. package/dist/fixture/workerInfo.d.ts.map +1 -0
  19. package/dist/fixture/workerInfo.js +87 -0
  20. package/dist/global-setup.d.ts +5 -0
  21. package/dist/global-setup.d.ts.map +1 -0
  22. package/dist/global-setup.js +30 -0
  23. package/dist/index.d.ts +5 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +25 -0
  26. package/dist/locator/index.d.ts +25 -0
  27. package/dist/locator/index.d.ts.map +1 -0
  28. package/dist/locator/index.js +296 -0
  29. package/dist/logger.d.ts +9 -0
  30. package/dist/logger.d.ts.map +1 -0
  31. package/dist/logger.js +19 -0
  32. package/dist/providers/appium.d.ts +15 -0
  33. package/dist/providers/appium.d.ts.map +1 -0
  34. package/dist/providers/appium.js +274 -0
  35. package/dist/providers/browserstack/index.d.ts +26 -0
  36. package/dist/providers/browserstack/index.d.ts.map +1 -0
  37. package/dist/providers/browserstack/index.js +272 -0
  38. package/dist/providers/browserstack/utils.d.ts +2 -0
  39. package/dist/providers/browserstack/utils.d.ts.map +1 -0
  40. package/dist/providers/browserstack/utils.js +34 -0
  41. package/dist/providers/emulator/index.d.ts +13 -0
  42. package/dist/providers/emulator/index.d.ts.map +1 -0
  43. package/dist/providers/emulator/index.js +86 -0
  44. package/dist/providers/index.d.ts +5 -0
  45. package/dist/providers/index.d.ts.map +1 -0
  46. package/dist/providers/index.js +31 -0
  47. package/dist/providers/lambdatest/index.d.ts +27 -0
  48. package/dist/providers/lambdatest/index.d.ts.map +1 -0
  49. package/dist/providers/lambdatest/index.js +280 -0
  50. package/dist/providers/lambdatest/utils.d.ts +3 -0
  51. package/dist/providers/lambdatest/utils.d.ts.map +1 -0
  52. package/dist/providers/lambdatest/utils.js +36 -0
  53. package/dist/providers/local/index.d.ts +13 -0
  54. package/dist/providers/local/index.d.ts.map +1 -0
  55. package/dist/providers/local/index.js +86 -0
  56. package/dist/reporter.d.ts +13 -0
  57. package/dist/reporter.d.ts.map +1 -0
  58. package/dist/reporter.js +216 -0
  59. package/dist/tests/locator.spec.d.ts +2 -0
  60. package/dist/tests/locator.spec.d.ts.map +1 -0
  61. package/dist/tests/locator.spec.js +89 -0
  62. package/dist/tests/regex.spec.d.ts +2 -0
  63. package/dist/tests/regex.spec.d.ts.map +1 -0
  64. package/dist/tests/regex.spec.js +19 -0
  65. package/dist/tests/vitest.config.d.mts +3 -0
  66. package/dist/tests/vitest.config.d.mts.map +1 -0
  67. package/dist/tests/vitest.config.mjs +6 -0
  68. package/dist/types/errors.d.ts +7 -0
  69. package/dist/types/errors.d.ts.map +1 -0
  70. package/dist/types/errors.js +15 -0
  71. package/dist/types/index.d.ts +234 -0
  72. package/dist/types/index.d.ts.map +1 -0
  73. package/dist/types/index.js +22 -0
  74. package/dist/utils.d.ts +8 -0
  75. package/dist/utils.d.ts.map +1 -0
  76. package/dist/utils.js +66 -0
  77. package/dist/vision/index.d.ts +64 -0
  78. package/dist/vision/index.d.ts.map +1 -0
  79. package/dist/vision/index.js +106 -0
  80. package/package.json +63 -0
  81. package/tsconfig.json +15 -0
package/.eslintrc.js ADDED
@@ -0,0 +1,4 @@
1
+ module.exports = {
2
+ extends: ["@empiricalrun/eslint-config/playwright"],
3
+ ignorePatterns: ["example/**"],
4
+ };
package/CHANGELOG.md ADDED
@@ -0,0 +1,538 @@
1
+ # appwright
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3730adf: Upgrade to Appium v3.1, update bundled iOS driver support, bump the minimum Node.js runtime to 20.19.0, and let BrowserStack/LambdaTest configs request their Appium server version.
8
+
9
+ ## 0.1.46
10
+
11
+ ### Patch Changes
12
+
13
+ - f53d282: feat: add udid parameter to EmulatorConfig
14
+
15
+ ## 0.1.45
16
+
17
+ ### Patch Changes
18
+
19
+ - 146116a: fix: added comments
20
+
21
+ ## 0.1.44
22
+
23
+ ### Patch Changes
24
+
25
+ - 4074400: fix: video download issue on lambdatest
26
+
27
+ ## 0.1.43
28
+
29
+ ### Patch Changes
30
+
31
+ - 651cce1: fix: file write error when file is not present
32
+
33
+ ## 0.1.42
34
+
35
+ ### Patch Changes
36
+
37
+ - ed2762a: fix: provider video download failure should not stop tests
38
+
39
+ ## 0.1.41
40
+
41
+ ### Patch Changes
42
+
43
+ - 216e9f5: fix: multiple appium session creation
44
+
45
+ ## 0.1.40
46
+
47
+ ### Patch Changes
48
+
49
+ - fbcbe5a: fix: added capability to enable camera injection using config
50
+
51
+ ## 0.1.39
52
+
53
+ ### Patch Changes
54
+
55
+ - a3e369d: chore: added docs for vision
56
+
57
+ ## 0.1.38
58
+
59
+ ### Patch Changes
60
+
61
+ - a5eacf0: feat: added api key in vision APIs
62
+
63
+ ## 0.1.37
64
+
65
+ ### Patch Changes
66
+
67
+ - 01bb396: fix: move worker video download to reporter
68
+ - f7ca94a: fix: updated llm package version to fix the langfuse errors
69
+ - 22d3ce8: fix: worker info store needs recursive mkdir
70
+
71
+ ## 0.1.36
72
+
73
+ ### Patch Changes
74
+
75
+ - 3430e0e: feat: added telemetry for vision methods
76
+
77
+ ## 0.1.35
78
+
79
+ ### Patch Changes
80
+
81
+ - ed4a96b: chore: update llm package
82
+
83
+ ## 0.1.34
84
+
85
+ ### Patch Changes
86
+
87
+ - 77b8cd1: fix: ffmpeg error logging
88
+
89
+ ## 0.1.33
90
+
91
+ ### Patch Changes
92
+
93
+ - 4c3c3ec: chore: improve logs for video trimming job
94
+ - 61fd8d2: fix: added option for caching in vision tap calls
95
+ - fc9879c: feat: capture persistentDevice worker info in a file on disk
96
+ - 3dbf6ba: docs: fix persistent device parallelism section
97
+
98
+ ## 0.1.32
99
+
100
+ ### Patch Changes
101
+
102
+ - 070625f: fix: handle ffmpeg error on trimming video
103
+ - 56b131e: feat: decorate device methods for reporting
104
+
105
+ ## 0.1.31
106
+
107
+ ### Patch Changes
108
+
109
+ - b65f3db: fix: increased idle timeout in bs to 180 seconds
110
+
111
+ ## 0.1.30
112
+
113
+ ### Patch Changes
114
+
115
+ - 1b89ea4: fix: updated check for http url
116
+
117
+ ## 0.1.29
118
+
119
+ ### Patch Changes
120
+
121
+ - 896541e: support bs:// and lt:// app urls for providers
122
+ - b2de667: feat: log device.pause and skip it on CI environments
123
+
124
+ ## 0.1.28
125
+
126
+ ### Patch Changes
127
+
128
+ - 5bbd6e2: fix: increase maxDepth to 62
129
+
130
+ ## 0.1.27
131
+
132
+ ### Patch Changes
133
+
134
+ - 8fa6fca: fix: scale tap coordinates only by width for lambdatest getWindowRect() behavior
135
+ - 202ad6d: feat: added method to fill input fields using device
136
+
137
+ ## 0.1.26
138
+
139
+ ### Patch Changes
140
+
141
+ - c86131d: fix: added boxed step in scroll
142
+
143
+ ## 0.1.25
144
+
145
+ ### Patch Changes
146
+
147
+ - ed5f069: chore: upgrade llm/vision to 0.9.12
148
+
149
+ ## 0.1.24
150
+
151
+ ### Patch Changes
152
+
153
+ - 89afbf5: fix: added try catch in close session
154
+
155
+ ## 0.1.23
156
+
157
+ ### Patch Changes
158
+
159
+ - 3930289: feat: use drag method for ios scroll
160
+
161
+ ## 0.1.22
162
+
163
+ ### Patch Changes
164
+
165
+ - bccffd2: feat: add device.pause() and device.waitForTimeout() methods
166
+ - e1e3750: feat: vision.tap returns tap coordinates, vision.query accepts screenshot as option
167
+
168
+ ## 0.1.21
169
+
170
+ ### Patch Changes
171
+
172
+ - 029a708: fix: move assets location
173
+
174
+ ## 0.1.20
175
+
176
+ ### Patch Changes
177
+
178
+ - c91b815: fix: vision tap precision
179
+
180
+ ## 0.1.19
181
+
182
+ ### Patch Changes
183
+
184
+ - f43c977: chore: add log for worker teardown
185
+
186
+ ## 0.1.18
187
+
188
+ ### Patch Changes
189
+
190
+ - 168425b: feat: add locator.waitFor to check for attached or visible state
191
+
192
+ ## 0.1.17
193
+
194
+ ### Patch Changes
195
+
196
+ - 6aae307: feat: find ffmpeg path or install it
197
+ - a620d3c: fix: use promise.allSettled in reporter
198
+
199
+ ## 0.1.16
200
+
201
+ ### Patch Changes
202
+
203
+ - 13e5451: feat: move video downloader into a reporter
204
+ - 40540b1: feat: download and attach video for persistentDevice
205
+ - 3ed1b65: docs: persistent device
206
+ - 551b1dc: chore: minor docs and logging changes
207
+ - 289f2b4: feat: trim video for persistentDevice report with local ffmpeg
208
+
209
+ ## 0.1.15
210
+
211
+ ### Patch Changes
212
+
213
+ - 2be3c09: test: locator tests for isVisible method
214
+ - 32b5e24: chore: rename error log messages and ActionOptions
215
+ - 0c0c0df: chore: add custom errors for timeout and retryable
216
+
217
+ ## 0.1.14
218
+
219
+ ### Patch Changes
220
+
221
+ - 3de990b: fix: save videos not working
222
+
223
+ ## 0.1.13
224
+
225
+ ### Patch Changes
226
+
227
+ - 49dc470: feat: add persistentDevice as worker-level fixture
228
+ - 49dc470: feat: add methods for terminateApp and activateApp
229
+
230
+ ## 0.1.12
231
+
232
+ ### Patch Changes
233
+
234
+ - 44f9a4a: feat: added capability to select model in vision methods
235
+ - b8ff829: feat: optimize regex locator by identify simple groups in the pattern
236
+ - 5626697: feat: add appBundleId to config and make it mandatory for lambdatest
237
+ - 21a4b2c: chore: setup tests with vitest
238
+
239
+ ## 0.1.11
240
+
241
+ ### Patch Changes
242
+
243
+ - c86db58: feat: attach annotated images from vision calls to the report
244
+
245
+ ## 0.1.10
246
+
247
+ ### Patch Changes
248
+
249
+ - bbba9c5: fix: removed LambdaTest network capability
250
+
251
+ ## 0.1.9
252
+
253
+ ### Patch Changes
254
+
255
+ - 5d05bdc: feat: added scroll capabilities in appwright
256
+
257
+ ## 0.1.8
258
+
259
+ ### Patch Changes
260
+
261
+ - 1b83e1c: feat: support for landscape device orientation
262
+
263
+ ## 0.1.7
264
+
265
+ ### Patch Changes
266
+
267
+ - 961019c: fix: wait to download all videos and attach to report
268
+
269
+ ## 0.1.6
270
+
271
+ ### Patch Changes
272
+
273
+ - 80a4c6a: fix: remove await while downloading video from provider in saveVideo fixture
274
+
275
+ ## 0.1.5
276
+
277
+ ### Patch Changes
278
+
279
+ - ef1a2b8: fix: increased idle timeout for LambdaTest
280
+
281
+ ## 0.1.4
282
+
283
+ ### Patch Changes
284
+
285
+ - 65e2ca7: feat: added lambdatest support in appwright
286
+
287
+ ## 0.1.3
288
+
289
+ ### Patch Changes
290
+
291
+ - 197c3e2: chore: added-docs-in-npmignore
292
+
293
+ ## 0.1.2
294
+
295
+ ### Patch Changes
296
+
297
+ - 940ea32: fix: updated playwright version and removed exponential delays between retries
298
+
299
+ ## 0.1.1
300
+
301
+ ### Patch Changes
302
+
303
+ - 415f940: fix: removed check for installed emulator when running on real device
304
+
305
+ ## 0.1.0
306
+
307
+ ### Minor Changes
308
+
309
+ - 1e663d4: chore: updated docs and references
310
+
311
+ ## 0.0.41
312
+
313
+ ### Patch Changes
314
+
315
+ - 6bc5d18: fix: handle already running appium server
316
+ - 93386ad: fix: Move list and html reporter out of example and add them as default in appwright
317
+
318
+ ## 0.0.40
319
+
320
+ ### Patch Changes
321
+
322
+ - e9ca490: fix: removed console logs from bin
323
+
324
+ ## 0.0.39
325
+
326
+ ### Patch Changes
327
+
328
+ - 1e97b20: fix: references doc link
329
+
330
+ ## 0.0.38
331
+
332
+ ### Patch Changes
333
+
334
+ - 59d9e3d: chore: updated readme and docs
335
+
336
+ ## 0.0.37
337
+
338
+ ### Patch Changes
339
+
340
+ - afd436d: chore: remove example from npm package
341
+
342
+ ## 0.0.36
343
+
344
+ ### Patch Changes
345
+
346
+ - 0a3c34b: chore: updated `mockCameraView` method name
347
+
348
+ ## 0.0.35
349
+
350
+ ### Patch Changes
351
+
352
+ - b763d60: chore: eslint error in example
353
+ - 30712fd: feat: local device config now supports optional udid parameter
354
+ - 7b95f16: feat: added capability to perform browserStack camera injection using appwright
355
+ - 848108e: feat: multi activity support
356
+
357
+ ## 0.0.34
358
+
359
+ ### Patch Changes
360
+
361
+ - 14e72b7: chore: added npm script to extract app file
362
+
363
+ ## 0.0.33
364
+
365
+ ### Patch Changes
366
+
367
+ - 0a35685: fix: correct project not getting selected with `--project` flag
368
+
369
+ ## 0.0.32
370
+
371
+ ### Patch Changes
372
+
373
+ - ba88b2f: Buildpath validation
374
+ - 4f49719: chore: update error strings and add doc links
375
+
376
+ ## 0.0.31
377
+
378
+ ### Patch Changes
379
+
380
+ - f7bd426: feat: add support for test.skip if llm keys are not available
381
+
382
+ ## 0.0.30
383
+
384
+ ### Patch Changes
385
+
386
+ - f34bb56: fix: run global setup only for provided project
387
+
388
+ ## 0.0.29
389
+
390
+ ### Patch Changes
391
+
392
+ - a512d15: feat: add reinstallation of drivers
393
+
394
+ ## 0.0.28
395
+
396
+ ### Patch Changes
397
+
398
+ - c2efc55: fix: error running tests due to missing appium drivers
399
+
400
+ ## 0.0.27
401
+
402
+ ### Patch Changes
403
+
404
+ - db747d5: fix: add driver dependencies to appium
405
+
406
+ ## 0.0.26
407
+
408
+ ### Patch Changes
409
+
410
+ - 7b8d39a: feat: error message for udid for ios
411
+
412
+ ## 0.0.25
413
+
414
+ ### Patch Changes
415
+
416
+ - 62c6759: fix: app bundle id for browserstack provider
417
+
418
+ ## 0.0.24
419
+
420
+ ### Patch Changes
421
+
422
+ - 4951c96: fix: install appium driver if not installed already
423
+
424
+ ## 0.0.23
425
+
426
+ ### Patch Changes
427
+
428
+ - dcee15e: chore: update doc strings
429
+
430
+ ## 0.0.22
431
+
432
+ ### Patch Changes
433
+
434
+ - 8563e13: chore: remove verbose logs
435
+ - df08327: feat: added support to run appwright on local device
436
+
437
+ ## 0.0.21
438
+
439
+ ### Patch Changes
440
+
441
+ - 99a557c: fix: validation for config.globalSetup
442
+
443
+ ## 0.0.20
444
+
445
+ ### Patch Changes
446
+
447
+ - b210e79: fix: build upload validation in browserstack provider
448
+ - 9266137: chore: warning for globalSetup config behavior
449
+
450
+ ## 0.0.19
451
+
452
+ ### Patch Changes
453
+
454
+ - b8e6947: feat: support buildPath and build uploads with globalSetup
455
+ - 10c7397: fix: pick correct browserstack build url
456
+
457
+ ## 0.0.18
458
+
459
+ ### Patch Changes
460
+
461
+ - 6458d17: chore: refactored device provider methods
462
+ - 1b26228: fix: webdriver client getting passed as undefined to device
463
+
464
+ ## 0.0.17
465
+
466
+ ### Patch Changes
467
+
468
+ - ee98722: chore: refactored appwright APIs
469
+
470
+ ## 0.0.16
471
+
472
+ ### Patch Changes
473
+
474
+ - 8c04904: fix: remove custom reporter
475
+
476
+ ## 0.0.15
477
+
478
+ ### Patch Changes
479
+
480
+ - b9f5c3d: chore: move boxedStep to util and add locator docstrings
481
+ - 912b092: chore: rename internal classes for readability
482
+ - 2d1c600: feat: rename tap method
483
+ - 8febdb4: fix: added `boxedStep` decorator to actions
484
+ - 3abaabe: fix: corrected import for driver
485
+
486
+ ## 0.0.14
487
+
488
+ ### Patch Changes
489
+
490
+ - ebfb243: feat: added capability to search element using regex
491
+
492
+ ## 0.0.13
493
+
494
+ ### Patch Changes
495
+
496
+ - 4cb2069: feat: expose npx appwright bin
497
+
498
+ ## 0.0.12
499
+
500
+ ### Patch Changes
501
+
502
+ - 984a468: feat: added method to send keyboard key events
503
+
504
+ ## 0.0.11
505
+
506
+ ### Patch Changes
507
+
508
+ - 38fd3a3: fix: retry counts in waitUntil
509
+
510
+ ## 0.0.10
511
+
512
+ ### Patch Changes
513
+
514
+ - f22bdfb: feat: added llm vision in appwright
515
+
516
+ ## 0.0.9
517
+
518
+ ### Patch Changes
519
+
520
+ - e6989c9: fix: pick expect timeout from appwright config
521
+
522
+ ## 0.0.8
523
+
524
+ ### Patch Changes
525
+
526
+ - c6910dc: feat: added method getByXpath to get elements by xpath
527
+
528
+ ## 0.0.7
529
+
530
+ ### Patch Changes
531
+
532
+ - 5ab5fc8: chore: removed tests and configs from appwright
533
+
534
+ ## 0.0.6
535
+
536
+ ### Patch Changes
537
+
538
+ - 4dc686c: feat: added `getByText` and `getById` methods on driver