droidline 0.1.9 → 0.1.11
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/generated.d.ts +902 -12
- package/dist/generated.js +34 -4
- package/package.json +1 -1
package/dist/generated.d.ts
CHANGED
|
@@ -104,6 +104,13 @@ export interface DeviceInfo {
|
|
|
104
104
|
leased?: any;
|
|
105
105
|
[field: string]: any;
|
|
106
106
|
}
|
|
107
|
+
export interface ImageMatch {
|
|
108
|
+
x?: any;
|
|
109
|
+
y?: any;
|
|
110
|
+
bounds?: any;
|
|
111
|
+
score?: any;
|
|
112
|
+
[field: string]: any;
|
|
113
|
+
}
|
|
107
114
|
export interface Notification {
|
|
108
115
|
key?: any;
|
|
109
116
|
package?: any;
|
|
@@ -163,6 +170,12 @@ export interface FindImageOptions {
|
|
|
163
170
|
threshold?: number;
|
|
164
171
|
/** Seconds to wait for the target to appear. @default 10 */
|
|
165
172
|
timeout?: number;
|
|
173
|
+
/** Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match. */
|
|
174
|
+
region?: ReadonlyArray<number>;
|
|
175
|
+
/** Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time. */
|
|
176
|
+
scales?: ReadonlyArray<number>;
|
|
177
|
+
/** Also require the average color to agree, so a red and a green button of the same shape differ. @default false */
|
|
178
|
+
color?: boolean;
|
|
166
179
|
}
|
|
167
180
|
export interface FindImageResult {
|
|
168
181
|
x: number;
|
|
@@ -175,6 +188,12 @@ export interface TapImageOptions {
|
|
|
175
188
|
threshold?: number;
|
|
176
189
|
/** Seconds to wait for the target to appear. @default 10 */
|
|
177
190
|
timeout?: number;
|
|
191
|
+
/** Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match. */
|
|
192
|
+
region?: ReadonlyArray<number>;
|
|
193
|
+
/** Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time. */
|
|
194
|
+
scales?: ReadonlyArray<number>;
|
|
195
|
+
/** Also require the average color to agree, so a red and a green button of the same shape differ. @default false */
|
|
196
|
+
color?: boolean;
|
|
178
197
|
}
|
|
179
198
|
export interface TapImageResult {
|
|
180
199
|
x: number;
|
|
@@ -182,6 +201,45 @@ export interface TapImageResult {
|
|
|
182
201
|
score: number;
|
|
183
202
|
ms: number;
|
|
184
203
|
}
|
|
204
|
+
export interface ImageExistsOptions {
|
|
205
|
+
/** How close the match must be, from 0 to 1. @default 0.9 */
|
|
206
|
+
threshold?: number;
|
|
207
|
+
/** Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match. */
|
|
208
|
+
region?: ReadonlyArray<number>;
|
|
209
|
+
/** Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time. */
|
|
210
|
+
scales?: ReadonlyArray<number>;
|
|
211
|
+
/** Also require the average color to agree, so a red and a green button of the same shape differ. @default false */
|
|
212
|
+
color?: boolean;
|
|
213
|
+
}
|
|
214
|
+
export interface FindImagesOptions {
|
|
215
|
+
/** How close the match must be, from 0 to 1. @default 0.9 */
|
|
216
|
+
threshold?: number;
|
|
217
|
+
/** Seconds to wait for at least one match. 0 answers at once. @default 0 */
|
|
218
|
+
timeout?: number;
|
|
219
|
+
/** Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match. */
|
|
220
|
+
region?: ReadonlyArray<number>;
|
|
221
|
+
/** Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time. */
|
|
222
|
+
scales?: ReadonlyArray<number>;
|
|
223
|
+
/** Also require the average color to agree, so a red and a green button of the same shape differ. @default false */
|
|
224
|
+
color?: boolean;
|
|
225
|
+
/** Most matches to return. @default 20 */
|
|
226
|
+
max?: number;
|
|
227
|
+
}
|
|
228
|
+
export interface WaitImageGoneOptions {
|
|
229
|
+
/** How close the match must be, from 0 to 1. @default 0.9 */
|
|
230
|
+
threshold?: number;
|
|
231
|
+
/** Seconds to wait for the target to appear. @default 10 */
|
|
232
|
+
timeout?: number;
|
|
233
|
+
/** Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match. */
|
|
234
|
+
region?: ReadonlyArray<number>;
|
|
235
|
+
/** Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time. */
|
|
236
|
+
scales?: ReadonlyArray<number>;
|
|
237
|
+
/** Also require the average color to agree, so a red and a green button of the same shape differ. @default false */
|
|
238
|
+
color?: boolean;
|
|
239
|
+
}
|
|
240
|
+
export interface WaitImageGoneResult {
|
|
241
|
+
ms: number;
|
|
242
|
+
}
|
|
185
243
|
export interface OcrOptions {
|
|
186
244
|
/** Tesseract languages, such as kor+eng. Each needs its language data installed. @default "eng" */
|
|
187
245
|
lang?: string;
|
|
@@ -594,11 +652,14 @@ export declare abstract class DeviceCommands {
|
|
|
594
652
|
/**
|
|
595
653
|
* Find a picture on the screen.
|
|
596
654
|
*
|
|
597
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
655
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
598
656
|
*
|
|
599
657
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
600
658
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
601
659
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
660
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
661
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
662
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
602
663
|
* @param opts Optional parameters by name, see FindImageOptions.
|
|
603
664
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
604
665
|
* @example await d.find_image("ok-button.png")
|
|
@@ -607,11 +668,14 @@ export declare abstract class DeviceCommands {
|
|
|
607
668
|
/**
|
|
608
669
|
* Find a picture on the screen.
|
|
609
670
|
*
|
|
610
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
671
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
611
672
|
*
|
|
612
673
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
613
674
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
614
675
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
676
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
677
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
678
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
615
679
|
* @param opts Optional parameters by name, see FindImageOptions.
|
|
616
680
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
617
681
|
* @example await d.find_image("ok-button.png")
|
|
@@ -620,11 +684,14 @@ export declare abstract class DeviceCommands {
|
|
|
620
684
|
/**
|
|
621
685
|
* Find a picture on the screen.
|
|
622
686
|
*
|
|
623
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
687
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
624
688
|
*
|
|
625
689
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
626
690
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
627
691
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
692
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
693
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
694
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
628
695
|
* @param opts Optional parameters by name, see FindImageOptions.
|
|
629
696
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
630
697
|
* @example await d.find_image("ok-button.png")
|
|
@@ -633,11 +700,62 @@ export declare abstract class DeviceCommands {
|
|
|
633
700
|
/**
|
|
634
701
|
* Find a picture on the screen.
|
|
635
702
|
*
|
|
636
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
703
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
704
|
+
*
|
|
705
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
706
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
707
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
708
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
709
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
710
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
711
|
+
* @param opts Optional parameters by name, see FindImageOptions.
|
|
712
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
713
|
+
* @example await d.find_image("ok-button.png")
|
|
714
|
+
*/
|
|
715
|
+
find_image(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: FindImageOptions): Promise<FindImageResult>;
|
|
716
|
+
/**
|
|
717
|
+
* Find a picture on the screen.
|
|
718
|
+
*
|
|
719
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
720
|
+
*
|
|
721
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
722
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
723
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
724
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
725
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
726
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
727
|
+
* @param opts Optional parameters by name, see FindImageOptions.
|
|
728
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
729
|
+
* @example await d.find_image("ok-button.png")
|
|
730
|
+
*/
|
|
731
|
+
find_image(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: FindImageOptions): Promise<FindImageResult>;
|
|
732
|
+
/**
|
|
733
|
+
* Find a picture on the screen.
|
|
734
|
+
*
|
|
735
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
736
|
+
*
|
|
737
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
738
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
739
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
740
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
741
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
742
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
743
|
+
* @param opts Optional parameters by name, see FindImageOptions.
|
|
744
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
745
|
+
* @example await d.find_image("ok-button.png")
|
|
746
|
+
*/
|
|
747
|
+
find_image(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: FindImageOptions): Promise<FindImageResult>;
|
|
748
|
+
/**
|
|
749
|
+
* Find a picture on the screen.
|
|
750
|
+
*
|
|
751
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
637
752
|
*
|
|
638
753
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
639
754
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
640
755
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
756
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
757
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
758
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
641
759
|
* @param opts Optional parameters by name, see FindImageOptions.
|
|
642
760
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
643
761
|
* @example await d.find_image("ok-button.png")
|
|
@@ -647,11 +765,14 @@ export declare abstract class DeviceCommands {
|
|
|
647
765
|
/**
|
|
648
766
|
* Find a picture on the screen.
|
|
649
767
|
*
|
|
650
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
768
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
651
769
|
*
|
|
652
770
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
653
771
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
654
772
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
773
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
774
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
775
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
655
776
|
* @param opts Optional parameters by name, see FindImageOptions.
|
|
656
777
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
657
778
|
* @example await d.find_image("ok-button.png")
|
|
@@ -661,25 +782,82 @@ export declare abstract class DeviceCommands {
|
|
|
661
782
|
/**
|
|
662
783
|
* Find a picture on the screen.
|
|
663
784
|
*
|
|
664
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
785
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
665
786
|
*
|
|
666
787
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
667
788
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
668
789
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
790
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
791
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
792
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
669
793
|
* @param opts Optional parameters by name, see FindImageOptions.
|
|
670
794
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
671
795
|
* @example await d.find_image("ok-button.png")
|
|
672
796
|
* @alias find_image
|
|
673
797
|
*/
|
|
674
798
|
findImage(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: FindImageOptions): Promise<FindImageResult>;
|
|
799
|
+
/**
|
|
800
|
+
* Find a picture on the screen.
|
|
801
|
+
*
|
|
802
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
803
|
+
*
|
|
804
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
805
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
806
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
807
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
808
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
809
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
810
|
+
* @param opts Optional parameters by name, see FindImageOptions.
|
|
811
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
812
|
+
* @example await d.find_image("ok-button.png")
|
|
813
|
+
* @alias find_image
|
|
814
|
+
*/
|
|
815
|
+
findImage(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: FindImageOptions): Promise<FindImageResult>;
|
|
816
|
+
/**
|
|
817
|
+
* Find a picture on the screen.
|
|
818
|
+
*
|
|
819
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
820
|
+
*
|
|
821
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
822
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
823
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
824
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
825
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
826
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
827
|
+
* @param opts Optional parameters by name, see FindImageOptions.
|
|
828
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
829
|
+
* @example await d.find_image("ok-button.png")
|
|
830
|
+
* @alias find_image
|
|
831
|
+
*/
|
|
832
|
+
findImage(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: FindImageOptions): Promise<FindImageResult>;
|
|
833
|
+
/**
|
|
834
|
+
* Find a picture on the screen.
|
|
835
|
+
*
|
|
836
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
837
|
+
*
|
|
838
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
839
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
840
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
841
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
842
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
843
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
844
|
+
* @param opts Optional parameters by name, see FindImageOptions.
|
|
845
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
846
|
+
* @example await d.find_image("ok-button.png")
|
|
847
|
+
* @alias find_image
|
|
848
|
+
*/
|
|
849
|
+
findImage(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: FindImageOptions): Promise<FindImageResult>;
|
|
675
850
|
/**
|
|
676
851
|
* Find a picture on the screen and tap its center.
|
|
677
852
|
*
|
|
678
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
853
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
679
854
|
*
|
|
680
855
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
681
856
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
682
857
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
858
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
859
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
860
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
683
861
|
* @param opts Optional parameters by name, see TapImageOptions.
|
|
684
862
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
685
863
|
* @example await d.tap_image("ok-button.png")
|
|
@@ -688,11 +866,14 @@ export declare abstract class DeviceCommands {
|
|
|
688
866
|
/**
|
|
689
867
|
* Find a picture on the screen and tap its center.
|
|
690
868
|
*
|
|
691
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
869
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
692
870
|
*
|
|
693
871
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
694
872
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
695
873
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
874
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
875
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
876
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
696
877
|
* @param opts Optional parameters by name, see TapImageOptions.
|
|
697
878
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
698
879
|
* @example await d.tap_image("ok-button.png")
|
|
@@ -701,11 +882,14 @@ export declare abstract class DeviceCommands {
|
|
|
701
882
|
/**
|
|
702
883
|
* Find a picture on the screen and tap its center.
|
|
703
884
|
*
|
|
704
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
885
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
705
886
|
*
|
|
706
887
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
707
888
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
708
889
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
890
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
891
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
892
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
709
893
|
* @param opts Optional parameters by name, see TapImageOptions.
|
|
710
894
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
711
895
|
* @example await d.tap_image("ok-button.png")
|
|
@@ -714,11 +898,62 @@ export declare abstract class DeviceCommands {
|
|
|
714
898
|
/**
|
|
715
899
|
* Find a picture on the screen and tap its center.
|
|
716
900
|
*
|
|
717
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
901
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
718
902
|
*
|
|
719
903
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
720
904
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
721
905
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
906
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
907
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
908
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
909
|
+
* @param opts Optional parameters by name, see TapImageOptions.
|
|
910
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
911
|
+
* @example await d.tap_image("ok-button.png")
|
|
912
|
+
*/
|
|
913
|
+
tap_image(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: TapImageOptions): Promise<TapImageResult>;
|
|
914
|
+
/**
|
|
915
|
+
* Find a picture on the screen and tap its center.
|
|
916
|
+
*
|
|
917
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
918
|
+
*
|
|
919
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
920
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
921
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
922
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
923
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
924
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
925
|
+
* @param opts Optional parameters by name, see TapImageOptions.
|
|
926
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
927
|
+
* @example await d.tap_image("ok-button.png")
|
|
928
|
+
*/
|
|
929
|
+
tap_image(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: TapImageOptions): Promise<TapImageResult>;
|
|
930
|
+
/**
|
|
931
|
+
* Find a picture on the screen and tap its center.
|
|
932
|
+
*
|
|
933
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
934
|
+
*
|
|
935
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
936
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
937
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
938
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
939
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
940
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
941
|
+
* @param opts Optional parameters by name, see TapImageOptions.
|
|
942
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
943
|
+
* @example await d.tap_image("ok-button.png")
|
|
944
|
+
*/
|
|
945
|
+
tap_image(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: TapImageOptions): Promise<TapImageResult>;
|
|
946
|
+
/**
|
|
947
|
+
* Find a picture on the screen and tap its center.
|
|
948
|
+
*
|
|
949
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
950
|
+
*
|
|
951
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
952
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
953
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
954
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
955
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
956
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
722
957
|
* @param opts Optional parameters by name, see TapImageOptions.
|
|
723
958
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
724
959
|
* @example await d.tap_image("ok-button.png")
|
|
@@ -728,11 +963,14 @@ export declare abstract class DeviceCommands {
|
|
|
728
963
|
/**
|
|
729
964
|
* Find a picture on the screen and tap its center.
|
|
730
965
|
*
|
|
731
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
966
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
732
967
|
*
|
|
733
968
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
734
969
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
735
970
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
971
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
972
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
973
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
736
974
|
* @param opts Optional parameters by name, see TapImageOptions.
|
|
737
975
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
738
976
|
* @example await d.tap_image("ok-button.png")
|
|
@@ -742,17 +980,669 @@ export declare abstract class DeviceCommands {
|
|
|
742
980
|
/**
|
|
743
981
|
* Find a picture on the screen and tap its center.
|
|
744
982
|
*
|
|
745
|
-
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone
|
|
983
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
746
984
|
*
|
|
747
985
|
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
748
986
|
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
749
987
|
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
988
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
989
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
990
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
750
991
|
* @param opts Optional parameters by name, see TapImageOptions.
|
|
751
992
|
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
752
993
|
* @example await d.tap_image("ok-button.png")
|
|
753
994
|
* @alias tap_image
|
|
754
995
|
*/
|
|
755
996
|
tapImage(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: TapImageOptions): Promise<TapImageResult>;
|
|
997
|
+
/**
|
|
998
|
+
* Find a picture on the screen and tap its center.
|
|
999
|
+
*
|
|
1000
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1001
|
+
*
|
|
1002
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1003
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1004
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1005
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1006
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1007
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1008
|
+
* @param opts Optional parameters by name, see TapImageOptions.
|
|
1009
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
1010
|
+
* @example await d.tap_image("ok-button.png")
|
|
1011
|
+
* @alias tap_image
|
|
1012
|
+
*/
|
|
1013
|
+
tapImage(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: TapImageOptions): Promise<TapImageResult>;
|
|
1014
|
+
/**
|
|
1015
|
+
* Find a picture on the screen and tap its center.
|
|
1016
|
+
*
|
|
1017
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1018
|
+
*
|
|
1019
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1020
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1021
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1022
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1023
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1024
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1025
|
+
* @param opts Optional parameters by name, see TapImageOptions.
|
|
1026
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
1027
|
+
* @example await d.tap_image("ok-button.png")
|
|
1028
|
+
* @alias tap_image
|
|
1029
|
+
*/
|
|
1030
|
+
tapImage(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: TapImageOptions): Promise<TapImageResult>;
|
|
1031
|
+
/**
|
|
1032
|
+
* Find a picture on the screen and tap its center.
|
|
1033
|
+
*
|
|
1034
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1035
|
+
*
|
|
1036
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1037
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1038
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1039
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1040
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1041
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1042
|
+
* @param opts Optional parameters by name, see TapImageOptions.
|
|
1043
|
+
* @throws {DroidlineError} with code NOT_FOUND, NO_PERMISSION.
|
|
1044
|
+
* @example await d.tap_image("ok-button.png")
|
|
1045
|
+
* @alias tap_image
|
|
1046
|
+
*/
|
|
1047
|
+
tapImage(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: TapImageOptions): Promise<TapImageResult>;
|
|
1048
|
+
/**
|
|
1049
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1050
|
+
*
|
|
1051
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1052
|
+
*
|
|
1053
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1054
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1055
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1056
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1057
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1058
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1059
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1060
|
+
* @example await d.image_exists("coin.png")
|
|
1061
|
+
*/
|
|
1062
|
+
image_exists(image: string | Uint8Array, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1063
|
+
/**
|
|
1064
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1065
|
+
*
|
|
1066
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1067
|
+
*
|
|
1068
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1069
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1070
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1071
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1072
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1073
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1074
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1075
|
+
* @example await d.image_exists("coin.png")
|
|
1076
|
+
*/
|
|
1077
|
+
image_exists(image: string | Uint8Array, threshold?: number, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1078
|
+
/**
|
|
1079
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1080
|
+
*
|
|
1081
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1082
|
+
*
|
|
1083
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1084
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1085
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1086
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1087
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1088
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1089
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1090
|
+
* @example await d.image_exists("coin.png")
|
|
1091
|
+
*/
|
|
1092
|
+
image_exists(image: string | Uint8Array, threshold?: number, region?: ReadonlyArray<number>, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1093
|
+
/**
|
|
1094
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1095
|
+
*
|
|
1096
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1097
|
+
*
|
|
1098
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1099
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1100
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1101
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1102
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1103
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1104
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1105
|
+
* @example await d.image_exists("coin.png")
|
|
1106
|
+
*/
|
|
1107
|
+
image_exists(image: string | Uint8Array, threshold?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1108
|
+
/**
|
|
1109
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1110
|
+
*
|
|
1111
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1112
|
+
*
|
|
1113
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1114
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1115
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1116
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1117
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1118
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1119
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1120
|
+
* @example await d.image_exists("coin.png")
|
|
1121
|
+
*/
|
|
1122
|
+
image_exists(image: string | Uint8Array, threshold?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1123
|
+
/**
|
|
1124
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1125
|
+
*
|
|
1126
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1127
|
+
*
|
|
1128
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1129
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1130
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1131
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1132
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1133
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1134
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1135
|
+
* @example await d.image_exists("coin.png")
|
|
1136
|
+
* @alias image_exists
|
|
1137
|
+
*/
|
|
1138
|
+
imageExists(image: string | Uint8Array, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1139
|
+
/**
|
|
1140
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1141
|
+
*
|
|
1142
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1143
|
+
*
|
|
1144
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1145
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1146
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1147
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1148
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1149
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1150
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1151
|
+
* @example await d.image_exists("coin.png")
|
|
1152
|
+
* @alias image_exists
|
|
1153
|
+
*/
|
|
1154
|
+
imageExists(image: string | Uint8Array, threshold?: number, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1155
|
+
/**
|
|
1156
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1157
|
+
*
|
|
1158
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1159
|
+
*
|
|
1160
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1161
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1162
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1163
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1164
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1165
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1166
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1167
|
+
* @example await d.image_exists("coin.png")
|
|
1168
|
+
* @alias image_exists
|
|
1169
|
+
*/
|
|
1170
|
+
imageExists(image: string | Uint8Array, threshold?: number, region?: ReadonlyArray<number>, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1171
|
+
/**
|
|
1172
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1173
|
+
*
|
|
1174
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1175
|
+
*
|
|
1176
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1177
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1178
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1179
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1180
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1181
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1182
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1183
|
+
* @example await d.image_exists("coin.png")
|
|
1184
|
+
* @alias image_exists
|
|
1185
|
+
*/
|
|
1186
|
+
imageExists(image: string | Uint8Array, threshold?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1187
|
+
/**
|
|
1188
|
+
* Whether a picture is on the screen right now. Never waits.
|
|
1189
|
+
*
|
|
1190
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1191
|
+
*
|
|
1192
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1193
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1194
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1195
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1196
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1197
|
+
* @param opts Optional parameters by name, see ImageExistsOptions.
|
|
1198
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1199
|
+
* @example await d.image_exists("coin.png")
|
|
1200
|
+
* @alias image_exists
|
|
1201
|
+
*/
|
|
1202
|
+
imageExists(image: string | Uint8Array, threshold?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: ImageExistsOptions): Promise<boolean>;
|
|
1203
|
+
/**
|
|
1204
|
+
* Every place a picture appears on the screen.
|
|
1205
|
+
*
|
|
1206
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1207
|
+
*
|
|
1208
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1209
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1210
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1211
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1212
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1213
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1214
|
+
* @param max Most matches to return. Default: 20.
|
|
1215
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1216
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1217
|
+
* @example await d.find_images("coin.png")
|
|
1218
|
+
*/
|
|
1219
|
+
find_images(image: string | Uint8Array, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1220
|
+
/**
|
|
1221
|
+
* Every place a picture appears on the screen.
|
|
1222
|
+
*
|
|
1223
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1224
|
+
*
|
|
1225
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1226
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1227
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1228
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1229
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1230
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1231
|
+
* @param max Most matches to return. Default: 20.
|
|
1232
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1233
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1234
|
+
* @example await d.find_images("coin.png")
|
|
1235
|
+
*/
|
|
1236
|
+
find_images(image: string | Uint8Array, threshold?: number, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1237
|
+
/**
|
|
1238
|
+
* Every place a picture appears on the screen.
|
|
1239
|
+
*
|
|
1240
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1241
|
+
*
|
|
1242
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1243
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1244
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1245
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1246
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1247
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1248
|
+
* @param max Most matches to return. Default: 20.
|
|
1249
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1250
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1251
|
+
* @example await d.find_images("coin.png")
|
|
1252
|
+
*/
|
|
1253
|
+
find_images(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1254
|
+
/**
|
|
1255
|
+
* Every place a picture appears on the screen.
|
|
1256
|
+
*
|
|
1257
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1258
|
+
*
|
|
1259
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1260
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1261
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1262
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1263
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1264
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1265
|
+
* @param max Most matches to return. Default: 20.
|
|
1266
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1267
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1268
|
+
* @example await d.find_images("coin.png")
|
|
1269
|
+
*/
|
|
1270
|
+
find_images(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1271
|
+
/**
|
|
1272
|
+
* Every place a picture appears on the screen.
|
|
1273
|
+
*
|
|
1274
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1275
|
+
*
|
|
1276
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1277
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1278
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1279
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1280
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1281
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1282
|
+
* @param max Most matches to return. Default: 20.
|
|
1283
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1284
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1285
|
+
* @example await d.find_images("coin.png")
|
|
1286
|
+
*/
|
|
1287
|
+
find_images(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1288
|
+
/**
|
|
1289
|
+
* Every place a picture appears on the screen.
|
|
1290
|
+
*
|
|
1291
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1292
|
+
*
|
|
1293
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1294
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1295
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1296
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1297
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1298
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1299
|
+
* @param max Most matches to return. Default: 20.
|
|
1300
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1301
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1302
|
+
* @example await d.find_images("coin.png")
|
|
1303
|
+
*/
|
|
1304
|
+
find_images(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1305
|
+
/**
|
|
1306
|
+
* Every place a picture appears on the screen.
|
|
1307
|
+
*
|
|
1308
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1309
|
+
*
|
|
1310
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1311
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1312
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1313
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1314
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1315
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1316
|
+
* @param max Most matches to return. Default: 20.
|
|
1317
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1318
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1319
|
+
* @example await d.find_images("coin.png")
|
|
1320
|
+
*/
|
|
1321
|
+
find_images(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, max?: number, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1322
|
+
/**
|
|
1323
|
+
* Every place a picture appears on the screen.
|
|
1324
|
+
*
|
|
1325
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1326
|
+
*
|
|
1327
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1328
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1329
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1330
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1331
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1332
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1333
|
+
* @param max Most matches to return. Default: 20.
|
|
1334
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1335
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1336
|
+
* @example await d.find_images("coin.png")
|
|
1337
|
+
* @alias find_images
|
|
1338
|
+
*/
|
|
1339
|
+
findImages(image: string | Uint8Array, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1340
|
+
/**
|
|
1341
|
+
* Every place a picture appears on the screen.
|
|
1342
|
+
*
|
|
1343
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1344
|
+
*
|
|
1345
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1346
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1347
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1348
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1349
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1350
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1351
|
+
* @param max Most matches to return. Default: 20.
|
|
1352
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1353
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1354
|
+
* @example await d.find_images("coin.png")
|
|
1355
|
+
* @alias find_images
|
|
1356
|
+
*/
|
|
1357
|
+
findImages(image: string | Uint8Array, threshold?: number, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1358
|
+
/**
|
|
1359
|
+
* Every place a picture appears on the screen.
|
|
1360
|
+
*
|
|
1361
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1362
|
+
*
|
|
1363
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1364
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1365
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1366
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1367
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1368
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1369
|
+
* @param max Most matches to return. Default: 20.
|
|
1370
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1371
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1372
|
+
* @example await d.find_images("coin.png")
|
|
1373
|
+
* @alias find_images
|
|
1374
|
+
*/
|
|
1375
|
+
findImages(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1376
|
+
/**
|
|
1377
|
+
* Every place a picture appears on the screen.
|
|
1378
|
+
*
|
|
1379
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1380
|
+
*
|
|
1381
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1382
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1383
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1384
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1385
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1386
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1387
|
+
* @param max Most matches to return. Default: 20.
|
|
1388
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1389
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1390
|
+
* @example await d.find_images("coin.png")
|
|
1391
|
+
* @alias find_images
|
|
1392
|
+
*/
|
|
1393
|
+
findImages(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1394
|
+
/**
|
|
1395
|
+
* Every place a picture appears on the screen.
|
|
1396
|
+
*
|
|
1397
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1398
|
+
*
|
|
1399
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1400
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1401
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1402
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1403
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1404
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1405
|
+
* @param max Most matches to return. Default: 20.
|
|
1406
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1407
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1408
|
+
* @example await d.find_images("coin.png")
|
|
1409
|
+
* @alias find_images
|
|
1410
|
+
*/
|
|
1411
|
+
findImages(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1412
|
+
/**
|
|
1413
|
+
* Every place a picture appears on the screen.
|
|
1414
|
+
*
|
|
1415
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1416
|
+
*
|
|
1417
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1418
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1419
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1420
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1421
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1422
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1423
|
+
* @param max Most matches to return. Default: 20.
|
|
1424
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1425
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1426
|
+
* @example await d.find_images("coin.png")
|
|
1427
|
+
* @alias find_images
|
|
1428
|
+
*/
|
|
1429
|
+
findImages(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1430
|
+
/**
|
|
1431
|
+
* Every place a picture appears on the screen.
|
|
1432
|
+
*
|
|
1433
|
+
* Answers at once, with an empty list when nothing matches, unless timeout is set. Best matches come first and never overlap. Runs on the PC; for a phone with another screen density, pass scales.
|
|
1434
|
+
*
|
|
1435
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1436
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1437
|
+
* @param timeout Seconds to wait for at least one match. 0 answers at once. Default: 0.
|
|
1438
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1439
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1440
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1441
|
+
* @param max Most matches to return. Default: 20.
|
|
1442
|
+
* @param opts Optional parameters by name, see FindImagesOptions.
|
|
1443
|
+
* @throws {DroidlineError} with code NO_PERMISSION.
|
|
1444
|
+
* @example await d.find_images("coin.png")
|
|
1445
|
+
* @alias find_images
|
|
1446
|
+
*/
|
|
1447
|
+
findImages(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, max?: number, opts?: FindImagesOptions): Promise<Array<ImageMatch>>;
|
|
1448
|
+
/**
|
|
1449
|
+
* Wait until a picture is no longer on the screen.
|
|
1450
|
+
*
|
|
1451
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1452
|
+
*
|
|
1453
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1454
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1455
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1456
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1457
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1458
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1459
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1460
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1461
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1462
|
+
*/
|
|
1463
|
+
wait_image_gone(image: string | Uint8Array, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1464
|
+
/**
|
|
1465
|
+
* Wait until a picture is no longer on the screen.
|
|
1466
|
+
*
|
|
1467
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1468
|
+
*
|
|
1469
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1470
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1471
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1472
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1473
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1474
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1475
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1476
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1477
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1478
|
+
*/
|
|
1479
|
+
wait_image_gone(image: string | Uint8Array, threshold?: number, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1480
|
+
/**
|
|
1481
|
+
* Wait until a picture is no longer on the screen.
|
|
1482
|
+
*
|
|
1483
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1484
|
+
*
|
|
1485
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1486
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1487
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1488
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1489
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1490
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1491
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1492
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1493
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1494
|
+
*/
|
|
1495
|
+
wait_image_gone(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1496
|
+
/**
|
|
1497
|
+
* Wait until a picture is no longer on the screen.
|
|
1498
|
+
*
|
|
1499
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1500
|
+
*
|
|
1501
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1502
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1503
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1504
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1505
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1506
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1507
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1508
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1509
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1510
|
+
*/
|
|
1511
|
+
wait_image_gone(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1512
|
+
/**
|
|
1513
|
+
* Wait until a picture is no longer on the screen.
|
|
1514
|
+
*
|
|
1515
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1516
|
+
*
|
|
1517
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1518
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1519
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1520
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1521
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1522
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1523
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1524
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1525
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1526
|
+
*/
|
|
1527
|
+
wait_image_gone(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1528
|
+
/**
|
|
1529
|
+
* Wait until a picture is no longer on the screen.
|
|
1530
|
+
*
|
|
1531
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1532
|
+
*
|
|
1533
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1534
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1535
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1536
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1537
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1538
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1539
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1540
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1541
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1542
|
+
*/
|
|
1543
|
+
wait_image_gone(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1544
|
+
/**
|
|
1545
|
+
* Wait until a picture is no longer on the screen.
|
|
1546
|
+
*
|
|
1547
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1548
|
+
*
|
|
1549
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1550
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1551
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1552
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1553
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1554
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1555
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1556
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1557
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1558
|
+
* @alias wait_image_gone
|
|
1559
|
+
*/
|
|
1560
|
+
waitImageGone(image: string | Uint8Array, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1561
|
+
/**
|
|
1562
|
+
* Wait until a picture is no longer on the screen.
|
|
1563
|
+
*
|
|
1564
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1565
|
+
*
|
|
1566
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1567
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1568
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1569
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1570
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1571
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1572
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1573
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1574
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1575
|
+
* @alias wait_image_gone
|
|
1576
|
+
*/
|
|
1577
|
+
waitImageGone(image: string | Uint8Array, threshold?: number, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1578
|
+
/**
|
|
1579
|
+
* Wait until a picture is no longer on the screen.
|
|
1580
|
+
*
|
|
1581
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1582
|
+
*
|
|
1583
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1584
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1585
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1586
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1587
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1588
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1589
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1590
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1591
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1592
|
+
* @alias wait_image_gone
|
|
1593
|
+
*/
|
|
1594
|
+
waitImageGone(image: string | Uint8Array, threshold?: number, timeout?: number, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1595
|
+
/**
|
|
1596
|
+
* Wait until a picture is no longer on the screen.
|
|
1597
|
+
*
|
|
1598
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1599
|
+
*
|
|
1600
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1601
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1602
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1603
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1604
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1605
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1606
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1607
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1608
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1609
|
+
* @alias wait_image_gone
|
|
1610
|
+
*/
|
|
1611
|
+
waitImageGone(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1612
|
+
/**
|
|
1613
|
+
* Wait until a picture is no longer on the screen.
|
|
1614
|
+
*
|
|
1615
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1616
|
+
*
|
|
1617
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1618
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1619
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1620
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1621
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1622
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1623
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1624
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1625
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1626
|
+
* @alias wait_image_gone
|
|
1627
|
+
*/
|
|
1628
|
+
waitImageGone(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
1629
|
+
/**
|
|
1630
|
+
* Wait until a picture is no longer on the screen.
|
|
1631
|
+
*
|
|
1632
|
+
* Optional, and runs on the PC: the server takes a screenshot and compares. Cut the image from a screenshot of the same phone; for a phone with another screen density, pass scales. On Android 9 and 10 screenshots need screen capture permission.
|
|
1633
|
+
*
|
|
1634
|
+
* @param image PNG or JPEG of what to find, cut from a screenshot of the same phone. The SDKs and the CLI take a file path; on the wire it is base64.
|
|
1635
|
+
* @param threshold How close the match must be, from 0 to 1. Default: 0.9.
|
|
1636
|
+
* @param timeout Seconds to wait for the target to appear. Default: 10.
|
|
1637
|
+
* @param region Search only inside this box, given as left, top, right, bottom in screen pixels. Faster, and nothing outside it can match.
|
|
1638
|
+
* @param scales Sizes of the image to try, 1 being the size it was cut at, such as 0.8, 1, 1.25 for a phone with another screen density. Each size adds time.
|
|
1639
|
+
* @param color Also require the average color to agree, so a red and a green button of the same shape differ. Default: false.
|
|
1640
|
+
* @param opts Optional parameters by name, see WaitImageGoneOptions.
|
|
1641
|
+
* @throws {DroidlineError} with code TIMEOUT, NO_PERMISSION.
|
|
1642
|
+
* @example await d.wait_image_gone("loading.png")
|
|
1643
|
+
* @alias wait_image_gone
|
|
1644
|
+
*/
|
|
1645
|
+
waitImageGone(image: string | Uint8Array, threshold?: number, timeout?: number, region?: ReadonlyArray<number>, scales?: ReadonlyArray<number>, color?: boolean, opts?: WaitImageGoneOptions): Promise<WaitImageGoneResult>;
|
|
756
1646
|
/**
|
|
757
1647
|
* Read the text on the screen with OCR.
|
|
758
1648
|
*
|
package/dist/generated.js
CHANGED
|
@@ -78,25 +78,55 @@ export class DeviceCommands {
|
|
|
78
78
|
return this._run("record", "none", collect("record", args, ["on"], ["minutes"]));
|
|
79
79
|
}
|
|
80
80
|
async find_image(...args) {
|
|
81
|
-
const params = collect("find_image", args, ["image"], ["threshold", "timeout"]);
|
|
81
|
+
const params = collect("find_image", args, ["image"], ["threshold", "timeout", "region", "scales", "color"]);
|
|
82
82
|
params["image"] = await this._loadImage(params["image"]);
|
|
83
83
|
return this._run("find_image", "fields", params);
|
|
84
84
|
}
|
|
85
85
|
async findImage(...args) {
|
|
86
|
-
const params = collect("find_image", args, ["image"], ["threshold", "timeout"]);
|
|
86
|
+
const params = collect("find_image", args, ["image"], ["threshold", "timeout", "region", "scales", "color"]);
|
|
87
87
|
params["image"] = await this._loadImage(params["image"]);
|
|
88
88
|
return this._run("find_image", "fields", params);
|
|
89
89
|
}
|
|
90
90
|
async tap_image(...args) {
|
|
91
|
-
const params = collect("tap_image", args, ["image"], ["threshold", "timeout"]);
|
|
91
|
+
const params = collect("tap_image", args, ["image"], ["threshold", "timeout", "region", "scales", "color"]);
|
|
92
92
|
params["image"] = await this._loadImage(params["image"]);
|
|
93
93
|
return this._run("tap_image", "fields", params);
|
|
94
94
|
}
|
|
95
95
|
async tapImage(...args) {
|
|
96
|
-
const params = collect("tap_image", args, ["image"], ["threshold", "timeout"]);
|
|
96
|
+
const params = collect("tap_image", args, ["image"], ["threshold", "timeout", "region", "scales", "color"]);
|
|
97
97
|
params["image"] = await this._loadImage(params["image"]);
|
|
98
98
|
return this._run("tap_image", "fields", params);
|
|
99
99
|
}
|
|
100
|
+
async image_exists(...args) {
|
|
101
|
+
const params = collect("image_exists", args, ["image"], ["threshold", "region", "scales", "color"]);
|
|
102
|
+
params["image"] = await this._loadImage(params["image"]);
|
|
103
|
+
return this._run("image_exists", "value", params);
|
|
104
|
+
}
|
|
105
|
+
async imageExists(...args) {
|
|
106
|
+
const params = collect("image_exists", args, ["image"], ["threshold", "region", "scales", "color"]);
|
|
107
|
+
params["image"] = await this._loadImage(params["image"]);
|
|
108
|
+
return this._run("image_exists", "value", params);
|
|
109
|
+
}
|
|
110
|
+
async find_images(...args) {
|
|
111
|
+
const params = collect("find_images", args, ["image"], ["threshold", "timeout", "region", "scales", "color", "max"]);
|
|
112
|
+
params["image"] = await this._loadImage(params["image"]);
|
|
113
|
+
return this._run("find_images", "value", params);
|
|
114
|
+
}
|
|
115
|
+
async findImages(...args) {
|
|
116
|
+
const params = collect("find_images", args, ["image"], ["threshold", "timeout", "region", "scales", "color", "max"]);
|
|
117
|
+
params["image"] = await this._loadImage(params["image"]);
|
|
118
|
+
return this._run("find_images", "value", params);
|
|
119
|
+
}
|
|
120
|
+
async wait_image_gone(...args) {
|
|
121
|
+
const params = collect("wait_image_gone", args, ["image"], ["threshold", "timeout", "region", "scales", "color"]);
|
|
122
|
+
params["image"] = await this._loadImage(params["image"]);
|
|
123
|
+
return this._run("wait_image_gone", "fields", params);
|
|
124
|
+
}
|
|
125
|
+
async waitImageGone(...args) {
|
|
126
|
+
const params = collect("wait_image_gone", args, ["image"], ["threshold", "timeout", "region", "scales", "color"]);
|
|
127
|
+
params["image"] = await this._loadImage(params["image"]);
|
|
128
|
+
return this._run("wait_image_gone", "fields", params);
|
|
129
|
+
}
|
|
100
130
|
async ocr(...args) {
|
|
101
131
|
return this._run("ocr", "fields", collect("ocr", args, [], ["lang"]));
|
|
102
132
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "droidline",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"description": "Android automation from Node.js: test your apps on real phones, script the tasks you repeat and run many phones at once. No ADB, no USB cable, no root.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|