• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (C) 2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License,Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *   http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing,software
10 * distributed under the License is distributed on an "ASIS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * @file
18 * @kit TestKit
19 */
20
21import { Callback } from './@ohos.base';
22
23/**
24 * Enumerates the string value match pattern.
25 *
26 * @enum {number}
27 * @syscap SystemCapability.Test.UiTest
28 * @since 8
29 */
30/**
31 * Enumerates the string value match pattern.
32 *
33 * @enum {number}
34 * @syscap SystemCapability.Test.UiTest
35 * @crossplatform
36 * @since 10
37 */
38/**
39 * Enumerates the string value match pattern.
40 *
41 * @enum {number}
42 * @syscap SystemCapability.Test.UiTest
43 * @crossplatform
44 * @atomicservice
45 * @since 11
46 */
47declare enum MatchPattern {
48  /**
49   * Equals to a string.
50   *
51   * @syscap SystemCapability.Test.UiTest
52   * @since 8
53   * @test
54   */
55  /**
56   * Equals to a string.
57   *
58   * @syscap SystemCapability.Test.UiTest
59   * @crossplatform
60   * @since 10
61   * @test
62   */
63  /**
64   * Equals to a string.
65   *
66   * @syscap SystemCapability.Test.UiTest
67   * @crossplatform
68   * @atomicservice
69   * @since 11
70   * @test
71   */
72  EQUALS = 0,
73  /**
74   * Contains a substring.
75   *
76   * @syscap SystemCapability.Test.UiTest
77   * @since 8
78   * @test
79   */
80  /**
81   * Contains a substring.
82   *
83   * @syscap SystemCapability.Test.UiTest
84   * @crossplatform
85   * @since 10
86   * @test
87   */
88  /**
89   * Contains a substring.
90   *
91   * @syscap SystemCapability.Test.UiTest
92   * @crossplatform
93   * @atomicservice
94   * @since 11
95   * @test
96   */
97  CONTAINS = 1,
98  /**
99   * StartsWith a substring.
100   *
101   * @syscap SystemCapability.Test.UiTest
102   * @since 8
103   * @test
104   */
105  /**
106   * StartsWith a substring.
107   *
108   * @syscap SystemCapability.Test.UiTest
109   * @crossplatform
110   * @since 10
111   * @test
112   */
113  /**
114   * StartsWith a substring.
115   *
116   * @syscap SystemCapability.Test.UiTest
117   * @crossplatform
118   * @atomicservice
119   * @since 11
120   * @test
121   */
122  STARTS_WITH = 2,
123  /**
124   * EndsWith a substring.
125   *
126   * @syscap SystemCapability.Test.UiTest
127   * @since 8
128   * @test
129   */
130  /**
131   * EndsWith a substring.
132   *
133   * @syscap SystemCapability.Test.UiTest
134   * @crossplatform
135   * @since 10
136   * @test
137   */
138  /**
139   * EndsWith a substring.
140   *
141   * @syscap SystemCapability.Test.UiTest
142   * @crossplatform
143   * @atomicservice
144   * @since 11
145   * @test
146   */
147  ENDS_WITH = 3
148}
149
150/**
151 * Describes the attribute requirements for the target UiComponents.
152 *
153 * @syscap SystemCapability.Test.UiTest
154 * @since 8
155 * @deprecated since 9
156 * @useinstead ohos.UiTest.On
157 */
158declare class By {
159  /**
160   * Specifies the text for the target UiComponent.
161   *
162   * @param { string } txt The text value.
163   * @param { MatchPattern } pattern The {@link MatchPattern} of the text value,default to {@link MatchPattern.EQUALS}
164   * @returns { By } this {@link By} object.
165   * @syscap SystemCapability.Test.UiTest
166   * @since 8
167   * @deprecated since 9
168   * @useinstead ohos.UiTest.On#text
169   * @test
170   */
171  text(txt: string, pattern?: MatchPattern): By;
172
173  /**
174   * Specifies the inspector key of the target UiComponent.
175   *
176   * @param { string } key The inspectorKey value.
177   * @returns { By } this {@link By} object.
178   * @syscap SystemCapability.Test.UiTest
179   * @since 8
180   * @deprecated since 9
181   * @useinstead ohos.UiTest.On#id
182   * @test
183   */
184  key(key: string): By;
185
186  /**
187   * Specifies the id of the target UiComponent.
188   *
189   * @param { number } id The id value.
190   * @returns { By } this {@link By} object.
191   * @syscap SystemCapability.Test.UiTest
192   * @since 8
193   * @deprecated since 9
194   * @test
195   */
196  id(id: number): By;
197
198  /**
199   * Specifies the type of the target UiComponent.
200   *
201   * @param { string } tp The type value.
202   * @returns { By } this {@link By} object.
203   * @syscap SystemCapability.Test.UiTest
204   * @since 8
205   * @deprecated since 9
206   * @useinstead ohos.UiTest.On#type
207   * @test
208   */
209  type(tp: string): By;
210
211  /**
212   * Specifies the clickable status of the target UiComponent.
213   *
214   * @param { boolean } b The clickable status,default to true.
215   * @returns { By } this {@link By} object.
216   * @syscap SystemCapability.Test.UiTest
217   * @since 8
218   * @deprecated since 9
219   * @useinstead ohos.UiTest.On#clickable
220   * @test
221   */
222  clickable(b?: boolean): By;
223
224  /**
225   * Specifies the scrollable status of the target UiComponent.
226   *
227   * @param { boolean } b The scrollable status,default to true.
228   * @returns { By } this {@link By} object.
229   * @syscap SystemCapability.Test.UiTest
230   * @since 8
231   * @deprecated since 9
232   * @useinstead ohos.UiTest.On#scrollable
233   * @test
234   */
235  scrollable(b?: boolean): By;
236
237  /**
238   * Specifies the enabled status of the target UiComponent.
239   *
240   * @param { boolean } b The enabled status,default to true.
241   * @returns { By } this {@link By} object.
242   * @syscap SystemCapability.Test.UiTest
243   * @since 8
244   * @deprecated since 9
245   * @useinstead ohos.UiTest.On#enabled
246   * @test
247   */
248  enabled(b?: boolean): By;
249
250  /**
251   * Specifies the focused status of the target UiComponent.
252   *
253   * @param { boolean } b The focused status,default to true.
254   * @returns { By } this {@link By} object.
255   * @syscap SystemCapability.Test.UiTest
256   * @since 8
257   * @deprecated since 9
258   * @useinstead ohos.UiTest.On#focused
259   * @test
260   */
261  focused(b?: boolean): By;
262
263  /**
264   * Specifies the selected status of the target UiComponent.
265   *
266   * @param { boolean } b The selected status,default to true.
267   * @returns { By } this {@link By} object.
268   * @syscap SystemCapability.Test.UiTest
269   * @since 8
270   * @deprecated since 9
271   * @useinstead ohos.UiTest.On#selected
272   * @test
273   */
274  selected(b?: boolean): By;
275
276  /**
277   * Requires the target UiComponent which is before another UiComponent that specified by the given {@link By}
278   * object,used to locate UiComponent relatively.
279   *
280   * @param { By } by Describes the attribute requirements of UiComponent which the target one is in front of.
281   * @returns { By } this {@link By} object.
282   * @syscap SystemCapability.Test.UiTest
283   * @since 8
284   * @deprecated since 9
285   * @useinstead ohos.UiTest.On#isBefore
286   * @test
287   */
288  isBefore(by: By): By;
289
290  /**
291   * Requires the target UiComponent which is after another UiComponent that specified by the given {@link By}
292   * object,used to locate UiComponent relatively.
293   *
294   * @param { By } by Describes the attribute requirements of UiComponent which the target one is in back of.
295   * @returns { By } this {@link By} object.
296   * @syscap SystemCapability.Test.UiTest
297   * @since 8
298   * @deprecated since 9
299   * @useinstead ohos.UiTest.On#isAfter
300   * @test
301   */
302  isAfter(by: By): By;
303}
304
305/**
306 * Represents a UiComponent of the ohos application,user can perform operations or query attributes on it.
307 *
308 * @syscap SystemCapability.Test.UiTest
309 * @since 8
310 * @deprecated since 9
311 * @useinstead ohos.uitest.Component
312 * @test
313 */
314declare class UiComponent {
315  /**
316   * Click this {@link UiComponent}.
317   *
318   * @returns { Promise<void> }
319   * @syscap SystemCapability.Test.UiTest
320   * @since 8
321   * @deprecated since 9
322   * @useinstead ohos.UiTest.Component#click
323   * @test
324   */
325  click(): Promise<void>;
326
327  /**
328   * Double click this {@link UiComponent}.
329   *
330   * @returns { Promise<void> }
331   * @syscap SystemCapability.Test.UiTest
332   * @since 8
333   * @deprecated since 9
334   * @useinstead ohos.UiTest.Component#doubleClick
335   * @test
336   */
337  doubleClick(): Promise<void>;
338
339  /**
340   * Long click this {@link UiComponent}.
341   *
342   * @returns { Promise<void> }
343   * @syscap SystemCapability.Test.UiTest
344   * @since 8
345   * @deprecated since 9
346   * @useinstead ohos.UiTest.Component#longClick
347   * @test
348   */
349  longClick(): Promise<void>;
350
351  /**
352   * Get the id attribute value.
353   *
354   * @returns { Promise<number> } the id value.
355   * @syscap SystemCapability.Test.UiTest
356   * @since 8
357   * @deprecated since 9
358   * @test
359   */
360  getId(): Promise<number>;
361
362  /**
363   * Get the inspectorKey attribute value.
364   *
365   * @returns { Promise<string> } the inspectorKey value.
366   * @syscap SystemCapability.Test.UiTest
367   * @since 8
368   * @deprecated since 9
369   * @useinstead ohos.UiTest.Component#getId
370   * @test
371   */
372  getKey(): Promise<string>;
373
374  /**
375   * Get the text attribute value.
376   *
377   * @returns { Promise<string> } the text value.
378   * @syscap SystemCapability.Test.UiTest
379   * @since 8
380   * @deprecated since 9
381   * @useinstead ohos.UiTest.Component#getText
382   * @test
383   */
384  getText(): Promise<string>;
385
386  /**
387   * Get the type name.
388   *
389   * @returns { Promise<string> } the type name.
390   * @syscap SystemCapability.Test.UiTest
391   * @since 8
392   * @deprecated since 9
393   * @useinstead ohos.UiTest.Component#getType
394   * @test
395   */
396  getType(): Promise<string>;
397
398  /**
399   * Get the clickable status of this {@link UiComponent}.
400   *
401   * @returns { Promise<boolean> } the clickable status.
402   * @syscap SystemCapability.Test.UiTest
403   * @since 8
404   * @deprecated since 9
405   * @useinstead ohos.UiTest.Component#isClickable
406   * @test
407   */
408  isClickable(): Promise<boolean>;
409
410  /**
411   * Get the scrollable status of this {@link UiComponent}.
412   *
413   * @returns { Promise<boolean> } the scrollable status.
414   * @syscap SystemCapability.Test.UiTest
415   * @since 8
416   * @deprecated since 9
417   * @useinstead ohos.UiTest.Component#isScrollable
418   * @test
419   */
420  isScrollable(): Promise<boolean>;
421
422  /**
423   * Get the enabled status of this {@link UiComponent}.
424   *
425   * @returns { Promise<boolean> } the enabled status.
426   * @syscap SystemCapability.Test.UiTest
427   * @since 8
428   * @deprecated since 9
429   * @useinstead ohos.UiTest.Component#isEnabled
430   * @test
431   */
432  isEnabled(): Promise<boolean>;
433
434  /**
435   * Get the focused status of this {@link UiComponent}.
436   *
437   * @returns { Promise<boolean> } the focused status.
438   * @syscap SystemCapability.Test.UiTest
439   * @since 8
440   * @deprecated since 9
441   * @useinstead ohos.UiTest.Component#isFocused
442   * @test
443   */
444  isFocused(): Promise<boolean>;
445
446  /**
447   * Get the selected status of this {@link UiComponent}.
448   *
449   * @returns { Promise<boolean> } the selected status.
450   * @syscap SystemCapability.Test.UiTest
451   * @since 8
452   * @deprecated since 9
453   * @useinstead ohos.UiTest.Component#isSelected
454   * @test
455   */
456  isSelected(): Promise<boolean>;
457
458  /**
459   * Inject text to this {@link UiComponent},applicable to TextInput.
460   *
461   * @param { string } text The text to inject.
462   * @returns { Promise<void> }
463   * @syscap SystemCapability.Test.UiTest
464   * @since 8
465   * @deprecated since 9
466   * @useinstead ohos.UiTest.Component#inputText
467   * @test
468   */
469  inputText(text: string): Promise<void>;
470
471  /**
472   * Scroll on this {@link UiComponent}to find matched {@link UiComponent},applicable to scrollable one.
473   *
474   * @param { By } by The attribute requirements of the target {@link UiComponent}.
475   * @returns { Promise<UiComponent> } the found result,or undefined if not found.
476   * @syscap SystemCapability.Test.UiTest
477   * @since 8
478   * @deprecated since 9
479   * @useinstead ohos.UiTest.Component#scrollSearch
480   * @test
481   */
482  scrollSearch(by: By): Promise<UiComponent>;
483}
484
485/**
486 * The unified facade of UiTest framework,can be used to find {@link UiComponent},trigger keyEvents,perform
487 * coordinates-based UI actions,capture screen and so on.
488 *
489 * @syscap SystemCapability.Test.UiTest
490 * @since 8
491 * @deprecated since 9
492 * @useinstead ohos.uitest.Driver
493 * @test
494 */
495declare class UiDriver {
496  /**
497   * Create an {@link UiDriver} object.
498   *
499   * @returns { UiDriver } the {@link UiDriver} object.
500   * @syscap SystemCapability.Test.UiTest
501   * @since 8
502   * @deprecated since 9
503   * @useinstead ohos.UiTest.Driver#create
504   * @test
505   */
506  static create(): UiDriver;
507
508  /**
509   * Delay with specified duration.
510   *
511   * @param { number } duration The delay duration in milliseconds.
512   * @returns { Promise<void> }
513   * @syscap SystemCapability.Test.UiTest
514   * @since 8
515   * @deprecated since 9
516   * @useinstead ohos.UiTest.Driver#delayMs
517   * @test
518   */
519  delayMs(duration: number): Promise<void>;
520
521  /**
522   * Find the first matched {@link UiComponent} on current UI.
523   *
524   * @param { By } by The attribute requirements of the target {@link UiComponent}.
525   * @returns { Promise<UiComponent> } the first matched {@link UiComponent} or undefined.
526   * @syscap SystemCapability.Test.UiTest
527   * @since 8
528   * @deprecated since 9
529   * @useinstead ohos.UiTest.Driver#findComponent
530   * @test
531   */
532  findComponent(by: By): Promise<UiComponent>;
533
534  /**
535   * Find all the matched {@link UiComponent}s on current UI.
536   *
537   * @param { By } by The attribute requirements of the target {@link UiComponent}.
538   * @returns { Promise<Array<UiComponent>> } the matched {@link UiComponent}s list.
539   * @syscap SystemCapability.Test.UiTest
540   * @since 8
541   * @deprecated since 9
542   * @useinstead ohos.UiTest.Driver#findComponents
543   * @test
544   */
545  findComponents(by: By): Promise<Array<UiComponent>>;
546
547  /**
548   * Assert the matched {@link UiComponent}s exists on current UI;if not,assertError will be raised.
549   *
550   * @param { By } by The attribute requirements of the target {@link UiComponent}.
551   * @returns { Promise<void> }
552   * @throws {BusinessError} 401 - if the input parameters are invalid.
553   * @throws {BusinessError} 17000002 - if the async function was not called with await.
554   * @throws {BusinessError} 17000003 - if the assertion failed.
555   * @syscap SystemCapability.Test.UiTest
556   * @since 8
557   * @deprecated since 9
558   * @useinstead ohos.UiTest.Driver#assertComponentExist
559   * @test
560   */
561  assertComponentExist(by: By): Promise<void>;
562
563  /**
564   * Press the BACK key.
565   *
566   * @returns { Promise<void> }
567   * @syscap SystemCapability.Test.UiTest
568   * @since 8
569   * @deprecated since 9
570   * @useinstead ohos.UiTest.Driver#pressBack
571   * @test
572   */
573  pressBack(): Promise<void>;
574
575  /**
576   * Press the specified key.
577   *
578   * @param { number } keyCode the target keyCode.
579   * @returns { Promise<void> }
580   * @syscap SystemCapability.Test.UiTest
581   * @since 8
582   * @deprecated since 9
583   * @useinstead ohos.UiTest.Driver#triggerKey
584   * @test
585   */
586  triggerKey(keyCode: number): Promise<void>;
587
588  /**
589   * Click on the specified location on the screen.
590   *
591   * @param { number } x The x-coordinate.
592   * @param { number } y The y-coordinate.
593   * @returns { Promise<void> }
594   * @syscap SystemCapability.Test.UiTest
595   * @since 8
596   * @deprecated since 9
597   * @useinstead ohos.UiTest.Driver#click
598   * @test
599   */
600  click(x: number, y: number): Promise<void>;
601
602  /**
603   * DoubleClick on the specified location on the screen.
604   *
605   * @param { number } x The x-coordinate.
606   * @param { number } y The y-coordinate.
607   * @returns { Promise<void> }
608   * @syscap SystemCapability.Test.UiTest
609   * @since 8
610   * @deprecated since 9
611   * @useinstead ohos.UiTest.Driver#doubleClick
612   * @test
613   */
614  doubleClick(x: number, y: number): Promise<void>;
615
616  /**
617   * LongClick on the specified location on the screen.
618   *
619   * @param { number } x The x-coordinate.
620   * @param { number } y The y-coordinate.
621   * @returns { Promise<void> }
622   * @syscap SystemCapability.Test.UiTest
623   * @since 8
624   * @deprecated since 9
625   * @useinstead ohos.UiTest.Driver#longClick
626   * @test
627   */
628  longClick(x: number, y: number): Promise<void>;
629
630  /**
631   * Swipe on the screen between the specified points.
632   *
633   * @param { number } startx The x-coordinate of the starting point.
634   * @param { number } starty The y-coordinate of the starting point.
635   * @param { number } endx The x-coordinate of the ending point.
636   * @param { number } endy The y-coordinate of the ending point.
637   * @returns { Promise<void> }
638   * @syscap SystemCapability.Test.UiTest
639   * @since 8
640   * @deprecated since 9
641   * @useinstead ohos.UiTest.Driver#swipe
642   * @test
643   */
644  swipe(startx: number, starty: number, endx: number, endy: number): Promise<void>;
645
646  /**
647   * Capture current screen and save as picture which PNG format.
648   *
649   * @param { string } savePath the path where to store the picture.
650   * @returns { Promise<boolean> } true if screen-capturing and file-storing are completed successfully,false otherwise.
651   * @syscap SystemCapability.Test.UiTest
652   * @since 8
653   * @deprecated since 9
654   * @useinstead ohos.uitest.Driver#screenCap
655   * @test
656   */
657  screenCap(savePath: string): Promise<boolean>;
658}
659
660/**
661 * Enumerates the window mode of the tested window.
662 *
663 * @enum { number }
664 * @syscap SystemCapability.Test.UiTest
665 * @since 9
666 */
667/**
668 * Enumerates the window mode of the tested window.
669 *
670 * @enum { number }
671 * @syscap SystemCapability.Test.UiTest
672 * @atomicservice
673 * @since 11
674 */
675declare enum WindowMode {
676  /**
677   * The test window is a full screen window.
678   *
679   * @syscap SystemCapability.Test.UiTest
680   * @since 9
681   * @test
682   */
683  /**
684   * The test window is a full screen window.
685   *
686   * @syscap SystemCapability.Test.UiTest
687   * @atomicservice
688   * @since 11
689   * @test
690   */
691  FULLSCREEN = 0,
692  /**
693   * The test window is the first window in the split screen state.
694   *
695   * @syscap SystemCapability.Test.UiTest
696   * @since 9
697   * @test
698   */
699  /**
700   * The test window is the first window in the split screen state.
701   *
702   * @syscap SystemCapability.Test.UiTest
703   * @atomicservice
704   * @since 11
705   * @test
706   */
707  PRIMARY = 1,
708  /**
709   * The test window is the second window in the split screen state.
710   *
711   * @syscap SystemCapability.Test.UiTest
712   * @since 9
713   * @test
714   */
715  /**
716   * The test window is the second window in the split screen state.
717   *
718   * @syscap SystemCapability.Test.UiTest
719   * @atomicservice
720   * @since 11
721   * @test
722   */
723  SECONDARY = 2,
724  /**
725   * The test window is a floating window.
726   *
727   * @syscap SystemCapability.Test.UiTest
728   * @since 9
729   * @test
730   */
731  /**
732   * The test window is a floating window.
733   *
734   * @syscap SystemCapability.Test.UiTest
735   * @atomicservice
736   * @since 11
737   * @test
738   */
739  FLOATING = 3
740}
741
742/**
743 * Enumerates the resize direction for the window.
744 *
745 * @enum { number }
746 * @syscap SystemCapability.Test.UiTest
747 * @since 9
748 */
749/**
750 * Enumerates the resize direction for the window.
751 *
752 * @enum { number }
753 * @syscap SystemCapability.Test.UiTest
754 * @atomicservice
755 * @since 11
756 */
757declare enum ResizeDirection {
758  /**
759   * Left.
760   *
761   * @syscap SystemCapability.Test.UiTest
762   * @since 9
763   * @test
764   */
765  /**
766   * Left.
767   *
768   * @syscap SystemCapability.Test.UiTest
769   * @atomicservice
770   * @since 11
771   * @test
772   */
773  LEFT = 0,
774  /**
775   * Right.
776   *
777   * @syscap SystemCapability.Test.UiTest
778   * @since 9
779   * @test
780   */
781  /**
782   * Right.
783   *
784   * @syscap SystemCapability.Test.UiTest
785   * @atomicservice
786   * @since 11
787   * @test
788   */
789  RIGHT = 1,
790  /**
791   * Up.
792   *
793   * @syscap SystemCapability.Test.UiTest
794   * @since 9
795   * @test
796   */
797  /**
798   * Up.
799   *
800   * @syscap SystemCapability.Test.UiTest
801   * @atomicservice
802   * @since 11
803   * @test
804   */
805  UP = 2,
806  /**
807   * Down.
808   *
809   * @syscap SystemCapability.Test.UiTest
810   * @since 9
811   * @test
812   */
813  /**
814   * Down.
815   *
816   * @syscap SystemCapability.Test.UiTest
817   * @atomicservice
818   * @since 11
819   * @test
820   */
821  DOWN = 3,
822  /**
823   * Upper left.
824   *
825   * @syscap SystemCapability.Test.UiTest
826   * @since 9
827   * @test
828   */
829  /**
830   * Upper left.
831   *
832   * @syscap SystemCapability.Test.UiTest
833   * @atomicservice
834   * @since 11
835   * @test
836   */
837  LEFT_UP = 4,
838  /**
839   * Lower left.
840   *
841   * @syscap SystemCapability.Test.UiTest
842   * @since 9
843   * @test
844   */
845  /**
846   * Lower left.
847   *
848   * @syscap SystemCapability.Test.UiTest
849   * @atomicservice
850   * @since 11
851   * @test
852   */
853  LEFT_DOWN = 5,
854  /**
855   * Upper right.
856   *
857   * @syscap SystemCapability.Test.UiTest
858   * @since 9
859   * @test
860   */
861  /**
862   * Upper right.
863   *
864   * @syscap SystemCapability.Test.UiTest
865   * @atomicservice
866   * @since 11
867   * @test
868   */
869  RIGHT_UP = 6,
870  /**
871   * Lower right.
872   *
873   * @syscap SystemCapability.Test.UiTest
874   * @since 9
875   * @test
876   */
877  /**
878   * Lower right.
879   *
880   * @syscap SystemCapability.Test.UiTest
881   * @atomicservice
882   * @since 11
883   * @test
884   */
885  RIGHT_DOWN = 7
886}
887
888/**
889 * Enumerates the rotation of the device display.
890 *
891 * @enum { number }
892 * @syscap SystemCapability.Test.UiTest
893 * @since 9
894 */
895/**
896 * Enumerates the rotation of the device display.
897 *
898 * @enum { number }
899 * @syscap SystemCapability.Test.UiTest
900 * @atomicservice
901 * @since 11
902 */
903declare enum DisplayRotation {
904  /**
905   * Device display does not rotate to display vertically.
906   *
907   * @syscap SystemCapability.Test.UiTest
908   * @since 9
909   * @test
910   */
911  /**
912   * Device display does not rotate to display vertically.
913   *
914   * @syscap SystemCapability.Test.UiTest
915   * @atomicservice
916   * @since 11
917   * @test
918   */
919  ROTATION_0 = 0,
920  /**
921   * Device display rotates 90 degrees clockwise to display horizontally.
922   *
923   * @syscap SystemCapability.Test.UiTest
924   * @since 9
925   * @test
926   */
927  /**
928   * Device display rotates 90 degrees clockwise to display horizontally.
929   *
930   * @syscap SystemCapability.Test.UiTest
931   * @atomicservice
932   * @since 11
933   * @test
934   */
935  ROTATION_90 = 1,
936  /**
937   * Device display rotates clockwise 180 degrees to display vertically in reverse.
938   *
939   * @syscap SystemCapability.Test.UiTest
940   * @since 9
941   * @test
942   */
943  /**
944   * Device display rotates clockwise 180 degrees to display vertically in reverse.
945   *
946   * @syscap SystemCapability.Test.UiTest
947   * @atomicservice
948   * @since 11
949   * @test
950   */
951  ROTATION_180 = 2,
952  /**
953   * Device display rotates 270 degrees clockwise to display horizontally in reverse.
954   *
955   * @syscap SystemCapability.Test.UiTest
956   * @since 9
957   * @test
958   */
959  /**
960   * Device display rotates 270 degrees clockwise to display horizontally in reverse.
961   *
962   * @syscap SystemCapability.Test.UiTest
963   * @atomicservice
964   * @since 11
965   * @test
966   */
967  ROTATION_270 = 3
968}
969
970/**
971 * Represents the point on the device screen.
972 *
973 * @typedef Point
974 * @syscap SystemCapability.Test.UiTest
975 * @since 9
976 */
977/**
978 * Represents the point on the device screen.
979 *
980 * @typedef Point
981 * @syscap SystemCapability.Test.UiTest
982 * @crossplatform
983 * @since 10
984 */
985/**
986 * Represents the point on the device screen.
987 *
988 * @typedef Point
989 * @syscap SystemCapability.Test.UiTest
990 * @crossplatform
991 * @atomicservice
992 * @since 11
993 */
994declare interface Point {
995  /**
996   * The x-coordinate of the coordinate point.
997   *
998   * @type { number }
999   * @syscap SystemCapability.Test.UiTest
1000   * @since 9
1001   */
1002  /**
1003   * The x-coordinate of the coordinate point.
1004   *
1005   * @type { number }
1006   * @syscap SystemCapability.Test.UiTest
1007   * @crossplatform
1008   * @since 10
1009   */
1010  /**
1011   * The x-coordinate of the coordinate point.
1012   *
1013   * @type { number }
1014   * @syscap SystemCapability.Test.UiTest
1015   * @crossplatform
1016   * @atomicservice
1017   * @since 11
1018   */
1019  readonly x: number;
1020  /**
1021   * The y-coordinate of the coordinate point.
1022   *
1023   * @type { number }
1024   * @syscap SystemCapability.Test.UiTest
1025   * @since 9
1026   */
1027  /**
1028   * The y-coordinate of the coordinate point.
1029   *
1030   * @type { number }
1031   * @syscap SystemCapability.Test.UiTest
1032   * @crossplatform
1033   * @since 10
1034   */
1035  /**
1036   * The y-coordinate of the coordinate point.
1037   *
1038   * @type { number }
1039   * @syscap SystemCapability.Test.UiTest
1040   * @crossplatform
1041   * @atomicservice
1042   * @since 11
1043   */
1044  readonly y: number;
1045}
1046
1047/**
1048 * Represents the rectangle area on the device screen.
1049 *
1050 * @typedef Rect
1051 * @syscap SystemCapability.Test.UiTest
1052 * @since 9
1053 */
1054/**
1055 * Represents the rectangle area on the device screen.
1056 *
1057 * @typedef Rect
1058 * @syscap SystemCapability.Test.UiTest
1059 * @atomicservice
1060 * @since 11
1061 */
1062/**
1063 * Represents the rectangle area on the device screen.
1064 *
1065 * @typedef Rect
1066 * @syscap SystemCapability.Test.UiTest
1067 * @crossplatform
1068 * @atomicservice
1069 * @since 12
1070 */
1071declare interface Rect {
1072  /**
1073   * The x-coordinate of the top left corner of the rectangle.
1074   *
1075   * @type { number }
1076   * @syscap SystemCapability.Test.UiTest
1077   * @since 9
1078   */
1079  /**
1080   * The x-coordinate of the top left corner of the rectangle.
1081   *
1082   * @type { number }
1083   * @syscap SystemCapability.Test.UiTest
1084   * @atomicservice
1085   * @since 11
1086   */
1087  /**
1088   * The x-coordinate of the top left corner of the rectangle.
1089   *
1090   * @type { number }
1091   * @syscap SystemCapability.Test.UiTest
1092   * @crossplatform
1093   * @atomicservice
1094   * @since 12
1095   */
1096  readonly left: number;
1097  /**
1098   * The y-coordinate of the top left corner of the rectangle.
1099   *
1100   * @type { number }
1101   * @syscap SystemCapability.Test.UiTest
1102   * @since 9
1103   */
1104  /**
1105   * The y-coordinate of the top left corner of the rectangle.
1106   *
1107   * @type { number }
1108   * @syscap SystemCapability.Test.UiTest
1109   * @atomicservice
1110   * @since 11
1111   */
1112  /**
1113   * The y-coordinate of the top left corner of the rectangle.
1114   *
1115   * @type { number }
1116   * @syscap SystemCapability.Test.UiTest
1117   * @crossplatform
1118   * @atomicservice
1119   * @since 12
1120   */
1121  readonly top: number;
1122  /**
1123   * The x-coordinate at the bottom right corner of the rectangle.
1124   *
1125   * @type { number }
1126   * @syscap SystemCapability.Test.UiTest
1127   * @since 9
1128   */
1129  /**
1130   * The x-coordinate at the bottom right corner of the rectangle.
1131   *
1132   * @type { number }
1133   * @syscap SystemCapability.Test.UiTest
1134   * @atomicservice
1135   * @since 11
1136   */
1137  /**
1138   * The x-coordinate at the bottom right corner of the rectangle.
1139   *
1140   * @type { number }
1141   * @syscap SystemCapability.Test.UiTest
1142   * @crossplatform
1143   * @atomicservice
1144   * @since 12
1145   */
1146  readonly right: number;
1147  /**
1148   * The y-coordinate at the bottom right corner of the rectangle.
1149   *
1150   * @type { number }
1151   * @syscap SystemCapability.Test.UiTest
1152   * @since 9
1153   */
1154  /**
1155   * The y-coordinate at the bottom right corner of the rectangle.
1156   *
1157   * @type { number }
1158   * @syscap SystemCapability.Test.UiTest
1159   * @atomicservice
1160   * @since 11
1161   */
1162  /**
1163   * The y-coordinate at the bottom right corner of the rectangle.
1164   *
1165   * @type { number }
1166   * @syscap SystemCapability.Test.UiTest
1167   * @crossplatform
1168   * @atomicservice
1169   * @since 12
1170   */
1171  readonly bottom: number;
1172}
1173
1174/**
1175 * Represents filer condition to get the window .
1176 *
1177 * @typedef WindowFilter
1178 * @syscap SystemCapability.Test.UiTest
1179 * @since 9
1180 */
1181/**
1182 * Represents filer condition to get the window .
1183 *
1184 * @typedef WindowFilter
1185 * @syscap SystemCapability.Test.UiTest
1186 * @atomicservice
1187 * @since 11
1188 */
1189declare interface WindowFilter {
1190  /**
1191   * The package name of the application which the window belongs to.
1192   *
1193   * @type { ?string }
1194   * @syscap SystemCapability.Test.UiTest
1195   * @since 9
1196   */
1197  /**
1198   * The package name of the application which the window belongs to.
1199   *
1200   * @type { ?string }
1201   * @syscap SystemCapability.Test.UiTest
1202   * @atomicservice
1203   * @since 11
1204   */
1205  bundleName?: string;
1206
1207  /**
1208   * The title of the window.
1209   *
1210   * @type { ?string }
1211   * @syscap SystemCapability.Test.UiTest
1212   * @since 9
1213   */
1214  /**
1215   * The title of the window.
1216   *
1217   * @type { ?string }
1218   * @syscap SystemCapability.Test.UiTest
1219   * @atomicservice
1220   * @since 11
1221   */
1222  title?: string;
1223
1224  /**
1225   * The focal state of the window.
1226   *
1227   * @type { ?boolean }
1228   * @syscap SystemCapability.Test.UiTest
1229   * @since 9
1230   */
1231  /**
1232   * The focal state of the window.
1233   *
1234   * @type { ?boolean }
1235   * @syscap SystemCapability.Test.UiTest
1236   * @atomicservice
1237   * @since 11
1238   */
1239  focused?: boolean;
1240
1241  /**
1242   * The active state of the window.
1243   *
1244   * @type { ?boolean }
1245   * @syscap SystemCapability.Test.UiTest
1246   * @since 9
1247   */
1248  /**
1249   * The active state of the window.
1250   *
1251   * @type { ?boolean }
1252   * @syscap SystemCapability.Test.UiTest
1253   * @since 11
1254   * @deprecated since 11
1255   * @useinstead ohos.UiTest.WindowFilter#active
1256   */
1257  actived?: boolean;
1258
1259  /**
1260   * The active state of the window.
1261   *
1262   * @type { ?boolean }
1263   * @syscap SystemCapability.Test.UiTest
1264   * @atomicservice
1265   * @since 11
1266   */
1267  active?: boolean;
1268}
1269
1270/**
1271 * Represents the information of an UI element, can be a component or window.
1272 *
1273 * @typedef UIElementInfo
1274 * @syscap SystemCapability.Test.UiTest
1275 * @since 10
1276 * @test
1277 */
1278/**
1279 * Represents the information of an UI element, can be a component or window.
1280 *
1281 * @typedef UIElementInfo
1282 * @syscap SystemCapability.Test.UiTest
1283 * @atomicservice
1284 * @since 11
1285 * @test
1286 */
1287declare interface UIElementInfo {
1288  /**
1289   * The bundle name of the host application.
1290   * @type { string }
1291   * @syscap SystemCapability.Test.UiTest
1292   * @since 10
1293   * @test
1294   */
1295  /**
1296   * The bundle name of the host application.
1297   * @type { string }
1298   * @syscap SystemCapability.Test.UiTest
1299   * @atomicservice
1300   * @since 11
1301   * @test
1302   */
1303  readonly bundleName: string;
1304  /**
1305   * The component type, set it as 'window' if it's a window.
1306   * @type { string }
1307   * @syscap SystemCapability.Test.UiTest
1308   * @since 10
1309   * @test
1310   */
1311  /**
1312   * The component type, set it as 'window' if it's a window.
1313   * @type { string }
1314   * @syscap SystemCapability.Test.UiTest
1315   * @atomicservice
1316   * @since 11
1317   * @test
1318   */
1319  readonly type: string;
1320  /**
1321   * The text of component, set it as window's title if it's a window.
1322   * @type { string }
1323   * @syscap SystemCapability.Test.UiTest
1324   * @since 10
1325   * @test
1326   */
1327  /**
1328   * The text of component, set it as window's title if it's a window.
1329   * @type { string }
1330   * @syscap SystemCapability.Test.UiTest
1331   * @atomicservice
1332   * @since 11
1333   * @test
1334   */
1335  readonly text: string;
1336}
1337
1338/**
1339 * Observer to monitor UI events.
1340 *
1341 * @typedef UIEventObserver
1342 * @syscap SystemCapability.Test.UiTest
1343 * @since 10
1344 * @test
1345 */
1346/**
1347 * Observer to monitor UI events.
1348 *
1349 * @typedef UIEventObserver
1350 * @syscap SystemCapability.Test.UiTest
1351 * @atomicservice
1352 * @since 11
1353 * @test
1354 */
1355declare interface UIEventObserver {
1356  /**
1357   * Listen for toast show once
1358   *
1359   * @param { 'toastShow' } type 'toastShow'.
1360   * @param { Callback<UIElementInfo> } callback function, returns the monitored UIElementInfo.
1361   * @throws { BusinessError } 401 - if the input parameters are invalid.
1362   * @syscap SystemCapability.Test.UiTest
1363   * @since 10
1364   * @test
1365   */
1366  /**
1367   * Listen for toast show once
1368   *
1369   * @param { 'toastShow' } type -'toastShow'.
1370   * @param { Callback<UIElementInfo> } callback - function, returns the monitored UIElementInfo.
1371   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1372   * @syscap SystemCapability.Test.UiTest
1373   * @atomicservice
1374   * @since 11
1375   * @test
1376   */
1377  once(type: 'toastShow', callback: Callback<UIElementInfo>): void;
1378
1379  /**
1380   * Listen for dialog show once
1381   *
1382   * @param { 'dialogShow' } type 'dialogShow'.
1383   * @param { Callback<UIElementInfo> } callback function, returns the monitored UIElementInfo.
1384   * @throws { BusinessError } 401 - if the input parameters are invalid.
1385   * @syscap SystemCapability.Test.UiTest
1386   * @since 10
1387   * @test
1388   */
1389  /**
1390   * Listen for dialog show once
1391   *
1392   * @param { 'dialogShow' } type - 'dialogShow'.
1393   * @param { Callback<UIElementInfo> } callback - function, returns the monitored UIElementInfo.
1394   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1395   * @syscap SystemCapability.Test.UiTest
1396   * @atomicservice
1397   * @since 11
1398   * @test
1399   */
1400  once(type: 'dialogShow', callback: Callback<UIElementInfo>): void;
1401}
1402
1403/**
1404 * Enumerates the direction for the UI operation .
1405 *
1406 * @enum { number }
1407 * @syscap SystemCapability.Test.UiTest
1408 * @since 10
1409 */
1410/**
1411 * Enumerates the direction for the UI operation .
1412 *
1413 * @enum { number }
1414 * @syscap SystemCapability.Test.UiTest
1415 * @atomicservice
1416 * @since 11
1417 */
1418/**
1419 * Enumerates the direction for the UI operation .
1420 *
1421 * @enum { number }
1422 * @syscap SystemCapability.Test.UiTest
1423 * @crossplatform
1424 * @atomicservice
1425 * @since 12
1426 */
1427declare enum UiDirection {
1428  /**
1429   * Left.
1430   *
1431   * @syscap SystemCapability.Test.UiTest
1432   * @since 10
1433   * @test
1434   */
1435  /**
1436   * Left.
1437   *
1438   * @syscap SystemCapability.Test.UiTest
1439   * @atomicservice
1440   * @since 11
1441   * @test
1442   */
1443  /**
1444   * Left.
1445   *
1446   * @syscap SystemCapability.Test.UiTest
1447   * @crossplatform
1448   * @atomicservice
1449   * @since 12
1450   * @test
1451   */
1452  LEFT = 0,
1453  /**
1454   * Right.
1455   *
1456   * @syscap SystemCapability.Test.UiTest
1457   * @since 10
1458   * @test
1459   */
1460  /**
1461   * Right.
1462   *
1463   * @syscap SystemCapability.Test.UiTest
1464   * @atomicservice
1465   * @since 11
1466   * @test
1467   */
1468  /**
1469   * Right.
1470   *
1471   * @syscap SystemCapability.Test.UiTest
1472   * @crossplatform
1473   * @atomicservice
1474   * @since 12
1475   * @test
1476   */
1477  RIGHT = 1,
1478  /**
1479   * Up.
1480   *
1481   * @syscap SystemCapability.Test.UiTest
1482   * @since 10
1483   * @test
1484   */
1485  /**
1486   * Up.
1487   *
1488   * @syscap SystemCapability.Test.UiTest
1489   * @atomicservice
1490   * @since 11
1491   * @test
1492   */
1493  /**
1494   * Up.
1495   *
1496   * @syscap SystemCapability.Test.UiTest
1497   * @crossplatform
1498   * @atomicservice
1499   * @since 12
1500   * @test
1501   */
1502  UP = 2,
1503  /**
1504   * Down.
1505   *
1506   * @syscap SystemCapability.Test.UiTest
1507   * @since 10
1508   * @test
1509   */
1510  /**
1511   * Down.
1512   *
1513   * @syscap SystemCapability.Test.UiTest
1514   * @atomicservice
1515   * @since 11
1516   * @test
1517   */
1518  /**
1519   * Down.
1520   *
1521   * @syscap SystemCapability.Test.UiTest
1522   * @crossplatform
1523   * @atomicservice
1524   * @since 12
1525   * @test
1526   */
1527  DOWN = 3
1528}
1529
1530/**
1531 * Enumerates the id of the button on the mouse.
1532 *
1533 * @enum { number }
1534 * @syscap SystemCapability.Test.UiTest
1535 * @since 10
1536 */
1537/**
1538 * Enumerates the id of the button on the mouse.
1539 *
1540 * @enum { number }
1541 * @syscap SystemCapability.Test.UiTest
1542 * @atomicservice
1543 * @since 11
1544 */
1545declare enum MouseButton {
1546  /**
1547   * Left button of the mouse.
1548   *
1549   * @syscap SystemCapability.Test.UiTest
1550   * @since 10
1551   * @test
1552   */
1553  /**
1554   * Left button of the mouse.
1555   *
1556   * @syscap SystemCapability.Test.UiTest
1557   * @atomicservice
1558   * @since 11
1559   * @test
1560   */
1561  MOUSE_BUTTON_LEFT = 0,
1562  /**
1563   * Right button of the mouse..
1564   *
1565   * @syscap SystemCapability.Test.UiTest
1566   * @since 10
1567   * @test
1568   */
1569  /**
1570   * Right button of the mouse..
1571   *
1572   * @syscap SystemCapability.Test.UiTest
1573   * @atomicservice
1574   * @since 11
1575   * @test
1576   */
1577  MOUSE_BUTTON_RIGHT = 1,
1578  /**
1579   * MIDDLE button of the mouse.
1580   *
1581   * @syscap SystemCapability.Test.UiTest
1582   * @since 10
1583   * @test
1584   */
1585  /**
1586   * MIDDLE button of the mouse.
1587   *
1588   * @syscap SystemCapability.Test.UiTest
1589   * @atomicservice
1590   * @since 11
1591   * @test
1592   */
1593  MOUSE_BUTTON_MIDDLE = 2
1594}
1595
1596/**
1597 * Describes the attribute requirements for the target Components.
1598 *
1599 * @syscap SystemCapability.Test.UiTest
1600 * @since 9
1601 */
1602/**
1603 * Describes the attribute requirements for the target Components.
1604 *
1605 * @syscap SystemCapability.Test.UiTest
1606 * @atomicservice
1607 * @since 11
1608 */
1609/**
1610 * Describes the attribute requirements for the target Components.
1611 *
1612 * @syscap SystemCapability.Test.UiTest
1613 * @crossplatform
1614 * @atomicservice
1615 * @since 12
1616 */
1617declare class On {
1618  /**
1619   * Specifies the text for the target Component.
1620   *
1621   * @param { string } txt The text value.
1622   * @param { MatchPattern } pattern The {@link MatchPattern} of the text value, default to {@link MatchPattern.EQUALS}
1623   * @returns { On } this {@link On} object.
1624   * @throws { BusinessError } 401 - if the input parameters are invalid.
1625   * @syscap SystemCapability.Test.UiTest
1626   * @since 9
1627   * @test
1628   */
1629  /**
1630   * Specifies the text for the target Component.
1631   *
1632   * @param { string } txt The text value.
1633   * @param { MatchPattern } pattern The {@link MatchPattern} of the text value, default to {@link MatchPattern.EQUALS}
1634   * @returns { On } this {@link On} object.
1635   * @throws { BusinessError } 401 - if the input parameters are invalid.
1636   * @syscap SystemCapability.Test.UiTest
1637   * @crossplatform
1638   * @since 10
1639   * @test
1640   */
1641  /**
1642   * Specifies the text for the target Component.
1643   *
1644   * @param { string } txt - the text value.
1645   * @param { MatchPattern } [pattern] - the {@link MatchPattern} of the text value,Set it default {@link MatchPattern.EQUALS} if null or undefined.
1646   * @returns { On } this {@link On} object.
1647   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1648   * @syscap SystemCapability.Test.UiTest
1649   * @crossplatform
1650   * @atomicservice
1651   * @since 11
1652   * @test
1653   */
1654  text(txt: string, pattern?: MatchPattern): On;
1655
1656  /**
1657   * Specifies the id of the target Component.
1658   *
1659   * @param { string } id The id value.
1660   * @returns { On } this {@link On} object.
1661   * @throws { BusinessError } 401 - if the input parameters are invalid.
1662   * @syscap SystemCapability.Test.UiTest
1663   * @since 9
1664   * @test
1665   */
1666  /**
1667   * Specifies the id of the target Component.
1668   *
1669   * @param { string } id The id value.
1670   * @returns { On } this {@link On} object.
1671   * @throws { BusinessError } 401 - if the input parameters are invalid.
1672   * @syscap SystemCapability.Test.UiTest
1673   * @crossplatform
1674   * @since 10
1675   * @test
1676   */
1677  /**
1678   * Specifies the id of the target Component.
1679   *
1680   * @param { string } id - the id value.
1681   * @returns { On } this {@link On} object.
1682   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1683   * @syscap SystemCapability.Test.UiTest
1684   * @crossplatform
1685   * @atomicservice
1686   * @since 11
1687   * @test
1688   */
1689  id(id: string): On;
1690
1691  /**
1692   * Specifies the type of the target Component.
1693   *
1694   * @param { string } tp The type value.
1695   * @returns { On } this {@link On} object.
1696   * @throws { BusinessError } 401 - if the input parameters are invalid.
1697   * @syscap SystemCapability.Test.UiTest
1698   * @since 9
1699   * @test
1700   */
1701  /**
1702   * Specifies the type of the target Component.
1703   *
1704   * @param { string } tp The type value.
1705   * @returns { On } this {@link On} object.
1706   * @throws { BusinessError } 401 - if the input parameters are invalid.
1707   * @syscap SystemCapability.Test.UiTest
1708   * @crossplatform
1709   * @since 10
1710   * @test
1711   */
1712  /**
1713   * Specifies the type of the target Component.
1714   *
1715   * @param { string } tp - The type value.
1716   * @returns { On } this {@link On} object.
1717   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
1718   * @syscap SystemCapability.Test.UiTest
1719   * @crossplatform
1720   * @atomicservice
1721   * @since 11
1722   * @test
1723   */
1724  type(tp: string): On;
1725
1726  /**
1727   * Specifies the clickable status of the target Component.
1728   *
1729   * @param { boolean } b The clickable status,default to true.
1730   * @returns { On } this {@link On} object.
1731   * @throws { BusinessError } 401 - if the input parameters are invalid.
1732   * @syscap SystemCapability.Test.UiTest
1733   * @since 9
1734   * @test
1735   */
1736  /**
1737   * Specifies the clickable status of the target Component.
1738   *
1739   * @param { boolean } b The clickable status,default to true.
1740   * @returns { On } this {@link On} object.
1741   * @throws { BusinessError } 401 - if the input parameters are invalid.
1742   * @syscap SystemCapability.Test.UiTest
1743   * @crossplatform
1744   * @since 10
1745   * @test
1746   */
1747  /**
1748   * Specifies the clickable status of the target Component.
1749   *
1750   * @param { boolean } [b] - the clickable status.Set it default true if null or undefined.
1751   * @returns { On } this {@link On} object.
1752   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
1753   * @syscap SystemCapability.Test.UiTest
1754   * @crossplatform
1755   * @atomicservice
1756   * @since 11
1757   * @test
1758   */
1759  clickable(b?: boolean): On;
1760
1761  /**
1762   * Specifies the longClickable status of the target Component.
1763   *
1764   * @param { boolean } b The clickable status,default to true.
1765   * @returns { On } this {@link On} object.
1766   * @throws { BusinessError } 401 - if the input parameters are invalid.
1767   * @syscap SystemCapability.Test.UiTest
1768   * @since 9
1769   * @test
1770   */
1771  /**
1772   * Specifies the longClickable status of the target Component.
1773   *
1774   * @param { boolean } b The clickable status,default to true.
1775   * @returns { On } this {@link On} object.
1776   * @throws { BusinessError } 401 - if the input parameters are invalid.
1777   * @syscap SystemCapability.Test.UiTest
1778   * @crossplatform
1779   * @since 10
1780   * @test
1781   */
1782  /**
1783   * Specifies the longClickable status of the target Component.
1784   *
1785   * @param { boolean } [b] - the longClickable status.Set it default true if null or undefined.
1786   * @returns { On } this {@link On} object.
1787   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
1788   * @syscap SystemCapability.Test.UiTest
1789   * @crossplatform
1790   * @atomicservice
1791   * @since 11
1792   * @test
1793   */
1794  longClickable(b?: boolean): On;
1795
1796  /**
1797   * Specifies the scrollable status of the target Component.
1798   *
1799   * @param { boolean } b The scrollable status,default to true.
1800   * @returns { On } this {@link On} object.
1801   * @throws { BusinessError } 401 - if the input parameters are invalid.
1802   * @syscap SystemCapability.Test.UiTest
1803   * @since 9
1804   * @test
1805   */
1806  /**
1807   * Specifies the scrollable status of the target Component.
1808   *
1809   * @param { boolean } b The scrollable status,default to true.
1810   * @returns { On } this {@link On} object.
1811   * @throws { BusinessError } 401 - if the input parameters are invalid.
1812   * @syscap SystemCapability.Test.UiTest
1813   * @crossplatform
1814   * @since 10
1815   * @test
1816   */
1817  /**
1818   * Specifies the scrollable status of the target Component.
1819   *
1820   * @param { boolean } [b] - the scrollable status.Set it default true if null or undefined.
1821   * @returns { On } this {@link On} object.
1822   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
1823   * @syscap SystemCapability.Test.UiTest
1824   * @crossplatform
1825   * @atomicservice
1826   * @since 11
1827   * @test
1828   */
1829  scrollable(b?: boolean): On;
1830
1831  /**
1832   * Specifies the enabled status of the target Component.
1833   *
1834   * @param { boolean } b The enabled status,default to true.
1835   * @returns { On } this {@link On} object.
1836   * @throws { BusinessError } 401 - if the input parameters are invalid.
1837   * @syscap SystemCapability.Test.UiTest
1838   * @since 9
1839   * @test
1840   */
1841  /**
1842   * Specifies the enabled status of the target Component.
1843   *
1844   * @param { boolean } b The enabled status,default to true.
1845   * @returns { On } this {@link On} object.
1846   * @throws { BusinessError } 401 - if the input parameters are invalid.
1847   * @syscap SystemCapability.Test.UiTest
1848   * @crossplatform
1849   * @since 10
1850   * @test
1851   */
1852  /**
1853   * Specifies the enabled status of the target Component.
1854   *
1855   * @param { boolean } [b] - the enabled status.Set it default true if null or undefined.
1856   * @returns { On } this {@link On} object.
1857   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
1858   * @syscap SystemCapability.Test.UiTest
1859   * @crossplatform
1860   * @atomicservice
1861   * @since 11
1862   * @test
1863   */
1864  enabled(b?: boolean): On;
1865
1866  /**
1867   * Specifies the focused status of the target Component.
1868   *
1869   * @param { boolean } b The focused status,default to true.
1870   * @returns { On } this {@link On} object.
1871   * @throws { BusinessError } 401 - if the input parameters are invalid.
1872   * @syscap SystemCapability.Test.UiTest
1873   * @since 9
1874   * @test
1875   */
1876  /**
1877   * Specifies the focused status of the target Component.
1878   *
1879   * @param { boolean } b The focused status,default to true.
1880   * @returns { On } this {@link On} object.
1881   * @throws { BusinessError } 401 - if the input parameters are invalid.
1882   * @syscap SystemCapability.Test.UiTest
1883   * @crossplatform
1884   * @since 10
1885   * @test
1886   */
1887  /**
1888   * Specifies the focused status of the target Component.
1889   *
1890   * @param { boolean } [b] - the focused status.Set it default true if null or undefined.
1891   * @returns { On } this {@link On} object.
1892   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
1893   * @syscap SystemCapability.Test.UiTest
1894   * @crossplatform
1895   * @atomicservice
1896   * @since 11
1897   * @test
1898   */
1899  focused(b?: boolean): On;
1900
1901  /**
1902   * Specifies the selected status of the target Component.
1903   *
1904   * @param { boolean } b The selected status,default to true.
1905   * @returns { On } this {@link On} object.
1906   * @throws { BusinessError } 401 - if the input parameters are invalid.
1907   * @syscap SystemCapability.Test.UiTest
1908   * @since 9
1909   * @test
1910   */
1911  /**
1912   * Specifies the selected status of the target Component.
1913   *
1914   * @param { boolean } b The selected status,default to true.
1915   * @returns { On } this {@link On} object.
1916   * @throws { BusinessError } 401 - if the input parameters are invalid.
1917   * @syscap SystemCapability.Test.UiTest
1918   * @crossplatform
1919   * @since 10
1920   * @test
1921   */
1922  /**
1923   * Specifies the selected status of the target Component.
1924   *
1925   * @param { boolean } [b] the - selected status.Set it default true if null or undefined.
1926   * @returns { On } this {@link On} object.
1927   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
1928   * @syscap SystemCapability.Test.UiTest
1929   * @crossplatform
1930   * @atomicservice
1931   * @since 11
1932   * @test
1933   */
1934  selected(b?: boolean): On;
1935
1936  /**
1937   * Specifies the checked status of the target Component.
1938   *
1939   * @param { boolean } b The checked status,default to false.
1940   * @returns { On } this {@link On} object.
1941   * @throws { BusinessError } 401 - if the input parameters are invalid.
1942   * @syscap SystemCapability.Test.UiTest
1943   * @since 9
1944   * @test
1945   */
1946  /**
1947   * Specifies the checked status of the target Component.
1948   *
1949   * @param { boolean } b The checked status,default to false.
1950   * @returns { On } this {@link On} object.
1951   * @throws { BusinessError } 401 - if the input parameters are invalid.
1952   * @syscap SystemCapability.Test.UiTest
1953   * @crossplatform
1954   * @since 10
1955   * @test
1956   */
1957  /**
1958   * Specifies the checked status of the target Component.
1959   *
1960   * @param { boolean } [b] - the checked status.Set it default false if null or undefined.
1961   * @returns { On } this {@link On} object.
1962   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
1963   * @syscap SystemCapability.Test.UiTest
1964   * @crossplatform
1965   * @atomicservice
1966   * @since 11
1967   * @test
1968   */
1969  checked(b?: boolean): On;
1970
1971  /**
1972   * Specifies the checkable status of the target Component.
1973   *
1974   * @param { boolean } b The checkable status,default to false.
1975   * @returns { On } this {@link On} object.
1976   * @throws { BusinessError } 401 - if the input parameters are invalid.
1977   * @syscap SystemCapability.Test.UiTest
1978   * @since 9
1979   * @test
1980   */
1981  /**
1982   * Specifies the checkable status of the target Component.
1983   *
1984   * @param { boolean } b The checkable status,default to false.
1985   * @returns { On } this {@link On} object.
1986   * @throws { BusinessError } 401 - if the input parameters are invalid.
1987   * @syscap SystemCapability.Test.UiTest
1988   * @crossplatform
1989   * @since 10
1990   * @test
1991   */
1992  /**
1993   * Specifies the checkable status of the target Component.
1994   *
1995   * @param { boolean } [b] - the checkable status.Set it default false if null or undefined.
1996   * @returns { On } this {@link On} object.
1997   * @throws { BusinessError } 401 - Parameter error. 1. Incorrect parameter types; 2. Parameter verification failed.
1998   * @syscap SystemCapability.Test.UiTest
1999   * @crossplatform
2000   * @atomicservice
2001   * @since 11
2002   * @test
2003   */
2004  checkable(b?: boolean): On;
2005
2006  /**
2007   * Requires that the target Component which is before another Component that specified by the given {@link On}
2008   * object,used to locate Component relatively.
2009   *
2010   * @param { On } on Describes the attribute requirements of Component which the target one is in front of.
2011   * @returns { On } this {@link On} object.
2012   * @throws { BusinessError } 401 - if the input parameters are invalid.
2013   * @syscap SystemCapability.Test.UiTest
2014   * @since 9
2015   * @test
2016   */
2017  /**
2018   * Requires that the target Component which is before another Component that specified by the given {@link On}
2019   * object,used to locate Component relatively.
2020   *
2021   * @param { On } on - describes the attribute requirements of Component which the target one is in front of.
2022   * @returns { On } this {@link On} object.
2023   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2024   * @syscap SystemCapability.Test.UiTest
2025   * @crossplatform
2026   * @atomicservice
2027   * @since 11
2028   * @test
2029   */
2030  isBefore(on: On): On;
2031
2032  /**
2033   * Requires that the target Component which is after another Component that specified by the given {@link On}
2034   * object,used to locate Component relatively.
2035   *
2036   * @param { On } on Describes the attribute requirements of Component which the target one is in back of.
2037   * @returns { On } this {@link On} object.
2038   * @throws { BusinessError } 401 - if the input parameters are invalid.
2039   * @syscap SystemCapability.Test.UiTest
2040   * @since 9
2041   * @test
2042   */
2043  /**
2044   * Requires that the target Component which is after another Component that specified by the given {@link On}
2045   * object,used to locate Component relatively.
2046   *
2047   * @param { On } on - describes the attribute requirements of Component which the target one is in back of.
2048   * @returns { On } this {@link On} object.
2049   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2050   * @syscap SystemCapability.Test.UiTest
2051   * @crossplatform
2052   * @atomicservice
2053   * @since 11
2054   * @test
2055   */
2056  isAfter(on: On): On;
2057
2058  /**
2059   * Requires that the target Component which is inside of another Component that specified by the given {@link On}
2060   * object,used to locate Component relatively.
2061   *
2062   * @param { On } on Describes the attribute requirements of Component which the target one is inside of.
2063   * @returns { On } this {@link On} object.
2064   * @throws { BusinessError } 401 - if the input parameters are invalid.
2065   * @syscap SystemCapability.Test.UiTest
2066   * @since 10
2067   * @test
2068   */
2069  /**
2070   * Requires that the target Component which is inside of another Component that specified by the given {@link On}
2071   * object,used to locate Component relatively.
2072   *
2073   * @param { On } on - describes the attribute requirements of Component which the target one is inside of.
2074   * @returns { On } this {@link On} object.
2075   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2076   * @syscap SystemCapability.Test.UiTest
2077   * @crossplatform
2078   * @atomicservice
2079   * @since 11
2080   * @test
2081   */
2082  within(on: On): On;
2083
2084  /**
2085   * Specifies the bundleName of the application which the window that the target Component is located belongs.
2086   *
2087   * @param { string } bundleName The bundleName of the specified window.
2088   * @returns { On } this {@link On} object.
2089   * @throws { BusinessError } 401 - if the input parameters are invalid.
2090   * @syscap SystemCapability.Test.UiTest
2091   * @since 10
2092   * @test
2093   */
2094  /**
2095   * Specifies the bundleName of the application which the window that the target Component is located belongs.
2096   *
2097   * @param { string } bundleName - the bundleName of the specified window.
2098   * @returns { On } this {@link On} object.
2099   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2100   * @syscap SystemCapability.Test.UiTest
2101   * @atomicservice
2102   * @since 11
2103   * @test
2104   */
2105  inWindow(bundleName: string): On;
2106
2107  /**
2108   * Specifies the description for the target Component.
2109   *
2110   * @param { string } val - the description value.
2111   * @param { MatchPattern } [pattern] - the {@link MatchPattern} of description value,set it default {@link MatchPattern.EQUALS} if null or undefined.
2112   * @returns { On } this {@link On} object.
2113   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2114   * @syscap SystemCapability.Test.UiTest
2115   * @atomicservice
2116   * @since 11
2117   * @test
2118   */
2119  description(val: string, pattern?: MatchPattern): On;
2120}
2121
2122/**
2123 * Represents an Component of the ohos application,user can perform operations or query attributes on it.
2124 *
2125 * @syscap SystemCapability.Test.UiTest
2126 * @since 9
2127 * @test
2128 */
2129/**
2130 * Represents an Component of the ohos application,user can perform operations or query attributes on it.
2131 *
2132 * @syscap SystemCapability.Test.UiTest
2133 * @atomicservice
2134 * @since 11
2135 * @test
2136 */
2137/**
2138 * Represents an Component of the ohos application,user can perform operations or query attributes on it.
2139 *
2140 * @syscap SystemCapability.Test.UiTest
2141 * @crossplatform
2142 * @atomicservice
2143 * @since 12
2144 * @test
2145 */
2146declare class Component {
2147  /**
2148   * Click this {@link Component}.
2149   *
2150   * @returns { Promise<void> }
2151   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2152   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2153   * @syscap SystemCapability.Test.UiTest
2154   * @since 9
2155   * @test
2156   */
2157  /**
2158   * Click this {@link Component}.
2159   *
2160   * @returns { Promise<void> }
2161   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2162   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2163   * @syscap SystemCapability.Test.UiTest
2164   * @crossplatform
2165   * @since 10
2166   * @test
2167   */
2168  /**
2169   * Click this {@link Component}.
2170   *
2171   * @returns { Promise<void> }
2172   * @throws { BusinessError } 17000002 - The async function is not called with await.
2173   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2174   * @syscap SystemCapability.Test.UiTest
2175   * @crossplatform
2176   * @atomicservice
2177   * @since 11
2178   * @test
2179   */
2180  click(): Promise<void>;
2181
2182  /**
2183   * Double click this {@link Component}.
2184   *
2185   * @returns { Promise<void> }
2186   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2187   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2188   * @syscap SystemCapability.Test.UiTest
2189   * @since 9
2190   * @test
2191   */
2192  /**
2193   * Double click this {@link Component}.
2194   *
2195   * @returns { Promise<void> }
2196   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2197   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2198   * @syscap SystemCapability.Test.UiTest
2199   * @crossplatform
2200   * @since 10
2201   * @test
2202   */
2203  /**
2204   * Double click this {@link Component}.
2205   *
2206   * @returns { Promise<void> }
2207   * @throws { BusinessError } 17000002 - The async function is not called with await.
2208   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2209   * @syscap SystemCapability.Test.UiTest
2210   * @crossplatform
2211   * @atomicservice
2212   * @since 11
2213   * @test
2214   */
2215  doubleClick(): Promise<void>;
2216
2217  /**
2218   * Long click this {@link Component}.
2219   *
2220   * @returns { Promise<void> }
2221   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2222   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2223   * @syscap SystemCapability.Test.UiTest
2224   * @since 9
2225   * @test
2226   */
2227  /**
2228   * Long click this {@link Component}.
2229   *
2230   * @returns { Promise<void> }
2231   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2232   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2233   * @syscap SystemCapability.Test.UiTest
2234   * @crossplatform
2235   * @since 10
2236   * @test
2237   */
2238  /**
2239   * Long click this {@link Component}.
2240   *
2241   * @returns { Promise<void> }
2242   * @throws { BusinessError } 17000002 - The async function is not called with await.
2243   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2244   * @syscap SystemCapability.Test.UiTest
2245   * @crossplatform
2246   * @atomicservice
2247   * @since 11
2248   * @test
2249   */
2250  longClick(): Promise<void>;
2251
2252  /**
2253   * Get the id attribute value.
2254   *
2255   * @returns { Promise<string> } the id value.
2256   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2257   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2258   * @syscap SystemCapability.Test.UiTest
2259   * @since 9
2260   * @test
2261   */
2262  /**
2263   * Get the id attribute value.
2264   *
2265   * @returns { Promise<string> } the id value.
2266   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2267   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2268   * @syscap SystemCapability.Test.UiTest
2269   * @crossplatform
2270   * @since 10
2271   * @test
2272   */
2273  /**
2274   * Get the id attribute value.
2275   *
2276   * @returns { Promise<string> } the id value.
2277   * @throws { BusinessError } 17000002 - The async function is not called with await.
2278   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2279   * @syscap SystemCapability.Test.UiTest
2280   * @crossplatform
2281   * @atomicservice
2282   * @since 11
2283   * @test
2284   */
2285  getId(): Promise<string>;
2286
2287  /**
2288   * Get the text attribute value.
2289   *
2290   * @returns { Promise<string> } the text value.
2291   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2292   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2293   * @syscap SystemCapability.Test.UiTest
2294   * @since 9
2295   * @test
2296   */
2297  /**
2298   * Get the text attribute value.
2299   *
2300   * @returns { Promise<string> } the text value.
2301   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2302   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2303   * @syscap SystemCapability.Test.UiTest
2304   * @crossplatform
2305   * @since 10
2306   * @test
2307   */
2308  /**
2309   * Get the text attribute value.
2310   *
2311   * @returns { Promise<string> } the text value.
2312   * @throws { BusinessError } 17000002 - The async function is not called with await.
2313   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2314   * @syscap SystemCapability.Test.UiTest
2315   * @crossplatform
2316   * @atomicservice
2317   * @since 11
2318   * @test
2319   */
2320  getText(): Promise<string>;
2321
2322  /**
2323   * Get the type name.
2324   *
2325   * @returns { Promise<string> } the type name.
2326   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2327   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2328   * @syscap SystemCapability.Test.UiTest
2329   * @since 9
2330   * @test
2331   */
2332  /**
2333   * Get the type name.
2334   *
2335   * @returns { Promise<string> } the type name.
2336   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2337   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2338   * @syscap SystemCapability.Test.UiTest
2339   * @crossplatform
2340   * @since 10
2341   * @test
2342   */
2343  /**
2344   * Get the type name.
2345   *
2346   * @returns { Promise<string> } the type name.
2347   * @throws { BusinessError } 17000002 - The async function is not called with await.
2348   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2349   * @syscap SystemCapability.Test.UiTest
2350   * @crossplatform
2351   * @atomicservice
2352   * @since 11
2353   * @test
2354   */
2355  getType(): Promise<string>;
2356
2357  /**
2358   * Get the clickable status of this {@link Component}.
2359   *
2360   * @returns { Promise<boolean> } the clickable status.
2361   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2362   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2363   * @syscap SystemCapability.Test.UiTest
2364   * @since 9
2365   * @test
2366   */
2367  /**
2368   * Get the clickable status of this {@link Component}.
2369   *
2370   * @returns { Promise<boolean> } the clickable status.
2371   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2372   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2373   * @syscap SystemCapability.Test.UiTest
2374   * @crossplatform
2375   * @since 10
2376   * @test
2377   */
2378  /**
2379   * Get the clickable status of this {@link Component}.
2380   *
2381   * @returns { Promise<boolean> } the clickable status.
2382   * @throws { BusinessError } 17000002 - The async function is not called with await.
2383   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2384   * @syscap SystemCapability.Test.UiTest
2385   * @crossplatform
2386   * @atomicservice
2387   * @since 11
2388   * @test
2389   */
2390  isClickable(): Promise<boolean>;
2391
2392  /**
2393   * Get the longClickable status of this {@link Component}.
2394   *
2395   * @returns { Promise<boolean> } the longClickable status.
2396   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2397   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2398   * @syscap SystemCapability.Test.UiTest
2399   * @since 9
2400   * @test
2401   */
2402  /**
2403   * Get the longClickable status of this {@link Component}.
2404   *
2405   * @returns { Promise<boolean> } the longClickable status.
2406   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2407   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2408   * @syscap SystemCapability.Test.UiTest
2409   * @crossplatform
2410   * @since 10
2411   * @test
2412   */
2413  /**
2414   * Get the clickable status of this {@link Component}.
2415   *
2416   * @returns { Promise<boolean> } the clickable status.
2417   * @throws { BusinessError } 17000002 - The async function is not called with await.
2418   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2419   * @syscap SystemCapability.Test.UiTest
2420   * @crossplatform
2421   * @atomicservice
2422   * @since 11
2423   * @test
2424   */
2425  isLongClickable(): Promise<boolean>;
2426
2427  /**
2428   * Get the scrollable status of this {@link Component}.
2429   *
2430   * @returns { Promise<boolean> } the scrollable status.
2431   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2432   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2433   * @syscap SystemCapability.Test.UiTest
2434   * @since 9
2435   * @test
2436   */
2437  /**
2438   * Get the scrollable status of this {@link Component}.
2439   *
2440   * @returns { Promise<boolean> } the scrollable status.
2441   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2442   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2443   * @syscap SystemCapability.Test.UiTest
2444   * @crossplatform
2445   * @since 10
2446   * @test
2447   */
2448  /**
2449   * Get the scrollable status of this {@link Component}.
2450   *
2451   * @returns { Promise<boolean> } the scrollable status.
2452   * @throws { BusinessError } 17000002 - The async function is not called with await.
2453   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2454   * @syscap SystemCapability.Test.UiTest
2455   * @crossplatform
2456   * @atomicservice
2457   * @since 11
2458   * @test
2459   */
2460  isScrollable(): Promise<boolean>;
2461
2462  /**
2463   * Get the enabled status of this {@link Component}.
2464   *
2465   * @returns { Promise<boolean> } the enabled status.
2466   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2467   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2468   * @syscap SystemCapability.Test.UiTest
2469   * @since 9
2470   * @test
2471   */
2472  /**
2473   * Get the enabled status of this {@link Component}.
2474   *
2475   * @returns { Promise<boolean> } the enabled status.
2476   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2477   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2478   * @syscap SystemCapability.Test.UiTest
2479   * @crossplatform
2480   * @since 10
2481   * @test
2482   */
2483  /**
2484   * Get the enabled status of this {@link Component}.
2485   *
2486   * @returns { Promise<boolean> } the enabled status.
2487   * @throws { BusinessError } 17000002 - The async function is not called with await.
2488   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2489   * @syscap SystemCapability.Test.UiTest
2490   * @crossplatform
2491   * @atomicservice
2492   * @since 11
2493   * @test
2494   */
2495  isEnabled(): Promise<boolean>;
2496
2497  /**
2498   * Get the focused status of this {@link Component}.
2499   *
2500   * @returns { Promise<boolean> } the focused status.
2501   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2502   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2503   * @syscap SystemCapability.Test.UiTest
2504   * @since 9
2505   * @test
2506   */
2507  /**
2508   * Get the focused status of this {@link Component}.
2509   *
2510   * @returns { Promise<boolean> } the focused status.
2511   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2512   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2513   * @syscap SystemCapability.Test.UiTest
2514   * @crossplatform
2515   * @since 10
2516   * @test
2517   */
2518  /**
2519   * Get the focused status of this {@link Component}.
2520   *
2521   * @returns { Promise<boolean> } the focused status.
2522   * @throws { BusinessError } 17000002 - The async function is not called with await.
2523   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2524   * @syscap SystemCapability.Test.UiTest
2525   * @crossplatform
2526   * @atomicservice
2527   * @since 11
2528   * @test
2529   */
2530  isFocused(): Promise<boolean>;
2531
2532  /**
2533   * Get the selected status of this {@link Component}.
2534   *
2535   * @returns { Promise<boolean> } the selected status.
2536   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2537   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2538   * @syscap SystemCapability.Test.UiTest
2539   * @since 9
2540   * @test
2541   */
2542  /**
2543   * Get the selected status of this {@link Component}.
2544   *
2545   * @returns { Promise<boolean> } the selected status.
2546   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2547   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2548   * @syscap SystemCapability.Test.UiTest
2549   * @crossplatform
2550   * @since 10
2551   * @test
2552   */
2553  /**
2554   * Get the selected status of this {@link Component}.
2555   *
2556   * @returns { Promise<boolean> } the selected status.
2557   * @throws { BusinessError } 17000002 - The async function is not called with await.
2558   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2559   * @syscap SystemCapability.Test.UiTest
2560   * @crossplatform
2561   * @atomicservice
2562   * @since 11
2563   * @test
2564   */
2565  isSelected(): Promise<boolean>;
2566
2567  /**
2568   * Get the checked status of this {@link Component}.
2569   *
2570   * @returns { Promise<boolean> } the checked status.
2571   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2572   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2573   * @syscap SystemCapability.Test.UiTest
2574   * @since 9
2575   * @test
2576   */
2577  /**
2578   * Get the checked status of this {@link Component}.
2579   *
2580   * @returns { Promise<boolean> } the checked status.
2581   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2582   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2583   * @syscap SystemCapability.Test.UiTest
2584   * @crossplatform
2585   * @since 10
2586   * @test
2587   */
2588  /**
2589   * Get the checked status of this {@link Component}.
2590   *
2591   * @returns { Promise<boolean> } the checked status.
2592   * @throws { BusinessError } 17000002 - The async function is not called with await.
2593   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2594   * @syscap SystemCapability.Test.UiTest
2595   * @crossplatform
2596   * @atomicservice
2597   * @since 11
2598   * @test
2599   */
2600  isChecked(): Promise<boolean>;
2601
2602  /**
2603   * Get the checkable status of this {@link Component}.
2604   *
2605   * @returns { Promise<boolean> } the checkable status.
2606   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2607   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2608   * @syscap SystemCapability.Test.UiTest
2609   * @since 9
2610   * @test
2611   */
2612  /**
2613   * Get the checkable status of this {@link Component}.
2614   *
2615   * @returns { Promise<boolean> } the checkable status.
2616   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2617   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2618   * @syscap SystemCapability.Test.UiTest
2619   * @crossplatform
2620   * @since 10
2621   * @test
2622   */
2623  /**
2624   * Get the checkable status of this {@link Component}.
2625   *
2626   * @returns { Promise<boolean> } the checkable status.
2627   * @throws { BusinessError } 17000002 - The async function is not called with await.
2628   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2629   * @syscap SystemCapability.Test.UiTest
2630   * @crossplatform
2631   * @atomicservice
2632   * @since 11
2633   * @test
2634   */
2635  isCheckable(): Promise<boolean>;
2636
2637  /**
2638   * Inject text to this {@link Component},applicable to TextInput.
2639   *
2640   * @param { string } text The text to inject.
2641   * @returns { Promise<void> }
2642   * @throws { BusinessError } 401 - if the input parameters are invalid.
2643   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2644   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2645   * @syscap SystemCapability.Test.UiTest
2646   * @since 9
2647   * @test
2648   */
2649  /**
2650   * Inject text to this {@link Component},applicable to TextInput.
2651   *
2652   * @param { string } text The text to inject.
2653   * @returns { Promise<void> }
2654   * @throws { BusinessError } 401 - if the input parameters are invalid.
2655   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2656   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2657   * @syscap SystemCapability.Test.UiTest
2658   * @crossplatform
2659   * @since 10
2660   * @test
2661   */
2662  /**
2663   * Inject text to this {@link Component},applicable to TextInput.
2664   *
2665   * @param { string } text - the text to inject.
2666   * @returns { Promise<void> }
2667   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2668   * @throws { BusinessError } 17000002 - The async function is not called with await.
2669   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2670   * @syscap SystemCapability.Test.UiTest
2671   * @crossplatform
2672   * @atomicservice
2673   * @since 11
2674   * @test
2675   */
2676  inputText(text: string): Promise<void>;
2677
2678  /**
2679   * Clear text of this {@link Component},applicable to TextInput.
2680   *
2681   * @returns { Promise<void> }
2682   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2683   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2684   * @syscap SystemCapability.Test.UiTest
2685   * @since 9
2686   * @test
2687   */
2688  /**
2689   * Clear text of this {@link Component},applicable to TextInput.
2690   *
2691   * @returns { Promise<void> }
2692   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2693   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2694   * @syscap SystemCapability.Test.UiTest
2695   * @crossplatform
2696   * @since 10
2697   * @test
2698   */
2699  /**
2700   * Clear text of this {@link Component},applicable to TextInput.
2701   *
2702   * @returns { Promise<void> }
2703   * @throws { BusinessError } 17000002 - The async function is not called with await.
2704   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2705   * @syscap SystemCapability.Test.UiTest
2706   * @crossplatform
2707   * @atomicservice
2708   * @since 11
2709   * @test
2710   */
2711  clearText(): Promise<void>;
2712
2713  /**
2714   * Scroll on this {@link Component} to the top,applicable to scrollable one.
2715   *
2716   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
2717   * @returns { Promise<void> }
2718   * @throws { BusinessError } 401 - if the input parameters are invalid.
2719   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2720   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2721   * @syscap SystemCapability.Test.UiTest
2722   * @since 9
2723   * @test
2724   */
2725  /**
2726   * Scroll on this {@link Component} to the top,applicable to scrollable one.
2727   *
2728   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
2729   * @returns { Promise<void> }
2730   * @throws { BusinessError } 401 - if the input parameters are invalid.
2731   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2732   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2733   * @syscap SystemCapability.Test.UiTest
2734   * @crossplatform
2735   * @since 10
2736   * @test
2737   */
2738  /**
2739   * Scroll on this {@link Component} to the top,applicable to scrollable one.
2740   *
2741   * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000.Set it default 600 if out of range or null or undefined.
2742   * @returns { Promise<void> }
2743   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
2744   * @throws { BusinessError } 17000002 - The async function is not called with await.
2745   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2746   * @syscap SystemCapability.Test.UiTest
2747   * @crossplatform
2748   * @atomicservice
2749   * @since 11
2750   * @test
2751   */
2752  scrollToTop(speed?: number): Promise<void>;
2753
2754  /**
2755   * Scroll on this {@link Component} to the bottom,applicable to scrollable one.
2756   *
2757   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
2758   * @returns { Promise<void> }
2759   * @throws { BusinessError } 401 - if the input parameters are invalid.
2760   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2761   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2762   * @syscap SystemCapability.Test.UiTest
2763   * @since 9
2764   * @test
2765   */
2766  /**
2767   * Scroll on this {@link Component} to the bottom,applicable to scrollable one.
2768   *
2769   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
2770   * @returns { Promise<void> }
2771   * @throws { BusinessError } 401 - if the input parameters are invalid.
2772   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2773   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2774   * @syscap SystemCapability.Test.UiTest
2775   * @crossplatform
2776   * @since 10
2777   * @test
2778   */
2779  /**
2780   * Scroll on this {@link Component} to the bottom,applicable to scrollable one.
2781   *
2782   * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined.
2783   * @returns { Promise<void> }
2784   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1. Incorrect parameter types; 2. Parameter verification failed.
2785   * @throws { BusinessError } 17000002 - The async function is not called with await.
2786   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2787   * @syscap SystemCapability.Test.UiTest
2788   * @crossplatform
2789   * @atomicservice
2790   * @since 11
2791   * @test
2792   */
2793  scrollToBottom(speed?: number): Promise<void>;
2794
2795  /**
2796   * Scroll on this {@link Component}to find matched {@link Component},applicable to scrollable one.
2797   *
2798   * @param { On } on The attribute requirements of the target {@link Component}.
2799   * @returns { Promise<Component> } the found result,or undefined if not found.
2800   * @throws { BusinessError } 401 - if the input parameters are invalid.
2801   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2802   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2803   * @syscap SystemCapability.Test.UiTest
2804   * @since 9
2805   * @test
2806   */
2807  /**
2808   * Scroll on this {@link Component}to find matched {@link Component},applicable to scrollable one.
2809   *
2810   * @param { On } on The attribute requirements of the target {@link Component}.
2811   * @returns { Promise<Component> } the found result,or undefined if not found.
2812   * @throws { BusinessError } 401 - if the input parameters are invalid.
2813   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2814   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2815   * @syscap SystemCapability.Test.UiTest
2816   * @crossplatform
2817   * @since 10
2818   * @test
2819   */
2820  /**
2821   * Scroll on this {@link Component}to find matched {@link Component},applicable to scrollable one.
2822   *
2823   * @param { On } on - the attribute requirements of the target {@link Component}.
2824   * @returns { Promise<Component> } the found result,or undefined if not found.
2825   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2826   * @throws { BusinessError } 17000002 - The async function is not called with await.
2827   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2828   * @syscap SystemCapability.Test.UiTest
2829   * @crossplatform
2830   * @atomicservice
2831   * @since 11
2832   * @test
2833   */
2834  scrollSearch(on: On): Promise<Component>;
2835
2836  /**
2837   * Get the bounds rect of this {@link Component}.
2838   *
2839   * @returns { Promise<Rect> } the bounds rect object.
2840   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2841   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2842   * @syscap SystemCapability.Test.UiTest
2843   * @since 9
2844   * @test
2845   */
2846  /**
2847   * Get the bounds rect of this {@link Component}.
2848   *
2849   * @returns { Promise<Rect> } the bounds rect object.
2850   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2851   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2852   * @syscap SystemCapability.Test.UiTest
2853   * @atomicservice
2854   * @since 11
2855   * @test
2856   */
2857  /**
2858   * Get the bounds rect of this {@link Component}.
2859   *
2860   * @returns { Promise<Rect> } the bounds rect object.
2861   * @throws { BusinessError } 17000002 - The async function is not called with await.
2862   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2863   * @syscap SystemCapability.Test.UiTest
2864   * @crossplatform
2865   * @atomicservice
2866   * @since 12
2867   * @test
2868   */
2869  getBounds(): Promise<Rect>;
2870
2871  /**
2872   * Get the boundsCenter of this {@link Component}.
2873   *
2874   * @returns { Promise<Point> } the boundsCenter object.
2875   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2876   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2877   * @syscap SystemCapability.Test.UiTest
2878   * @since 9
2879   * @test
2880   */
2881  /**
2882   * Get the boundsCenter of this {@link Component}.
2883   *
2884   * @returns { Promise<Point> } the boundsCenter object.
2885   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2886   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2887   * @syscap SystemCapability.Test.UiTest
2888   * @crossplatform
2889   * @since 10
2890   * @test
2891   */
2892  /**
2893   * Get the boundsCenter of this {@link Component}.
2894   *
2895   * @returns { Promise<Point> } the boundsCenter object.
2896   * @throws { BusinessError } 17000002 - The async function is not called with await.
2897   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2898   * @syscap SystemCapability.Test.UiTest
2899   * @crossplatform
2900   * @atomicservice
2901   * @since 11
2902   * @test
2903   */
2904  getBoundsCenter(): Promise<Point>;
2905
2906  /**
2907   * Drag this {@link Component} to the bounds rect of target Component.
2908   *
2909   * @param { Component } target The target {@link Component}.
2910   * @returns { Promise<void> }
2911   * @throws { BusinessError } 401 - if the input parameters are invalid.
2912   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2913   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2914   * @syscap SystemCapability.Test.UiTest
2915   * @since 9
2916   * @test
2917   */
2918  /**
2919   * Drag this {@link Component} to the bounds rect of target Component.
2920   *
2921   * @param { Component } target - the target {@link Component}.
2922   * @returns { Promise<void> }
2923   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2924   * @throws { BusinessError } 17000002 - The async function is not called with await.
2925   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2926   * @syscap SystemCapability.Test.UiTest
2927   * @atomicservice
2928   * @since 11
2929   * @test
2930   */
2931  dragTo(target: Component): Promise<void>;
2932
2933  /**
2934   * Pinch enlarge this {@link Component} to the target scale.
2935   *
2936   * @param { number } scale The scale of the pinch enlarge this {@link Component}'s size.
2937   * @returns { Promise<void> }
2938   * @throws { BusinessError } 401 - if the input parameters are invalid.
2939   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2940   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2941   * @syscap SystemCapability.Test.UiTest
2942   * @since 9
2943   * @test
2944   */
2945  /**
2946   * Pinch enlarge this {@link Component} to the target scale.
2947   *
2948   * @param { number } scale - the scale of the pinch enlarge this {@link Component}'s size, ranges greater than 1.
2949   * @returns { Promise<void> }
2950   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2951   * @throws { BusinessError } 17000002 - The async function is not called with await.
2952   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2953   * @syscap SystemCapability.Test.UiTest
2954   * @crossplatform
2955   * @atomicservice
2956   * @since 11
2957   * @test
2958   */
2959  pinchOut(scale: number): Promise<void>;
2960
2961  /**
2962   * Pinch shrink this {@link Component} to the target scale.
2963   *
2964   * @param { number } scale The scale of the pinch shrink this {@link Component}'s size.
2965   * @returns { Promise<void> }
2966   * @throws { BusinessError } 401 - if the input parameters are invalid.
2967   * @throws { BusinessError } 17000002 - if the async function was not called with await.
2968   * @throws { BusinessError } 17000004 - if the component is invisible or destroyed.
2969   * @syscap SystemCapability.Test.UiTest
2970   * @since 9
2971   * @test
2972   */
2973  /**
2974   * Pinch shrink this {@link Component} to the target scale.
2975   *
2976   * @param { number } scale - the scale of the pinch shrink this {@link Component}'s size, ranges from 0 to 1.
2977   * @returns { Promise<void> }
2978   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
2979   * @throws { BusinessError } 17000002 - The async function is not called with await.
2980   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2981   * @syscap SystemCapability.Test.UiTest
2982   * @crossplatform
2983   * @atomicservice
2984   * @since 11
2985   * @test
2986   */
2987  pinchIn(scale: number): Promise<void>;
2988
2989  /**
2990   * Get the description attribute value.
2991   *
2992   * @returns { Promise<string> } the description value.
2993   * @throws { BusinessError } 17000002 - The async function is not called with await.
2994   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
2995   * @syscap SystemCapability.Test.UiTest
2996   * @atomicservice
2997   * @since 11
2998   * @test
2999   */
3000  getDescription(): Promise<string>;
3001}
3002
3003/**
3004 * The unified facade of UiTest framework,can be used to find {@link Component},trigger keyEvents,perform
3005 * coordinates-based UI actions,capture screen and so on.
3006 *
3007 * @syscap SystemCapability.Test.UiTest
3008 * @since 9
3009 * @test
3010 */
3011/**
3012 * The unified facade of UiTest framework,can be used to find {@link Component},trigger keyEvents,perform
3013 * coordinates-based UI actions,capture screen and so on.
3014 *
3015 * @syscap SystemCapability.Test.UiTest
3016 * @atomicservice
3017 * @since 11
3018 * @test
3019 */
3020/**
3021 * The unified facade of UiTest framework,can be used to find {@link Component},trigger keyEvents,perform
3022 * coordinates-based UI actions,capture screen and so on.
3023 *
3024 * @syscap SystemCapability.Test.UiTest
3025 * @crossplatform
3026 * @atomicservice
3027 * @since 12
3028 * @test
3029 */
3030declare class Driver {
3031  /**
3032   * Create an {@link Driver} object.
3033   *
3034   * @returns { Driver } the {@link Driver} object.
3035   * @throws { BusinessError } 17000001 - if the test framework failed to initialize.
3036   * @syscap SystemCapability.Test.UiTest
3037   * @since 9
3038   * @test
3039   */
3040  /**
3041   * Create an {@link Driver} object.
3042   *
3043   * @returns { Driver } the {@link Driver} object.
3044   * @throws { BusinessError } 17000001 - if the test framework failed to initialize.
3045   * @syscap SystemCapability.Test.UiTest
3046   * @crossplatform
3047   * @since 10
3048   * @test
3049   */
3050  /**
3051   * Create an {@link Driver} object.
3052   *
3053   * @returns { Driver } the {@link Driver} object.
3054   * @throws { BusinessError } 17000001 - Initialization failed.
3055   * @syscap SystemCapability.Test.UiTest
3056   * @crossplatform
3057   * @atomicservice
3058   * @since 11
3059   * @test
3060   */
3061  static create(): Driver;
3062
3063  /**
3064   * Delay with specified duration.
3065   *
3066   * @param { number } duration The delay duration in milliseconds.
3067   * @returns { Promise<void> }
3068   * @throws { BusinessError } 401 - if the input parameters are invalid.
3069   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3070   * @syscap SystemCapability.Test.UiTest
3071   * @since 9
3072   * @test
3073   */
3074  /**
3075   * Delay with specified duration.
3076   *
3077   * @param { number } duration The delay duration in milliseconds.
3078   * @returns { Promise<void> }
3079   * @throws { BusinessError } 401 - if the input parameters are invalid.
3080   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3081   * @syscap SystemCapability.Test.UiTest
3082   * @crossplatform
3083   * @since 10
3084   * @test
3085   */
3086  /**
3087   * Delay with specified duration.
3088   *
3089   * @param { number } duration - the delay duration in milliseconds, not less than 0.
3090   * @returns { Promise<void> }
3091   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3092   * @throws { BusinessError } 17000002 - The async function is not called with await.
3093   * @syscap SystemCapability.Test.UiTest
3094   * @crossplatform
3095   * @atomicservice
3096   * @since 11
3097   * @test
3098   */
3099  delayMs(duration: number): Promise<void>;
3100
3101  /**
3102   * Find the first matched {@link Component} on current UI.
3103   *
3104   * @param { On } on The attribute requirements of the target {@link Component}.
3105   * @returns { Promise<Component> } the first matched {@link Component} or undefined.
3106   * @throws { BusinessError } 401 - if the input parameters are invalid.
3107   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3108   * @syscap SystemCapability.Test.UiTest
3109   * @since 9
3110   * @test
3111   */
3112  /**
3113   * Find the first matched {@link Component} on current UI.
3114   *
3115   * @param { On } on The attribute requirements of the target {@link Component}.
3116   * @returns { Promise<Component> } the first matched {@link Component} or undefined.
3117   * @throws { BusinessError } 401 - if the input parameters are invalid.
3118   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3119   * @syscap SystemCapability.Test.UiTest
3120   * @crossplatform
3121   * @since 10
3122   * @test
3123   */
3124  /**
3125   * Find the first matched {@link Component} on current UI.
3126   *
3127   * @param { On } on - the attribute requirements of the target {@link Component}.
3128   * @returns { Promise<Component> } the first matched {@link Component} or undefined.
3129   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3130   * @throws { BusinessError } 17000002 - The async function is not called with await.
3131   * @syscap SystemCapability.Test.UiTest
3132   * @crossplatform
3133   * @atomicservice
3134   * @since 11
3135   * @test
3136   */
3137  findComponent(on: On): Promise<Component>;
3138
3139  /**
3140   * Find the first matched {@link UiWindow} window.
3141   *
3142   * @param { WindowFilter } filter The filer condition of the target {@link UiWindow}.
3143   * @returns { Promise<UiWindow> } the first matched {@link UiWindow} or undefined.
3144   * @throws { BusinessError } 401 - if the input parameters are invalid.
3145   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3146   * @syscap SystemCapability.Test.UiTest
3147   * @since 9
3148   * @test
3149   */
3150  /**
3151   * Find the first matched {@link UiWindow} window.
3152   *
3153   * @param { WindowFilter } filter - the filer condition of the target {@link UiWindow}.
3154   * @returns { Promise<UiWindow> } the first matched {@link UiWindow} or undefined.
3155   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3156   * @throws { BusinessError } 17000002 - The async function is not called with await.
3157   * @syscap SystemCapability.Test.UiTest
3158   * @atomicservice
3159   * @since 11
3160   * @test
3161   */
3162  findWindow(filter: WindowFilter): Promise<UiWindow>;
3163
3164  /**
3165   * Find the first matched {@link Component} on current UI during the time given.
3166   *
3167   * @param { On } on The attribute requirements of the target {@link Component}.
3168   * @param { number } time Duration of finding in milliseconds
3169   * @returns { Promise<Component> } the first matched {@link Component} or undefined.
3170   * @throws { BusinessError } 401 - if the input parameters are invalid.
3171   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3172   * @syscap SystemCapability.Test.UiTest
3173   * @since 9
3174   * @test
3175   */
3176  /**
3177   * Find the first matched {@link Component} on current UI during the time given.
3178   *
3179   * @param { On } on - the attribute requirements of the target {@link Component}.
3180   * @param { number } time - duration of finding in milliseconds, not less than 0.
3181   * @returns { Promise<Component> } the first matched {@link Component} or undefined.
3182   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3183   * @throws { BusinessError } 17000002 - The async function is not called with await.
3184   * @syscap SystemCapability.Test.UiTest
3185   * @atomicservice
3186   * @since 11
3187   * @test
3188   */
3189  waitForComponent(on: On, time: number): Promise<Component>;
3190
3191  /**
3192   * Find all the matched {@link Component}s on current UI.
3193   *
3194   * @param { On } on The attribute requirements of the target {@link Component}.
3195   * @returns { Promise<Array<Component>> } the matched {@link Component}s list.
3196   * @throws { BusinessError } 401 - if the input parameters are invalid.
3197   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3198   * @syscap SystemCapability.Test.UiTest
3199   * @since 9
3200   * @test
3201   */
3202  /**
3203   * Find all the matched {@link Component}s on current UI.
3204   *
3205   * @param { On } on The attribute requirements of the target {@link Component}.
3206   * @returns { Promise<Array<Component>> } the matched {@link Component}s list.
3207   * @throws { BusinessError } 401 - if the input parameters are invalid.
3208   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3209   * @syscap SystemCapability.Test.UiTest
3210   * @crossplatform
3211   * @since 10
3212   * @test
3213   */
3214  /**
3215   * Find all the matched {@link Component}s on current UI.
3216   *
3217   * @param { On } on - the attribute requirements of the target {@link Component}.
3218   * @returns { Promise<Array<Component>> } the matched {@link Component}s list.
3219   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3220   * @throws { BusinessError } 17000002 - The async function is not called with await.
3221   * @syscap SystemCapability.Test.UiTest
3222   * @crossplatform
3223   * @atomicservice
3224   * @since 11
3225   * @test
3226   */
3227  findComponents(on: On): Promise<Array<Component>>;
3228
3229  /**
3230   * Assert t the matched {@link Component}s exists on current UI;if not,assertError will be raised.
3231   *
3232   * @param { On } on The attribute requirements of the target {@link Component}.
3233   * @returns { Promise<void> }
3234   * @throws { BusinessError } 401 - if the input parameters are invalid.
3235   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3236   * @throws { BusinessError } 17000003 - if the assertion failed.
3237   * @syscap SystemCapability.Test.UiTest
3238   * @since 9
3239   * @test
3240   */
3241  /**
3242   * Assert t the matched {@link Component}s exists on current UI;if not,assertError will be raised.
3243   *
3244   * @param { On } on The attribute requirements of the target {@link Component}.
3245   * @returns { Promise<void> }
3246   * @throws { BusinessError } 401 - if the input parameters are invalid.
3247   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3248   * @throws { BusinessError } 17000003 - if the assertion failed.
3249   * @syscap SystemCapability.Test.UiTest
3250   * @crossplatform
3251   * @since 10
3252   * @test
3253   */
3254  /**
3255   * Assert t the matched {@link Component}s exists on current UI;if not,assertError will be raised.
3256   *
3257   * @param { On } on - the attribute requirements of the target {@link Component}.
3258   * @returns { Promise<void> }
3259   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3260   * @throws { BusinessError } 17000002 - The async function is not called with await.
3261   * @throws { BusinessError } 17000003 - Assertion failed.
3262   * @syscap SystemCapability.Test.UiTest
3263   * @crossplatform
3264   * @atomicservice
3265   * @since 11
3266   * @test
3267   */
3268  assertComponentExist(on: On): Promise<void>;
3269
3270  /**
3271   * Press the BACK key.
3272   *
3273   * @returns { Promise<void> }
3274   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3275   * @syscap SystemCapability.Test.UiTest
3276   * @since 9
3277   * @test
3278   */
3279  /**
3280   * Press the BACK key.
3281   *
3282   * @returns { Promise<void> }
3283   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3284   * @syscap SystemCapability.Test.UiTest
3285   * @crossplatform
3286   * @since 10
3287   * @test
3288   */
3289  /**
3290   * Press the BACK key.
3291   *
3292   * @returns { Promise<void> }
3293   * @throws { BusinessError } 17000002 - The async function is not called with await.
3294   * @syscap SystemCapability.Test.UiTest
3295   * @crossplatform
3296   * @atomicservice
3297   * @since 11
3298   * @test
3299   */
3300  pressBack(): Promise<void>;
3301
3302  /**
3303   * Press the specified key.
3304   *
3305   * @param { number } keyCode the target keyCode.
3306   * @returns { Promise<void> }
3307   * @throws { BusinessError } 401 - if the input parameters are invalid.
3308   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3309   * @syscap SystemCapability.Test.UiTest
3310   * @since 9
3311   * @test
3312   */
3313  /**
3314   * Press the specified key.
3315   *
3316   * @param { number } keyCode - the target keyCode.
3317   * @returns { Promise<void> }
3318   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3319   * @throws { BusinessError } 17000002 - The async function is not called with await.
3320   * @syscap SystemCapability.Test.UiTest
3321   * @crossplatform
3322   * @atomicservice
3323   * @since 11
3324   * @test
3325   */
3326  triggerKey(keyCode: number): Promise<void>;
3327
3328  /**
3329   * Press two or three key combinations
3330   *
3331   * @param { number } key0 the first keyCode.
3332   * @param { number } key1 the second keyCode.
3333   * @param { number } key2 the third keyCode.
3334   * @returns { Promise<void> }
3335   * @throws { BusinessError } 401 - if the input parameters are invalid.
3336   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3337   * @syscap SystemCapability.Test.UiTest
3338   * @since 9
3339   * @test
3340   */
3341  /**
3342   * Press two or three key combinations
3343   *
3344   * @param { number } key0 - the first keyCode.
3345   * @param { number } key1 - the second keyCode.
3346   * @param { number } [key2] - the third keyCode,set it default 0 if null or undefined.
3347   * @returns { Promise<void> }
3348   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3349   * @throws { BusinessError } 17000002 - The async function is not called with await.
3350   * @syscap SystemCapability.Test.UiTest
3351   * @crossplatform
3352   * @atomicservice
3353   * @since 11
3354   * @test
3355   */
3356  triggerCombineKeys(key0: number, key1: number, key2?: number): Promise<void>;
3357
3358  /**
3359   * Click on the specified location on the screen.
3360   *
3361   * @param { number } x The x-coordinate.
3362   * @param { number } y The y-coordinate.
3363   * @returns { Promise<void> }
3364   * @throws { BusinessError } 401 - if the input parameters are invalid.
3365   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3366   * @syscap SystemCapability.Test.UiTest
3367   * @since 9
3368   * @test
3369   */
3370  /**
3371   * Click on the specified location on the screen.
3372   *
3373   * @param { number } x The x-coordinate.
3374   * @param { number } y The y-coordinate.
3375   * @returns { Promise<void> }
3376   * @throws { BusinessError } 401 - if the input parameters are invalid.
3377   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3378   * @syscap SystemCapability.Test.UiTest
3379   * @crossplatform
3380   * @since 10
3381   * @test
3382   */
3383  /**
3384   * Click on the specified location on the screen.
3385   *
3386   * @param { number } x - the x-coordinate, not less than 0.
3387   * @param { number } y - the y-coordinate, not less than 0.
3388   * @returns { Promise<void> }
3389   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3390   * @throws { BusinessError } 17000002 - The async function is not called with await.
3391   * @syscap SystemCapability.Test.UiTest
3392   * @crossplatform
3393   * @atomicservice
3394   * @since 11
3395   * @test
3396   */
3397  click(x: number, y: number): Promise<void>;
3398
3399  /**
3400   * DoubleClick on the specified location on the screen.
3401   *
3402   * @param { number } x The x-coordinate.
3403   * @param { number } y The y-coordinate.
3404   * @returns { Promise<void> }
3405   * @throws { BusinessError } 401 - if the input parameters are invalid.
3406   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3407   * @syscap SystemCapability.Test.UiTest
3408   * @since 9
3409   * @test
3410   */
3411  /**
3412   * DoubleClick on the specified location on the screen.
3413   *
3414   * @param { number } x The x-coordinate.
3415   * @param { number } y The y-coordinate.
3416   * @returns { Promise<void> }
3417   * @throws { BusinessError } 401 - if the input parameters are invalid.
3418   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3419   * @syscap SystemCapability.Test.UiTest
3420   * @crossplatform
3421   * @since 10
3422   * @test
3423   */
3424  /**
3425   * DoubleClick on the specified location on the screen.
3426   *
3427   * @param { number } x - the x-coordinate, not less than 0.
3428   * @param { number } y - the y-coordinate, not less than 0.
3429   * @returns { Promise<void> }
3430   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3431   * @throws { BusinessError } 17000002 - The async function is not called with await.
3432   * @syscap SystemCapability.Test.UiTest
3433   * @crossplatform
3434   * @atomicservice
3435   * @since 11
3436   * @test
3437   */
3438  doubleClick(x: number, y: number): Promise<void>;
3439
3440  /**
3441   * LongClick on the specified location on the screen.
3442   *
3443   * @param { number } x The x-coordinate.
3444   * @param { number } y The y-coordinate.
3445   * @returns { Promise<void> }
3446   * @throws { BusinessError } 401 - if the input parameters are invalid.
3447   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3448   * @syscap SystemCapability.Test.UiTest
3449   * @since 9
3450   * @test
3451   */
3452  /**
3453   * LongClick on the specified location on the screen.
3454   *
3455   * @param { number } x The x-coordinate.
3456   * @param { number } y The y-coordinate.
3457   * @returns { Promise<void> }
3458   * @throws { BusinessError } 401 - if the input parameters are invalid.
3459   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3460   * @syscap SystemCapability.Test.UiTest
3461   * @crossplatform
3462   * @since 10
3463   * @test
3464   */
3465  /**
3466   * LongClick on the specified location on the screen.
3467   *
3468   * @param { number } x - the x-coordinate, not less than 0.
3469   * @param { number } y - the y-coordinate, not less than 0.
3470   * @returns { Promise<void> }
3471   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3472   * @throws { BusinessError } 17000002 - The async function is not called with await.
3473   * @syscap SystemCapability.Test.UiTest
3474   * @crossplatform
3475   * @atomicservice
3476   * @since 11
3477   * @test
3478   */
3479  longClick(x: number, y: number): Promise<void>;
3480
3481  /**
3482   * Swipe on the screen between the specified points.
3483   *
3484   * @param { number } startx The x-coordinate of the starting point.
3485   * @param { number } starty The y-coordinate of the starting point.
3486   * @param { number } endx The x-coordinate of the ending point.
3487   * @param { number } endy The y-coordinate of the ending point.
3488   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3489   * @returns { Promise<void> }
3490   * @throws { BusinessError } 401 - if the input parameters are invalid.
3491   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3492   * @syscap SystemCapability.Test.UiTest
3493   * @since 9
3494   * @test
3495   */
3496  /**
3497   * Swipe on the screen between the specified points.
3498   *
3499   * @param { number } startx The x-coordinate of the starting point.
3500   * @param { number } starty The y-coordinate of the starting point.
3501   * @param { number } endx The x-coordinate of the ending point.
3502   * @param { number } endy The y-coordinate of the ending point.
3503   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3504   * @returns { Promise<void> }
3505   * @throws { BusinessError } 401 - if the input parameters are invalid.
3506   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3507   * @syscap SystemCapability.Test.UiTest
3508   * @crossplatform
3509   * @since 10
3510   * @test
3511   */
3512  /**
3513   * Swipe on the screen between the specified points.
3514   *
3515   * @param { number } startx - the x-coordinate of the starting point, not less than 0.
3516   * @param { number } starty - the y-coordinate of the starting point, not less than 0.
3517   * @param { number } endx - the x-coordinate of the ending point, not less than 0.
3518   * @param { number } endy - the y-coordinate of the ending point, not less than 0.
3519   * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined.
3520   * @returns { Promise<void> }
3521   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3522   * @throws { BusinessError } 17000002 - The async function is not called with await.
3523   * @syscap SystemCapability.Test.UiTest
3524   * @crossplatform
3525   * @atomicservice
3526   * @since 11
3527   * @test
3528   */
3529  swipe(startx: number, starty: number, endx: number, endy: number, speed?: number): Promise<void>;
3530
3531  /**
3532   * Drag on the screen between the specified points.
3533   *
3534   * @param { number } startx The x-coordinate of the starting point.
3535   * @param { number } starty The y-coordinate of the starting point.
3536   * @param { number } endx The x-coordinate of the ending point.
3537   * @param { number } endy The y-coordinate of the ending point.
3538   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3539   * @returns { Promise<void> }
3540   * @throws { BusinessError } 401 - if the input parameters are invalid.
3541   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3542   * @syscap SystemCapability.Test.UiTest
3543   * @since 9
3544   * @test
3545   */
3546  /**
3547   * Drag on the screen between the specified points.
3548   *
3549   * @param { number } startx - the x-coordinate of the starting point, not less than 0.
3550   * @param { number } starty - the y-coordinate of the starting point, not less than 0.
3551   * @param { number } endx - the x-coordinate of the ending point, not less than 0.
3552   * @param { number } endy - the y-coordinate of the ending point, not less than 0.
3553   * @param { number } [speed] the speed of drag(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined.
3554   * @returns { Promise<void> }
3555   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3556   * @throws { BusinessError } 17000002 - The async function is not called with await.
3557   * @syscap SystemCapability.Test.UiTest
3558   * @atomicservice
3559   * @since 11
3560   * @test
3561   */
3562  drag(startx: number, starty: number, endx: number, endy: number, speed?: number): Promise<void>;
3563
3564  /**
3565   * Capture current screen and save as picture which PNG format.
3566   *
3567   * @param { string } savePath the path where to store the picture.
3568   * @returns { Promise<boolean> } true if screen-capturing and file-storing are completed successfully,false otherwise.
3569   * @throws { BusinessError } 401 - if the input parameters are invalid.
3570   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3571   * @syscap SystemCapability.Test.UiTest
3572   * @since 9
3573   * @test
3574   */
3575  /**
3576   * Capture current screen and save as picture which PNG format.
3577   *
3578   * @param { string } savePath - the path where to store the picture, must be in the application sandbox directory.
3579   * @returns { Promise<boolean> } true if screen-capturing and file-storing are completed successfully,false otherwise.
3580   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3581   * @throws { BusinessError } 17000002 - The async function is not called with await.
3582   * @syscap SystemCapability.Test.UiTest
3583   * @atomicservice
3584   * @since 11
3585   * @test
3586   */
3587  screenCap(savePath: string): Promise<boolean>;
3588
3589  /**
3590   * Set the rotation of the device display.
3591   *
3592   * @param { DisplayRotation } rotation The target rotation to set.
3593   * @returns { Promise<void> }
3594   * @throws { BusinessError } 401 - if the input parameters are invalid.
3595   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3596   * @syscap SystemCapability.Test.UiTest
3597   * @since 9
3598   * @test
3599   */
3600  /**
3601   * Set the rotation of the device display.
3602   *
3603   * @param { DisplayRotation } rotation - the target rotation to set.
3604   * @returns { Promise<void> }
3605   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3606   * @throws { BusinessError } 17000002 - The async function is not called with await.
3607   * @syscap SystemCapability.Test.UiTest
3608   * @atomicservice
3609   * @since 11
3610   * @test
3611   */
3612  setDisplayRotation(rotation: DisplayRotation): Promise<void>;
3613
3614  /**
3615   * Get the rotation of the device display.
3616   *
3617   * @returns { Promise<DisplayRotation> } the current display rotation.
3618   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3619   * @syscap SystemCapability.Test.UiTest
3620   * @since 9
3621   * @test
3622   */
3623  /**
3624   * Get the rotation of the device display.
3625   *
3626   * @returns { Promise<DisplayRotation> } the current display rotation.
3627   * @throws { BusinessError } 17000002 - The async function is not called with await.
3628   * @syscap SystemCapability.Test.UiTest
3629   * @atomicservice
3630   * @since 11
3631   * @test
3632   */
3633  getDisplayRotation(): Promise<DisplayRotation>;
3634
3635  /**
3636   * Enable/disable the rotation of device display.
3637   *
3638   * @param { boolean } enabled Enable the rotation or not.
3639   * @returns { Promise<void> }
3640   * @throws { BusinessError } 401 - if the input parameters are invalid.
3641   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3642   * @syscap SystemCapability.Test.UiTest
3643   * @since 9
3644   * @test
3645   */
3646  /**
3647   * Enable/disable the rotation of device display.
3648   *
3649   * @param { boolean } enabled - enable the rotation or not.
3650   * @returns { Promise<void> }
3651   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3652   * @throws { BusinessError } 17000002 - The async function is not called with await.
3653   * @syscap SystemCapability.Test.UiTest
3654   * @atomicservice
3655   * @since 11
3656   * @test
3657   */
3658  setDisplayRotationEnabled(enabled: boolean): Promise<void>;
3659
3660  /**
3661   * Get the size of the device display.
3662   *
3663   * @returns { Promise<Point> } the size of the device display.
3664   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3665   * @syscap SystemCapability.Test.UiTest
3666   * @since 9
3667   * @test
3668   */
3669  /**
3670   * Get the size of the device display.
3671   *
3672   * @returns { Promise<Point> } the size of the device display.
3673   * @throws { BusinessError } 17000002 - The async function is not called with await.
3674   * @syscap SystemCapability.Test.UiTest
3675   * @atomicservice
3676   * @since 11
3677   * @test
3678   */
3679  getDisplaySize(): Promise<Point>;
3680
3681  /**
3682   * Get the density of the device display.
3683   *
3684   * @returns { Promise<Point> } the density of the device display.
3685   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3686   * @syscap SystemCapability.Test.UiTest
3687   * @since 9
3688   * @test
3689   */
3690  /**
3691   * Get the density of the device display.
3692   *
3693   * @returns { Promise<Point> } the density of the device display.
3694   * @throws { BusinessError } 17000002 - The async function is not called with await.
3695   * @syscap SystemCapability.Test.UiTest
3696   * @atomicservice
3697   * @since 11
3698   * @test
3699   */
3700  getDisplayDensity(): Promise<Point>;
3701
3702  /**
3703   * Wake up the device display.
3704   *
3705   * @returns { Promise<void> }
3706   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3707   * @syscap SystemCapability.Test.UiTest
3708   * @since 9
3709   * @test
3710   */
3711  /**
3712   * Wake up the device display.
3713   *
3714   * @returns { Promise<void> }
3715   * @throws { BusinessError } 17000002 - The async function is not called with await.
3716   * @syscap SystemCapability.Test.UiTest
3717   * @atomicservice
3718   * @since 11
3719   * @test
3720   */
3721  wakeUpDisplay(): Promise<void>;
3722
3723  /**
3724   * Press the home key.
3725   *
3726   * @returns { Promise<void> }
3727   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3728   * @syscap SystemCapability.Test.UiTest
3729   * @since 9
3730   * @test
3731   */
3732  /**
3733   * Press the home key.
3734   *
3735   * @returns { Promise<void> }
3736   * @throws { BusinessError } 17000002 - The async function is not called with await.
3737   * @syscap SystemCapability.Test.UiTest
3738   * @atomicservice
3739   * @since 11
3740   * @test
3741   */
3742  pressHome(): Promise<void>;
3743
3744  /**
3745   * Wait for the UI become idle.
3746   *
3747   * @param { number } idleTime the threshold of UI idle time, in millisecond.
3748   * @param { number } timeout The maximum time to wait for idle, in millisecond.
3749   * @returns { Promise<boolean> } true if wait for idle succeed in the timeout, false otherwise.
3750   * @throws { BusinessError } 401 - if the input parameters are invalid.
3751   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3752   * @syscap SystemCapability.Test.UiTest
3753   * @since 9
3754   * @test
3755   */
3756  /**
3757   * Wait for the UI become idle.
3758   *
3759   * @param { number } idleTime - the threshold of UI idle time, in millisecond, not less than 0.
3760   * @param { number } timeout - the maximum time to wait for idle, in millisecond, not less than 0.
3761   * @returns { Promise<boolean> } true if wait for idle succeed in the timeout, false otherwise.
3762   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3763   * @throws { BusinessError } 17000002 - The async function is not called with await.
3764   * @syscap SystemCapability.Test.UiTest
3765   * @atomicservice
3766   * @since 11
3767   * @test
3768   */
3769  waitForIdle(idleTime: number, timeout: number): Promise<boolean>;
3770
3771  /**
3772   * Inject fling on the device display.
3773   *
3774   * @param { Point } from The coordinate point where the finger touches the screen.
3775   * @param { Point } to The coordinate point where the finger leaves the screen.
3776   * @param { number } stepLen the length of each step, in pixels.
3777   * @param { number } speed The speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3778   * @returns { Promise<void> }
3779   * @throws { BusinessError } 401 - if the input parameters are invalid.
3780   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3781   * @syscap SystemCapability.Test.UiTest
3782   * @since 9
3783   * @test
3784   */
3785  /**
3786   * Inject fling on the device display.
3787   *
3788   * @param { Point } from The coordinate point where the finger touches the screen.
3789   * @param { Point } to The coordinate point where the finger leaves the screen.
3790   * @param { number } stepLen the length of each step, in pixels.
3791   * @param { number } speed The speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3792   * @returns { Promise<void> }
3793   * @throws { BusinessError } 401 - if the input parameters are invalid.
3794   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3795   * @syscap SystemCapability.Test.UiTest
3796   * @crossplatform
3797   * @since 10
3798   * @test
3799   */
3800  /**
3801   * Inject fling on the device display.
3802   *
3803   * @param { Point } from - the coordinate point where the finger touches the screen.
3804   * @param { Point } to - the coordinate point where the finger leaves the screen.
3805   * @param { number } stepLen - the length of each step, in pixels.
3806   * @param { number } [speed] - the speed of fling(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined.
3807   * @returns { Promise<void> }
3808   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3809   * @throws { BusinessError } 17000002 - The async function is not called with await.
3810   * @syscap SystemCapability.Test.UiTest
3811   * @crossplatform
3812   * @atomicservice
3813   * @since 11
3814   * @test
3815   */
3816  fling(from: Point, to: Point, stepLen: number, speed: number): Promise<void>;
3817
3818  /**
3819   * Inject multi-pointer action on the device display.
3820   *
3821   * @param { PointerMatrix } pointers The two-dimensional array of pointers to inject.
3822   * @param { number } speed The speed of swipe (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3823   * @returns { Promise<boolean> } true if the operation finished, false
3824   * @throws { BusinessError } 401 - if the input parameters are invalid.
3825   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3826   * @syscap SystemCapability.Test.UiTest
3827   * @since 9
3828   * @test
3829   */
3830  /**
3831   * Inject multi-pointer action on the device display.
3832   *
3833   * @param { PointerMatrix } pointers - the two-dimensional array of pointers to inject.
3834   * @param { number } [speed] - the speed of swipe(pixels per second),ranges from 200 to 40000. Set it default 600 if out of range or null or undefined.
3835   * @returns { Promise<boolean> } true if the operation finished, false
3836   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3837   * @throws { BusinessError } 17000002 - The async function is not called with await.
3838   * @syscap SystemCapability.Test.UiTest
3839   * @crossplatform
3840   * @atomicservice
3841   * @since 11
3842   * @test
3843   */
3844  injectMultiPointerAction(pointers: PointerMatrix, speed?: number): Promise<boolean>;
3845
3846  /**
3847   * Inject fling on the device display.
3848   *
3849   * @param { UiDirection } direction The direction of this action.
3850   * @param { number } speed The speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3851   * @returns { Promise<void> }
3852   * @throws { BusinessError } 401 - if the input parameters are invalid.
3853   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3854   * @syscap SystemCapability.Test.UiTest
3855   * @since 10
3856   * @test
3857   */
3858  /**
3859   * Inject fling on the device display.
3860   *
3861   * @param { UiDirection } direction - the direction of this action.
3862   * @param { number } speed - the speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3863   * @returns { Promise<void> }
3864   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3865   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3866   * @syscap SystemCapability.Test.UiTest
3867   * @atomicservice
3868   * @since 11
3869   * @test
3870   */
3871  /**
3872   * Inject fling on the device display.
3873   *
3874   * @param { UiDirection } direction - the direction of this action.
3875   * @param { number } speed - the speed of fling (pixels per second),default is 600,the value ranges from 200 to 40000,set it 600 if out of range.
3876   * @returns { Promise<void> }
3877   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3878   * @throws { BusinessError } 17000002 - The async function is not called with await.
3879   * @syscap SystemCapability.Test.UiTest
3880   * @crossplatform
3881   * @atomicservice
3882   * @since 12
3883   * @test
3884   */
3885  fling(direction: UiDirection, speed: number): Promise<void>;
3886
3887  /**
3888   * Click on the specified location on the screen with the specified mouse button, and press the specified key simultaneously if necessary.
3889   *
3890   * @param { Point } p The coordinate of the specified location.
3891   * @param { MouseButton } btnId The button of Mouse.
3892   * @param { number } key1 the first keyCode.
3893   * @param { number } key2 the second keyCode.
3894   * @returns { Promise<void> }
3895   * @throws { BusinessError } 401 - if the input parameters are invalid.
3896   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3897   * @syscap SystemCapability.Test.UiTest
3898   * @since 10
3899   * @test
3900   */
3901  /**
3902   * Click on the specified location on the screen with the specified mouse button, and press the specified key simultaneously if necessary.
3903   *
3904   * @param { Point } p - the coordinate of the specified location.
3905   * @param { MouseButton } btnId - the button of Mouse.
3906   * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined.
3907   * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined.
3908   * @returns { Promise<void> }
3909   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3910   * @throws { BusinessError } 17000002 - The async function is not called with await.
3911   * @syscap SystemCapability.Test.UiTest
3912   * @atomicservice
3913   * @since 11
3914   * @test
3915   */
3916  mouseClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise<void>;
3917
3918  /**
3919   * Move the mouse cursor to the specified location.
3920   *
3921   * @param { Point } p The coordinate of the specified location.
3922   * @returns { Promise<void> }
3923   * @throws { BusinessError } 401 - if the input parameters are invalid.
3924   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3925   * @syscap SystemCapability.Test.UiTest
3926   * @since 10
3927   * @test
3928   */
3929  /**
3930   * Move the mouse cursor to the specified location.
3931   *
3932   * @param { Point } p - the coordinate of the specified location.
3933   * @returns { Promise<void> }
3934   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3935   * @throws { BusinessError } 17000002 - The async function is not called with await.
3936   * @syscap SystemCapability.Test.UiTest
3937   * @atomicservice
3938   * @since 11
3939   * @test
3940   */
3941  mouseMoveTo(p: Point): Promise<void>;
3942
3943  /**
3944   * The mouse wheel scrolls the specified cell at the specified position, and press the specified key simultaneously if necessary.
3945   *
3946   * @param { Point } p The coordinate of the specified location.
3947   * @param { boolean } down Whether the mouse wheel rolls down.
3948   * @param { number } d The number of cells that the mouse wheel scrolls, each cell will make the target point shift 120 pixels.
3949   * @param { number } key1 the first keyCode.
3950   * @param { number } key2 the second keyCode.
3951   * @returns { Promise<void> }
3952   * @throws { BusinessError } 401 - if the input parameters are invalid.
3953   * @throws { BusinessError } 17000002 - if the async function was not called with await.
3954   * @syscap SystemCapability.Test.UiTest
3955   * @since 10
3956   * @test
3957   */
3958  /**
3959   * The mouse wheel scrolls the specified cell at the specified position, and press the specified key simultaneously if necessary.
3960   *
3961   * @param { Point } p - the coordinate of the specified location.
3962   * @param { boolean } down - whether the mouse wheel rolls down.
3963   * @param { number } d - the number of cells that the mouse wheel scrolls, each cell will make the target point shift 120 pixels.
3964   * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined.
3965   * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined.
3966   * @returns { Promise<void> }
3967   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3968   * @throws { BusinessError } 17000002 - The async function is not called with await.
3969   * @syscap SystemCapability.Test.UiTest
3970   * @atomicservice
3971   * @since 11
3972   * @test
3973   */
3974  mouseScroll(p: Point, down: boolean, d: number, key1?: number, key2?: number): Promise<void>;
3975  /**
3976   * The mouse wheel scrolls the specified cell at the specified position, and press the specified key simultaneously if necessary.
3977   *
3978   * @param { Point } p - the coordinate of the specified location.
3979   * @param { boolean } down - whether the mouse wheel rolls down.
3980   * @param { number } d - the number of cells that the mouse wheel scrolls, each cell will make the target point shift 120 pixels.
3981   * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined.
3982   * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined.
3983   * @param { number } [speed] - The Speed of mouse wheel rolls(cells per second),ranges from 1 to 500.Set it default 20 if out of range or null or undefined.
3984   * @returns { Promise<void> }
3985   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
3986   * @throws { BusinessError } 17000002 - The async function is not called with await.
3987   * @syscap SystemCapability.Test.UiTest
3988   * @atomicservice
3989   * @since 11
3990   * @test
3991   */
3992  mouseScroll(p: Point, down: boolean, d: number, key1?: number, key2?: number, speed?: number): Promise<void>;
3993
3994  /**
3995   * Capture the specified area of current screen and save as picture which PNG format.
3996   *
3997   * @param { string } savePath the path where to store the picture.
3998   * @param { Rect } rect The specified area of current screen, default to full screen.
3999   * @returns { Promise<boolean> } true if screen-capturing and file-storing are completed successfully,false otherwise.
4000   * @throws { BusinessError } 401 - if the input parameters are invalid.
4001   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4002   * @syscap SystemCapability.Test.UiTest
4003   * @since 10
4004   * @test
4005   */
4006  /**
4007   * Capture the specified area of current screen and save as picture which PNG format.
4008   *
4009   * @param { string } savePath - the path where to store the picture, must be in the application sandbox directory.
4010   * @param { Rect } [rect] - the specified area of current screen, default to full screen.Set it default if null or undefined.
4011   * @returns { Promise<boolean> } true if screen-capturing and file-storing are completed successfully,false otherwise.
4012   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4013   * @throws { BusinessError } 17000002 - The async function is not called with await.
4014   * @syscap SystemCapability.Test.UiTest
4015   * @atomicservice
4016   * @since 11
4017   * @test
4018   */
4019  screenCapture(savePath: string, rect?: Rect): Promise<boolean>;
4020
4021  /**
4022   * Create an {@link UIEventObserver} object.
4023   *
4024   * @returns { UIEventObserver } the {@link UIEventObserver} object.
4025   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4026   * @syscap SystemCapability.Test.UiTest
4027   * @since 10
4028   * @test
4029   */
4030  /**
4031   * Create an {@link UIEventObserver} object.
4032   *
4033   * @returns { UIEventObserver } the {@link UIEventObserver} object.
4034   * @throws { BusinessError } 17000002 - The async function is not called with await.
4035   * @syscap SystemCapability.Test.UiTest
4036   * @atomicservice
4037   * @since 11
4038   * @test
4039   */
4040  createUIEventObserver(): UIEventObserver;
4041
4042  /**
4043   * Double click on the specified location on the screen with the specified mouse button, and press the specified key simultaneously if necessary.
4044   *
4045   * @param { Point } p - the coordinate of the specified location.
4046   * @param { MouseButton } btnId - the button of Mouse.
4047   * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined.
4048   * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined.
4049   * @returns { Promise<void> }
4050   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4051   * @throws { BusinessError } 17000002 - The async function is not called with await.
4052   * @syscap SystemCapability.Test.UiTest
4053   * @atomicservice
4054   * @since 11
4055   * @test
4056   */
4057  mouseDoubleClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise<void>;
4058
4059  /**
4060   * Long click on the specified location on the screen with the specified mouse button, and press the specified key simultaneously if necessary.
4061   *
4062   * @param { Point } p - the coordinate of the specified location.
4063   * @param { MouseButton } btnId - the button of Mouse.
4064   * @param { number } [key1] - the first keyCode,set it default 0 if null or undefined.
4065   * @param { number } [key2] - the second keyCode,set it default 0 if null or undefined.
4066   * @returns { Promise<void> }
4067   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4068   * @throws { BusinessError } 17000002 - The async function is not called with await.
4069   * @syscap SystemCapability.Test.UiTest
4070   * @atomicservice
4071   * @since 11
4072   * @test
4073   */
4074  mouseLongClick(p: Point, btnId: MouseButton, key1?: number, key2?: number): Promise<void>;
4075
4076  /**
4077   * Swipe on the screen between the specified points with mouse.
4078   *
4079   * @param { Point } from - the starting point.
4080   * @param { Point } to - the ending point.
4081   * @param { number } [speed] - speed of swipe (pixels per second),the value ranges from 200 to 40000.Set it default 600 if out of range or null or undefined.
4082   * @returns { Promise<void> }
4083   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4084   * @throws { BusinessError } 17000002 - The async function is not called with await.
4085   * @syscap SystemCapability.Test.UiTest
4086   * @atomicservice
4087   * @since 11
4088   * @test
4089   */
4090  mouseMoveWithTrack(from: Point, to: Point, speed?: number): Promise<void>;
4091
4092  /**
4093   * Hold down the left mouse button and drag on the screen between the specified points.
4094   *
4095   * @param { Point } from - the starting point.
4096   * @param { Point } to - the ending point.
4097   * @param { number } [speed] - speed of drag (pixels per second),the value ranges from 200 to 40000,Set it default 600 if out of range or null or undefined.
4098   * @returns { Promise<void> }
4099   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4100   * @throws { BusinessError } 17000002 - The async function is not called with await.
4101   * @syscap SystemCapability.Test.UiTest
4102   * @atomicservice
4103   * @since 11
4104   * @test
4105   */
4106  mouseDrag(from: Point, to: Point, speed?: number): Promise<void>;
4107
4108  /**
4109   * Inject text on the specified location.
4110   *
4111   * @param { Point } p - the coordinate of the specified location.
4112   * @param { string } text - the text to inject.
4113   * @returns { Promise<void> }
4114   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4115   * @throws { BusinessError } 17000002 - The async function is not called with await.
4116   * @syscap SystemCapability.Test.UiTest
4117   * @atomicservice
4118   * @since 11
4119   * @test
4120   */
4121  inputText(p: Point, text: string): Promise<void>;
4122}
4123
4124/**
4125 * @syscap SystemCapability.Test.UiTest
4126 * @since 9
4127 * @test
4128 */
4129/**
4130 * Represents a window of the ohos application,user can perform operations or query attributes on it.
4131 *
4132 * @syscap SystemCapability.Test.UiTest
4133 * @atomicservice
4134 * @since 11
4135 * @test
4136 */
4137declare class UiWindow {
4138  /**
4139   * Get the bundle name of this {@link UiWindow}.
4140   *
4141   * @returns { Promise<string> } the bundle name.
4142   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4143   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4144   * @syscap SystemCapability.Test.UiTest
4145   * @since 9
4146   * @test
4147   */
4148  /**
4149   * Get the bundle name of this {@link UiWindow}.
4150   *
4151   * @returns { Promise<string> } the bundle name.
4152   * @throws { BusinessError } 17000002 - The async function is not called with await.
4153   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4154   * @syscap SystemCapability.Test.UiTest
4155   * @atomicservice
4156   * @since 11
4157   * @test
4158   */
4159  getBundleName(): Promise<string>;
4160
4161  /**
4162   * Get the bounds rect of this {@link UiWindow}.
4163   *
4164   * @returns { Promise<Rect> } the bounds rect object.
4165   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4166   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4167   * @syscap SystemCapability.Test.UiTest
4168   * @since 9
4169   * @test
4170   */
4171  /**
4172   * Get the bounds rect of this {@link UiWindow}.
4173   *
4174   * @returns { Promise<Rect> } the bounds rect object.
4175   * @throws { BusinessError } 17000002 - The async function is not called with await.
4176   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4177   * @syscap SystemCapability.Test.UiTest
4178   * @crossplatform
4179   * @atomicservice
4180   * @since 11
4181   * @test
4182   */
4183  getBounds(): Promise<Rect>;
4184
4185  /**
4186   * Get the title of this {@link UiWindow}.
4187   *
4188   * @returns { Promise<string> } the title value.
4189   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4190   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4191   * @syscap SystemCapability.Test.UiTest
4192   * @since 9
4193   * @test
4194   */
4195  /**
4196   * Get the title of this {@link UiWindow}.
4197   *
4198   * @returns { Promise<string> } the title value.
4199   * @throws { BusinessError } 17000002 - The async function is not called with await.
4200   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4201   * @syscap SystemCapability.Test.UiTest
4202   * @atomicservice
4203   * @since 11
4204   * @test
4205   */
4206  getTitle(): Promise<string>;
4207
4208  /**
4209   * Get the window mode of this {@link UiWindow}.
4210   *
4211   * @returns { Promise<WindowMode> } the {@link WindowMode} object
4212   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4213   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4214   * @syscap SystemCapability.Test.UiTest
4215   * @since 9
4216   * @test
4217   */
4218  /**
4219   * Get the window mode of this {@link UiWindow}.
4220   *
4221   * @returns { Promise<WindowMode> } the {@link WindowMode} object
4222   * @throws { BusinessError } 17000002 - The async function is not called with await.
4223   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4224   * @syscap SystemCapability.Test.UiTest
4225   * @atomicservice
4226   * @since 11
4227   * @test
4228   */
4229  getWindowMode(): Promise<WindowMode>;
4230
4231  /**
4232   * Get the focused status of this {@link UiWindow}.
4233   *
4234   * @returns { Promise<boolean> } the focused status
4235   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4236   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4237   * @syscap SystemCapability.Test.UiTest
4238   * @since 9
4239   * @test
4240   */
4241  /**
4242   * Get the focused status of this {@link UiWindow}.
4243   *
4244   * @returns { Promise<boolean> } the focused status
4245   * @throws { BusinessError } 17000002 - The async function is not called with await.
4246   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4247   * @syscap SystemCapability.Test.UiTest
4248   * @atomicservice
4249   * @since 11
4250   * @test
4251   */
4252  isFocused(): Promise<boolean>;
4253
4254  /**
4255   * Get the active status of this {@link UiWindow}.
4256   *
4257   * @returns { Promise<boolean> } the actived status
4258   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4259   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4260   * @syscap SystemCapability.Test.UiTest
4261   * @since 9
4262   * @test
4263   */
4264  /**
4265   * Get the active status of this {@link UiWindow}.
4266   *
4267   * @returns { Promise<boolean> } the actived status
4268   * @throws { BusinessError } 17000002 - The async function is not called with await.
4269   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4270   * @syscap SystemCapability.Test.UiTest
4271   * @since 11
4272   * @deprecated since 11
4273   * @useinstead ohos.UiTest.UiWindow#isActive
4274   * @test
4275   */
4276  isActived(): Promise<boolean>;
4277
4278  /**
4279   * Set the focused status of this {@link UiWindow}.
4280   *
4281   * @returns { Promise<void> }
4282   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4283   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4284   * @syscap SystemCapability.Test.UiTest
4285   * @since 9
4286   * @test
4287   */
4288  /**
4289   * Set the focused status of this {@link UiWindow}.
4290   *
4291   * @returns { Promise<void> }
4292   * @throws { BusinessError } 17000002 - The async function is not called with await.
4293   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4294   * @syscap SystemCapability.Test.UiTest
4295   * @atomicservice
4296   * @since 11
4297   * @test
4298   */
4299  focus(): Promise<void>;
4300
4301  /**
4302   * Move this {@link UiWindow} to the specified points.
4303   *
4304   * @param { number } x The x coordinate of destination.
4305   * @param { number } y The y coordinate of destination.
4306   * @returns { Promise<void> }
4307   * @throws { BusinessError } 401 - if the input parameters are invalid.
4308   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4309   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4310   * @throws { BusinessError } 17000005 - if the action is not supported on this window.
4311   * @syscap SystemCapability.Test.UiTest
4312   * @since 9
4313   * @test
4314   */
4315  /**
4316   * Move this {@link UiWindow} to the specified points.
4317   *
4318   * @param { number } x - the x coordinate of destination, not less than 0.
4319   * @param { number } y - the y coordinate of destination, not less than 0.
4320   * @returns { Promise<void> }
4321   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4322   * @throws { BusinessError } 17000002 - The async function is not called with await.
4323   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4324   * @throws { BusinessError } 17000005 - This operation is not supported.
4325   * @syscap SystemCapability.Test.UiTest
4326   * @atomicservice
4327   * @since 11
4328   * @test
4329   */
4330  moveTo(x: number, y: number): Promise<void>;
4331
4332  /**
4333   * Resize this {@link UiWindow} to the specified size for the specified direction.
4334   *
4335   * @param { number } wide The expected wide of the window after resizing.
4336   * @param { number } height The expected height of the window after resizing.
4337   * @param { ResizeDirection } direction The expected direction of the window after resizing.
4338   * @returns { Promise<void> }
4339   * @throws { BusinessError } 401 - if the input parameters are invalid.
4340   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4341   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4342   * @throws { BusinessError } 17000005 - if the action is not supported on this window.
4343   * @syscap SystemCapability.Test.UiTest
4344   * @since 9
4345   * @test
4346   */
4347  /**
4348   * Resize this {@link UiWindow} to the specified size for the specified direction.
4349   *
4350   * @param { number } wide - the expected wide of the window after resizing.
4351   * @param { number } height - the expected height of the window after resizing.
4352   * @param { ResizeDirection } direction - the expected direction of the window after resizing.
4353   * @returns { Promise<void> }
4354   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4355   * @throws { BusinessError } 17000002 - The async function is not called with await.
4356   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4357   * @throws { BusinessError } 17000005 - This operation is not supported.
4358   * @syscap SystemCapability.Test.UiTest
4359   * @atomicservice
4360   * @since 11
4361   * @test
4362   */
4363  resize(wide: number, height: number, direction: ResizeDirection): Promise<void>;
4364
4365  /**
4366   * Change this {@link UiWindow} into split screen mode.
4367   *
4368   * @returns { Promise<void> }
4369   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4370   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4371   * @throws { BusinessError } 17000005 - if the action is not supported on this window.
4372   * @syscap SystemCapability.Test.UiTest
4373   * @since 9
4374   * @test
4375   */
4376  /**
4377   * Change this {@link UiWindow} into split screen mode.
4378   *
4379   * @returns { Promise<void> }
4380   * @throws { BusinessError } 17000002 - The async function is not called with await.
4381   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4382   * @throws { BusinessError } 17000005 - This operation is not supported.
4383   * @syscap SystemCapability.Test.UiTest
4384   * @atomicservice
4385   * @since 11
4386   * @test
4387   */
4388  split(): Promise<void>;
4389
4390  /**
4391   * Maximize this {@link UiWindow}.
4392   *
4393   * @returns { Promise<void> }
4394   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4395   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4396   * @throws { BusinessError } 17000005 - if the action is not supported on this window.
4397   * @syscap SystemCapability.Test.UiTest
4398   * @since 9
4399   * @test
4400   */
4401  /**
4402   * Maximize this {@link UiWindow}.
4403   *
4404   * @returns { Promise<void> }
4405   * @throws { BusinessError } 17000002 - The async function is not called with await.
4406   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4407   * @throws { BusinessError } 17000005 - This operation is not supported.
4408   * @syscap SystemCapability.Test.UiTest
4409   * @atomicservice
4410   * @since 11
4411   * @test
4412   */
4413  maximize(): Promise<void>;
4414
4415  /**
4416   * Minimize this {@link UiWindow}.
4417   *
4418   * @returns { Promise<void> }
4419   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4420   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4421   * @throws { BusinessError } 17000005 - if the action is not supported on this window.
4422   * @syscap SystemCapability.Test.UiTest
4423   * @since 9
4424   * @test
4425   */
4426  /**
4427   * Minimize this {@link UiWindow}.
4428   *
4429   * @returns { Promise<void> }
4430   * @throws { BusinessError } 17000002 - The async function is not called with await.
4431   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4432   * @throws { BusinessError } 17000005 - This operation is not supported.
4433   * @syscap SystemCapability.Test.UiTest
4434   * @atomicservice
4435   * @since 11
4436   * @test
4437   */
4438  minimize(): Promise<void>;
4439
4440  /**
4441   * Resume this {@link UiWindow}.
4442   *
4443   * @returns { Promise<void> }
4444   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4445   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4446   * @throws { BusinessError } 17000005 - if the action is not supported on this window.
4447   * @syscap SystemCapability.Test.UiTest
4448   * @since 9
4449   * @test
4450   */
4451  /**
4452   * Resume this {@link UiWindow}.
4453   *
4454   * @returns { Promise<void> }
4455   * @throws { BusinessError } 17000002 - The async function is not called with await.
4456   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4457   * @throws { BusinessError } 17000005 - This operation is not supported.
4458   * @syscap SystemCapability.Test.UiTest
4459   * @atomicservice
4460   * @since 11
4461   * @test
4462   */
4463  resume(): Promise<void>;
4464
4465  /**
4466   * Close this {@link UiWindow}.
4467   *
4468   * @returns { Promise<void> }
4469   * @throws { BusinessError } 17000002 - if the async function was not called with await.
4470   * @throws { BusinessError } 17000004 - if the window is invisible or destroyed.
4471   * @throws { BusinessError } 17000005 - if the action is not supported on this window.
4472   * @syscap SystemCapability.Test.UiTest
4473   * @since 9
4474   * @test
4475   */
4476  /**
4477   * Close this {@link UiWindow}.
4478   *
4479   * @returns { Promise<void> }
4480   * @throws { BusinessError } 17000002 - The async function is not called with await.
4481   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4482   * @throws { BusinessError } 17000005 - This operation is not supported.
4483   * @syscap SystemCapability.Test.UiTest
4484   * @atomicservice
4485   * @since 11
4486   * @test
4487   */
4488  close(): Promise<void>;
4489
4490  /**
4491   * Get the active status of this {@link UiWindow}.
4492   *
4493   * @returns { Promise<boolean> } the active status.
4494   * @throws { BusinessError } 17000002 - The async function is not called with await.
4495   * @throws { BusinessError } 17000004 - The window or component is invisible or destroyed.
4496   * @syscap SystemCapability.Test.UiTest
4497   * @atomicservice
4498   * @since 11
4499   * @test
4500   */
4501  isActive(): Promise<boolean>;
4502}
4503
4504/**
4505 * Represents a two-dimensional array of pointers on the device display, it's used to build a
4506 * multi-finger trace which can be injected with UiDriver.
4507 *
4508 * @syscap SystemCapability.Test.UiTest
4509 * @since 9
4510 * @test
4511 */
4512/**
4513 * Represents a two-dimensional array of pointers on the device display, it's used to build a
4514 * multi-finger trace which can be injected with UiDriver.
4515 *
4516 * @syscap SystemCapability.Test.UiTest
4517 * @crossplatform
4518 * @atomicservice
4519 * @since 11
4520 * @test
4521 */
4522declare class PointerMatrix {
4523  /**
4524   * Create an {@link PointerMatrix} object.
4525   *
4526   * @param { number } fingers The number of fingers.
4527   * @param { number } steps The number of steps of each finger trace.
4528   * @returns { PointerMatrix } the {@link PointerMatrix} object.
4529   * @throws { BusinessError } 401 - if the input parameters are invalid.
4530   * @syscap SystemCapability.Test.UiTest
4531   * @since 9
4532   * @test
4533   */
4534  /**
4535   * Create an {@link PointerMatrix} object.
4536   *
4537   * @param { number } fingers - The number of fingers, ranges from 1 to 10.
4538   * @param { number } steps - The number of steps of each finger trace, ranges from 1 to 1000.
4539   * @returns { PointerMatrix } the {@link PointerMatrix} object.
4540   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4541   * @syscap SystemCapability.Test.UiTest
4542   * @crossplatform
4543   * @atomicservice
4544   * @since 11
4545   * @test
4546   */
4547  static create(fingers: number, steps: number): PointerMatrix;
4548
4549  /**
4550   * Set the point value of an element in the PointerMatrix.
4551   *
4552   * @param { number } finger The index of target finger to set.
4553   * @param { number } step The index of target step to set.
4554   * @param { Point } point The coordinate of target step to set.
4555   * @throws { BusinessError } 401 - if the input parameters are invalid.
4556   * @syscap SystemCapability.Test.UiTest
4557   * @since 9
4558   * @test
4559   */
4560  /**
4561   * Set the point value of an element in the PointerMatrix.
4562   *
4563   * @param { number } finger - the index of target finger to set.
4564   * @param { number } step - the index of target step to set.
4565   * @param { Point } point - the coordinate of target step to set.
4566   * @throws { BusinessError } 401 - Parameter error. Possible causes: 1.Mandatory parameters are left unspecified; 2. Incorrect parameter types; 3. Parameter verification failed.
4567   * @syscap SystemCapability.Test.UiTest
4568   * @crossplatform
4569   * @atomicservice
4570   * @since 11
4571   * @test
4572   */
4573  setPoint(finger: number, step: number, point: Point): void;
4574}
4575
4576/**
4577 * The static builder for building {@link By}object conveniently,usage example:BY.text('txt').enabled(true).
4578 *
4579 * @syscap SystemCapability.Test.UiTest
4580 * @since 8
4581 * @deprecated since 9
4582 * @useinstead ohos.uitest.ON
4583 * @test
4584 */
4585declare const BY: By;
4586
4587/**
4588 * The static builder for building {@link On}object conveniently,usage example:ON.text('txt').enabled(true).
4589 *
4590 * @syscap SystemCapability.Test.UiTest
4591 * @since 9
4592 * @test
4593 */
4594/**
4595 * The static builder for building {@link On}object conveniently,usage example:ON.text('txt').enabled(true).
4596 *
4597 * @syscap SystemCapability.Test.UiTest
4598 * @crossplatform
4599 * @atomicservice
4600 * @since 11
4601 * @test
4602 */
4603declare const ON: On;
4604
4605export {
4606  UiComponent,
4607  UiDriver,
4608  Component,
4609  Driver,
4610  UiWindow,
4611  ON,
4612  On,
4613  BY,
4614  By,
4615  MatchPattern,
4616  DisplayRotation,
4617  ResizeDirection,
4618  WindowMode,
4619  Point,
4620  WindowFilter,
4621  Rect,
4622  PointerMatrix,
4623  UiDirection,
4624  MouseButton,
4625  UIElementInfo,
4626  UIEventObserver
4627};
4628