-
Notifications
You must be signed in to change notification settings - Fork 29
/
openapi.yaml
2615 lines (2580 loc) · 78.5 KB
/
openapi.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.2
info:
title: CulebraTester
description: |
## Snaky Android Test
---
If you want to be able to try out the API using the **Execute** or **TRY** button from this page
- an android device should be connected using `adb`
- the server should have been started using `./culebratester2 start-server`
then you will be able to invoke the API and see the responses.
version: 2.0.73
servers:
- url: http://localhost:9987/v2
paths:
/am/forceStop:
get:
description: Completely stop the given application package.
parameters:
- description: The package name
in: query
name: pkg
required: true
schema:
example: com.example.app
type: string
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Completely stop the given application package.
/configurator/getWaitForIdleTimeout:
get:
description: 'Gets the current timeout used for waiting for the user
interface to go into an idle state. By default, all core
uiautomator objects except `UiDevice` will perform this
wait before starting to search for the widget specified
by the object''s `UiSelector`. Once the idle state is
detected or the timeout elapses (whichever occurs firs),
the object will start to wait for the selector to find
match. See `setWaitForSelectorTimeout(long)`'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Timeout'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets the current timeout used for waiting for the user interface to
go into an idle state.
/configurator/setWaitForIdleTimeout:
get:
description: Sets the timeout for waiting for the user interface to go into
an idle state before starting a uiautomator action. By default, all core uiautomator
objects except `UiDevice` will perform this wait before starting to search
for the widget specified by the object's `UiSelector`. Once the idle state
is detected or the timeout elapses (whichever occurs first), the object will
start to wait for the selector to find a match. See `setWaitForSelectorTimeout(long)`
parameters:
- description: Timeout value in milliseconds
in: query
name: timeout
required: true
schema:
example: 10000
format: int64
type: integer
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Sets the timeout for waiting for the user interface to go into an idle
state before starting a uiautomator action.
/culebra/help/{api}:
get:
description: 'Gets help info about the *API* specified as parameter. For example
you can obtain information about
* /uiDevice/click
* /device/displayRealSize
* /uiDevice/screenshot
* etc.'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Help'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets help
parameters:
- description: Specify the API help is about
in: path
name: api
required: true
schema:
type: string
/culebra/info:
get:
description: Gets information about this app.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CulebraInfo'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets information about this app.
/culebra/quit:
get:
description: Quits cuebra server.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Quits culebra server.
/device/displayRealSize:
get:
description: Gets the display real size.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DisplayRealSize'
description: Display real size
default:
$ref: '#/components/responses/error'
summary: Gets display real size.
/device/dumpsys:
get:
description: dumpsys is a tool that runs on Android devices and provides information about system services. You can call dumpsys from the command line using the Android Debug Bridge (ADB) to get diagnostic output for all system services running on a connected device.
parameters:
- name: service
in: query
description: dumps only service SERVICE
required: true
schema:
example: usb
format: string
- name: arg1
in: query
description: argument 1 for dumpsys service command
required: false
schema:
format: string
- name: arg2
in: query
description: argument 2 for dumpsys service command
required: false
schema:
format: string
- name: arg3
in: query
description: argument 3 for dumpsys service command
required: false
schema:
format: string
responses:
'200':
content:
text/plain:
example: Hello
description: dumpsys output
/device/locale:
get:
description: Gets the device locale
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Locale'
description: The locale
post:
description: Changes the device locale
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Locale'
example:
language: es
country: US
description: The locale
required: true
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
/device/waitForNewToast:
get:
description: Waits for a new Toast until timeout.
parameters:
- description: The timeout in ms
in: query
name: timeout
required: false
schema:
example: 10000
format: int64
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/Text'
description: New Toast found
default:
$ref: '#/components/responses/error'
summary: Waits for a new Toast.
/objectStore/clear:
get:
description: Clears all the objects in store.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Clears all the objects in store.
/objectStore/list:
get:
description: Lists the objects in store.
responses:
'200':
content:
application/json:
schema:
items:
properties:
obj:
$ref: '#/components/schemas/AnyValue'
oid:
type: integer
type: object
type: array
description: OK
default:
$ref: '#/components/responses/error'
summary: Lists the objects in store.
/objectStore/remove:
get:
description: Removes an object that has been stored in ObjectStore.
parameters:
- description: The object ID
in: query
name: oid
required: true
schema:
type: integer
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Removes an object.
/targetContext/startActivity:
get:
description: Starts an Activity.
parameters:
- description: the package name
in: query
name: pkg
required: true
schema:
type: string
- description: the class name
in: query
name: cls
required: true
schema:
type: string
- description: the URI (i. e. https://example.com)
in: query
name: uri
required: false
schema:
type: string
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Starts an Activity.
/uiDevice/clearLastTraversedText:
get:
description: Clears the text from the last UI traversal event.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Clears the text from the last UI traversal event.
/uiDevice/click:
get:
description: Clicks at the specified location.
parameters:
- description: x coordinate
in: query
name: x
required: true
schema:
minimum: 0
type: integer
- description: y coordinate
in: query
name: y
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
text/plain:
example: OK
schema:
type: string
description: OK
default:
$ref: '#/components/responses/error'
summary: Clicks at the specified location.
post:
description: Clicks at the specified locations.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/ClickBody'
required: true
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Clicks at the specified locations.
/uiDevice/currentPackageName:
get:
description: Gets the current package name.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/CurrentPackageName'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets the current package name.
/uiDevice/displayHeight:
get:
description: Gets the display height.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DisplayHeight'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets the display height.
/uiDevice/displayRotation:
get:
description: Gets the display rotation.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DisplayRotationResponse'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets the display rotation.
/uiDevice/displaySizeDp:
get:
description: Gets the display size in DP.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DisplaySizeDp'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets the display size in DP.
/uiDevice/displayWidth:
get:
description: Gets the display width.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/DisplayWidth'
description: OK
default:
$ref: '#/components/responses/error'
summary: Gets the display width.
/uiDevice/drag:
get:
description: Performs a swipe from one coordinate to another coordinate. You
can control the smoothness and speed of the swipe by specifying the number
of steps. Each step execution is throttled to 5 milliseconds per step, so
for a 100 steps, the swipe will take around 0.5 seconds to complete.
parameters:
- description: from x
in: query
name: startX
required: true
schema:
minimum: 0
type: integer
- description: from y
in: query
name: startY
required: true
schema:
minimum: 0
type: integer
- description: to x
in: query
name: endX
required: true
schema:
minimum: 0
type: integer
- description: end y
in: query
name: endY
required: true
schema:
minimum: 0
type: integer
- description: is the number of move steps sent to the system
in: query
name: steps
required: true
schema:
minimum: 0
type: integer
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Performs a swipe from one coordinate to another coordinate.
/uiDevice/dumpWindowHierarchy:
get:
description: Dumps the window hierarchy.
parameters:
- description: the output format
in: query
name: format
required: false
schema:
type: string
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WindowHierarchy'
application/xml:
schema:
$ref: '#/components/schemas/WindowHierarchy'
description: Window hierarchy
default:
$ref: '#/components/responses/error'
summary: Dumps the window hierarchy.
/uiDevice/findObject:
get:
description: Finds an object. The object found, if any, can be later used in
other call like API.click.
parameters:
- description: the resource id
example: com.android.calendar:id/d0_label
in: query
name: resourceId
schema:
type: string
- description: 'the selector sets the resource name criteria for matching. A
UI element will be considered a match if its resource name exactly matches
the selector parameter and all other criteria for this selector are met.
The format of the selector string is
`sel@[\$]value,...`
Where `sel` can be one of - clazz or className - clickable - depth - desc
- index - instance - package - parentIndex - res - scrollable - text
`@` replaces the `=` sign that is used to separate parameters and values
in the URL. If the first character of value is `$` then a `Pattern` is created.'
example: [email protected]:id/d0_label,instance@1
in: query
name: uiSelector
schema:
type: string
- description: 'the selector sets the resource name criteria for matching. A
UI element will be considered a match if its resource name exactly matches
the selector parameter and all other criteria for this selector are met.
The format of the selector string is
`sel@[\$]value,...`
Where `sel` can be one of - checkable - clazz - clickable - depth - desc
- package - res - scrollable - text
`@` replaces the `=` sign that is used to separate parameters and values
in the URL. If the first character of value is `$` then a `Pattern` is created.'
example: [email protected]:id/d0_label,depth@2
in: query
name: bySelector
schema:
type: string
responses:
'200':
content:
application/json:
example:
className: android.widget.TextView
oid: 1
schema:
$ref: '#/components/schemas/ObjectRef'
description: Object found
'404':
content:
application/json:
example:
errorMessage: Object not found
errorStatusResponse: 1001
status: ERROR
schema:
$ref: '#/components/schemas/StatusResponse'
description: Object not found
default:
$ref: '#/components/responses/error'
summary: Finds an object.
post:
description: Finds an object. The object found, if any, can be later used in
other call like API.click.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Selector'
description: Selector
required: true
responses:
'200':
content:
application/json:
example:
className: android.widget.Button
oid: 1
schema:
$ref: '#/components/schemas/ObjectRef'
description: Object found
'404':
content:
application/json:
example:
errorMessage: Object not found
errorStatusResponse: 1001
status: ERROR
schema:
$ref: '#/components/schemas/StatusResponse'
description: Object not found
default:
$ref: '#/components/responses/error'
summary: Finds an object.
/uiDevice/findObjects:
get:
description: Finds objects. The object found, if any, can be later used in
other call like API.click.
parameters:
- description: 'the selector sets the resource name criteria for matching. A
UI element will be considered a match if its resource name exactly matches
the selector parameter and all other criteria for this selector are met.
The format of the selector string is
`sel@[\$]value,...`
Where `sel` can be one of - checkable - clazz - clickable - depth - desc
- package - res - scrollable - text
`@` replaces the `=` sign that is used to separate parameters and values
in the URL. If the first character of value is `$` then a `Pattern` is created.'
example: [email protected]:id/d0_label,depth@2
in: query
name: bySelector
schema:
type: string
responses:
'200':
content:
application/json:
example:
- className: android.widget.Button
oid: 1
- className: android.widget.TextView
oid: 2
schema:
items:
$ref: '#/components/schemas/ObjectRef'
type: array
description: Objects found
'404':
content:
application/json:
example:
errorMessage: Object not found
errorStatusResponse: 1001
status: ERROR
schema:
$ref: '#/components/schemas/StatusResponse'
description: Object not found
default:
$ref: '#/components/responses/error'
summary: Finds *all* objects that match the selector criteria.
post:
description: Finds all objects. The objects found, if any, can be later used in
other call like API.click.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Selector'
description: Selector
required: true
responses:
'200':
content:
application/json:
example:
- className: android.widget.Button
oid: 1
- className: android.widget.TextView
oid: 2
schema:
items:
$ref: '#/components/schemas/ObjectRef'
type: array
description: Objects found
'404':
content:
application/json:
example:
errorMessage: Object not found
errorStatusResponse: 1001
status: ERROR
schema:
$ref: '#/components/schemas/StatusResponse'
description: Object not found
default:
$ref: '#/components/responses/error'
summary: Finds *all* objects.
/uiDevice/freezeRotation:
get:
description: Disables the sensors and freezes the device rotation at its current
rotation state.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Disables the sensors and freezes the device rotation at its current
rotation state.
/uiDevice/hasObject:
get:
description: Returns whether there is a match for the given selector criteria.
parameters:
- description: 'the selector sets the resource name criteria for matching. A
UI element will be considered a match if its resource name exactly matches
the selector parameter and all other criteria for this selector are met.
The format of the selector string is
`sel@[\$]value,...`
Where `sel` can be one of - checkable - clazz - clickable - depth - desc
- package - res - scrollable - text
`@` replaces the `=` sign that is used to separate parameters and values
in the URL. If the first character of value is `$` then a `Pattern` is created.'
example: [email protected]:id/d0_label,depth@2
in: query
name: bySelector
required: true
schema:
type: string
responses:
'200':
$ref: '#/components/responses/trueResponse'
default:
$ref: '#/components/responses/error'
summary: Returns whether there is a match for the given selector criteria.
post:
description: Returns whether there is a match for the given selector criteria.
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/Selector'
description: Selector
required: true
responses:
'200':
$ref: '#/components/responses/trueResponse'
default:
$ref: '#/components/responses/error'
summary: Returns whether there is a match for the given selector criteria.
/uiDevice/isNaturalOrientation:
get:
description: This is determined by checking if the orientation is at 0 or 180
degrees.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BooleanResponse'
description: OK
default:
$ref: '#/components/responses/error'
summary: Check if the device is in its natural orientation.
/uiDevice/isScreenOn:
get:
description: Checks the power manager if the screen is ON.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/BooleanResponse'
description: OK
default:
$ref: '#/components/responses/error'
summary: Checks the power manager if the screen is ON.
/uiDevice/lastTraversedText:
get:
description: Retrieves the text from the last UI traversal event received.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/LastTraversedText'
description: OK
default:
$ref: '#/components/responses/error'
summary: Retrieves the text from the last UI traversal event received.
/uiDevice/pixel:
get:
description: 'Gets a pixel on the device screen screenshot.
'
parameters:
- description: The x coordinate
example: 300
in: query
name: x
required: true
schema:
minimum: 0
type: integer
- description: The y coordinate
example: 1020
in: query
name: y
required: true
schema:
minimum: 0
type: integer
responses:
'200':
content:
application/json:
example:
a: 255
b: 123
g: 140
r: 132
schema:
$ref: '#/components/schemas/Pixel'
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
description: Cannot obtain pixel
summary: Gets a pixel from device screen.
/uiDevice/pressBack:
get:
description: Simulates a short press on the BACK button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the BACK button.
/uiDevice/pressDPadCenter:
get:
description: Simulates a short press on the CENTER button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the CENTER button.
/uiDevice/pressDPadDown:
get:
description: Simulates a short press on the DOWN button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the DOWN button.
/uiDevice/pressDPadLeft:
get:
description: Simulates a short press on the LEFT button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the LEFT button.
/uiDevice/pressDPadRight:
get:
description: Simulates a short press on the RIGHT button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the RIGHT button.
/uiDevice/pressDPadUp:
get:
description: Simulates a short press on the UP button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the UP button.
/uiDevice/pressDelete:
get:
description: Simulates a short press on the DELETE key.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the DELETE key.
/uiDevice/pressEnter:
get:
description: Simulates a short press on the ENTER key.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the ENTER key.
/uiDevice/pressHome:
get:
description: Simulates a short press on the HOME button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the HOME button.
/uiDevice/pressKeyCode:
get:
description: Simulates a short press using a key code.
parameters:
- description: the key code of the event.
in: query
name: keyCode
required: true
schema:
type: integer
- description: an integer in which each bit set to 1 represents a pressed meta
key
in: query
name: metaState
required: false
schema:
type: integer
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press using a key code.
/uiDevice/pressRecentApps:
get:
description: Simulates a short press on the Recent Apps button.
responses:
'200':
$ref: '#/components/responses/ok'
default:
$ref: '#/components/responses/error'
summary: Simulates a short press on the Recent Apps button.
/uiDevice/productName:
get:
description: Retrieves the product name of the device.
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/ProductName'
description: OK
default:
$ref: '#/components/responses/error'
summary: Retrieves the product name of the device.
/uiDevice/screenshot:
get:
description: 'Gets the device screenshot and can be influenced by the parameters.
For example the `scale` of the screenshot or its `quality` can be specified.
**NOTE**: [`UiDevice.takeScreenshot()`](https://developer.android.com/reference/android/support/test/uiautomator/UiDevice.html#takeScreenshot(java.io.File,%20float,%20int))
usually ignores these parameters so expect no change.
'
parameters:
- description: The scale of the screenshot (i.e. 0.5)
example: 0.5
in: query
name: scale
required: false
schema:
exclusiveMinimum: true
format: float
maximum: 1
minimum: 0
type: number
- description: The quality of the screenshot (i.e. 100)
example: 90
in: query
name: quality
required: false
schema:
maximum: 100
minimum: 1
type: integer
responses:
'200':
content:
image/png:
examples:
exernal-image-example:
externalValue: https://raw.githubusercontent.com/wiki/dtmilano/AndroidViewClient/images/emulator-launcher-shortcuts.png
summary: External example image
schema:
format: binary
type: string
description: OK
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/StatusResponse'
description: Cannot obtain screenshot
summary: Gets the device screenshot.
/uiDevice/swipe:
get:
description: Performs a swipe from one coordinate to another using the number
of steps to determine smoothness and speed. Each step execution is throttled
to 5ms per step. So for a 100 steps, the swipe will take about 1/2 second
to complete.
parameters:
- description: from x
in: query
name: startX
required: true
schema:
minimum: 0
type: integer
- description: from y