1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119<!DOCTYPE html>
120<html devsite>
121<head>
122
123
124    <meta name="top_category" value="develop" />
125
126    <meta name="subcategory" value="reference" />
127
128
129      <meta name="book_path" value="/reference/android/support/test/_book.yaml" />
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145<title>UiSelector</title>
146
147
148</head>
149
150<body class="gc-documentation develop reference api apilevel-">
151<div id="doc-api-level" class="" style="display:none"></div>
152
153
154
155
156<div id="naMessage"></div>
157
158<div id="api-info-block">
159<div class="api-level">
160
161
162
163
164</div>
165
166
167
168
169
170
171
172
173
174
175
176<div class="sum-details-links">
177
178Summary:
179
180
181
182
183
184
185
186
187
188  <a href="#pubctors">Ctors</a>
189
190
191
192
193  &#124; <a href="#pubmethods">Methods</a>
194
195
196
197  &#124; <a href="#promethods">Protected Methods</a>
198
199
200
201  &#124; <a href="#inhmethods">Inherited Methods</a>
202
203&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
204
205</div><!-- end sum-details-links -->
206</div><!-- end api-info-block -->
207
208<div class="api apilevel-" id="jd-content">
209
210<!-- ======== START OF CLASS DATA ======== -->
211
212<h1 class="api-title">UiSelector</h1>
213<p>
214<code class="api-signature">
215  public
216
217
218
219  class
220  UiSelector
221</code>
222<br>
223
224
225<code class="api-signature">
226
227    extends Object
228
229
230
231</code>
232
233<code class="api-signature">
234
235
236
237</code>
238
239</p><table class="jd-inheritance-table">
240
241
242  <tr>
243
244    <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object
245    </td>
246  </tr>
247
248
249  <tr>
250
251      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
252
253    <td colspan="1" class="jd-inheritance-class-cell">android.support.test.uiautomator.UiSelector
254    </td>
255  </tr>
256
257
258</table>
259
260
261
262
263<br><hr>
264
265
266  <p>Specifies the elements in the layout hierarchy for tests to target, filtered
267 by properties such as text value, content-description, class name, and state
268 information. You can also target an element by its location in a layout
269 hierarchy.</p>
270
271
272
273
274
275
276
277<h2 class="api-section">Summary</h2>
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301<!-- ======== CONSTRUCTOR SUMMARY ======== -->
302<table id="pubctors" class="responsive constructors">
303<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
304
305
306
307
308  <tr class="api apilevel-" >
309
310
311    <td width="100%">
312      <code>
313      <a href="/reference/android/support/test/uiautomator/UiSelector.html#UiSelector()">UiSelector</a>()
314      </code>
315
316    </td>
317  </tr>
318
319
320
321</table>
322
323
324
325
326
327
328<!-- ========== METHOD SUMMARY =========== -->
329<table id="pubmethods" class="responsive methods">
330<tr><th colspan="2"><h3>Public methods</h3></th></tr>
331
332
333
334
335  <tr class="api apilevel-" >
336
337
338    <td><code>
339
340
341
342
343
344        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
345    </td>
346
347    <td width="100%">
348      <code>
349      <a href="/reference/android/support/test/uiautomator/UiSelector.html#checkable(boolean)">checkable</a>(boolean val)
350      </code>
351
352        <p>Set the search criteria to match widgets that are checkable.
353
354
355</p>
356
357    </td>
358  </tr>
359
360
361
362  <tr class="api apilevel-" >
363
364
365    <td><code>
366
367
368
369
370
371        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
372    </td>
373
374    <td width="100%">
375      <code>
376      <a href="/reference/android/support/test/uiautomator/UiSelector.html#checked(boolean)">checked</a>(boolean val)
377      </code>
378
379        <p>Set the search criteria to match widgets that
380 are currently checked (usually for checkboxes).
381
382
383</p>
384
385    </td>
386  </tr>
387
388
389
390  <tr class="api apilevel-" >
391
392
393    <td><code>
394
395
396
397
398
399        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
400    </td>
401
402    <td width="100%">
403      <code>
404      <a href="/reference/android/support/test/uiautomator/UiSelector.html#childSelector(android.support.test.uiautomator.UiSelector)">childSelector</a>(<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)
405      </code>
406
407        <p>Adds a child UiSelector criteria to this selector.
408
409
410</p>
411
412    </td>
413  </tr>
414
415
416
417  <tr class="api apilevel-" >
418
419
420    <td><code>
421
422
423
424
425
426        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
427    </td>
428
429    <td width="100%">
430      <code>
431      <a href="/reference/android/support/test/uiautomator/UiSelector.html#className(java.lang.String)">className</a>(String className)
432      </code>
433
434        <p>Set the search criteria to match the class property
435 for a widget (for example, "android.widget.Button").
436
437
438</p>
439
440    </td>
441  </tr>
442
443
444
445  <tr class="api apilevel-" >
446
447
448    <td><code>
449
450
451
452
453        &lt;T&gt;
454        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
455    </td>
456
457    <td width="100%">
458      <code>
459      <a href="/reference/android/support/test/uiautomator/UiSelector.html#className(java.lang.Class<T>)">className</a>(Class&lt;T&gt; type)
460      </code>
461
462        <p>Set the search criteria to match the class property
463 for a widget (for example, "android.widget.Button").
464
465
466</p>
467
468    </td>
469  </tr>
470
471
472
473  <tr class="api apilevel-" >
474
475
476    <td><code>
477
478
479
480
481
482        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
483    </td>
484
485    <td width="100%">
486      <code>
487      <a href="/reference/android/support/test/uiautomator/UiSelector.html#classNameMatches(java.lang.String)">classNameMatches</a>(String regex)
488      </code>
489
490        <p>Set the search criteria to match the class property
491 for a widget, using a regular expression.
492
493
494</p>
495
496    </td>
497  </tr>
498
499
500
501  <tr class="api apilevel-" >
502
503
504    <td><code>
505
506
507
508
509
510        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
511    </td>
512
513    <td width="100%">
514      <code>
515      <a href="/reference/android/support/test/uiautomator/UiSelector.html#clickable(boolean)">clickable</a>(boolean val)
516      </code>
517
518        <p>Set the search criteria to match widgets that are clickable.
519
520
521</p>
522
523    </td>
524  </tr>
525
526
527
528  <tr class="api apilevel-" >
529
530
531    <td><code>
532
533
534
535
536
537        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
538    </td>
539
540    <td width="100%">
541      <code>
542      <a href="/reference/android/support/test/uiautomator/UiSelector.html#description(java.lang.String)">description</a>(String desc)
543      </code>
544
545        <p>Set the search criteria to match the content-description
546 property for a widget.
547
548
549</p>
550
551    </td>
552  </tr>
553
554
555
556  <tr class="api apilevel-" >
557
558
559    <td><code>
560
561
562
563
564
565        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
566    </td>
567
568    <td width="100%">
569      <code>
570      <a href="/reference/android/support/test/uiautomator/UiSelector.html#descriptionContains(java.lang.String)">descriptionContains</a>(String desc)
571      </code>
572
573        <p>Set the search criteria to match the content-description
574 property for a widget.
575
576
577</p>
578
579    </td>
580  </tr>
581
582
583
584  <tr class="api apilevel-" >
585
586
587    <td><code>
588
589
590
591
592
593        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
594    </td>
595
596    <td width="100%">
597      <code>
598      <a href="/reference/android/support/test/uiautomator/UiSelector.html#descriptionMatches(java.lang.String)">descriptionMatches</a>(String regex)
599      </code>
600
601        <p>Set the search criteria to match the content-description
602 property for a widget.
603
604
605</p>
606
607    </td>
608  </tr>
609
610
611
612  <tr class="api apilevel-" >
613
614
615    <td><code>
616
617
618
619
620
621        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
622    </td>
623
624    <td width="100%">
625      <code>
626      <a href="/reference/android/support/test/uiautomator/UiSelector.html#descriptionStartsWith(java.lang.String)">descriptionStartsWith</a>(String desc)
627      </code>
628
629        <p>Set the search criteria to match the content-description
630 property for a widget.
631
632
633</p>
634
635    </td>
636  </tr>
637
638
639
640  <tr class="api apilevel-" >
641
642
643    <td><code>
644
645
646
647
648
649        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
650    </td>
651
652    <td width="100%">
653      <code>
654      <a href="/reference/android/support/test/uiautomator/UiSelector.html#enabled(boolean)">enabled</a>(boolean val)
655      </code>
656
657        <p>Set the search criteria to match widgets that are enabled.
658
659
660</p>
661
662    </td>
663  </tr>
664
665
666
667  <tr class="api apilevel-" >
668
669
670    <td><code>
671
672
673
674
675
676        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
677    </td>
678
679    <td width="100%">
680      <code>
681      <a href="/reference/android/support/test/uiautomator/UiSelector.html#focusable(boolean)">focusable</a>(boolean val)
682      </code>
683
684        <p>Set the search criteria to match widgets that are focusable.
685
686
687</p>
688
689    </td>
690  </tr>
691
692
693
694  <tr class="api apilevel-" >
695
696
697    <td><code>
698
699
700
701
702
703        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
704    </td>
705
706    <td width="100%">
707      <code>
708      <a href="/reference/android/support/test/uiautomator/UiSelector.html#focused(boolean)">focused</a>(boolean val)
709      </code>
710
711        <p>Set the search criteria to match widgets that have focus.
712
713
714</p>
715
716    </td>
717  </tr>
718
719
720
721  <tr class="api apilevel-" >
722
723
724    <td><code>
725
726
727
728
729
730        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
731    </td>
732
733    <td width="100%">
734      <code>
735      <a href="/reference/android/support/test/uiautomator/UiSelector.html#fromParent(android.support.test.uiautomator.UiSelector)">fromParent</a>(<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)
736      </code>
737
738        <p>Adds a child UiSelector criteria to this selector which is used to
739 start search from the parent widget.
740
741
742</p>
743
744    </td>
745  </tr>
746
747
748
749  <tr class="api apilevel-" >
750
751
752    <td><code>
753
754
755
756
757
758        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
759    </td>
760
761    <td width="100%">
762      <code>
763      <a href="/reference/android/support/test/uiautomator/UiSelector.html#index(int)">index</a>(int index)
764      </code>
765
766        <p>Set the search criteria to match the widget by its node
767 index in the layout hierarchy.
768
769
770</p>
771
772    </td>
773  </tr>
774
775
776
777  <tr class="api apilevel-" >
778
779
780    <td><code>
781
782
783
784
785
786        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
787    </td>
788
789    <td width="100%">
790      <code>
791      <a href="/reference/android/support/test/uiautomator/UiSelector.html#instance(int)">instance</a>(int instance)
792      </code>
793
794        <p>Set the search criteria to match the
795 widget by its instance number.
796
797
798</p>
799
800    </td>
801  </tr>
802
803
804
805  <tr class="api apilevel-" >
806
807
808    <td><code>
809
810
811
812
813
814        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
815    </td>
816
817    <td width="100%">
818      <code>
819      <a href="/reference/android/support/test/uiautomator/UiSelector.html#longClickable(boolean)">longClickable</a>(boolean val)
820      </code>
821
822        <p>Set the search criteria to match widgets that are long-clickable.
823
824
825</p>
826
827    </td>
828  </tr>
829
830
831
832  <tr class="api apilevel-" >
833
834
835    <td><code>
836
837
838
839
840
841        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
842    </td>
843
844    <td width="100%">
845      <code>
846      <a href="/reference/android/support/test/uiautomator/UiSelector.html#packageName(java.lang.String)">packageName</a>(String name)
847      </code>
848
849        <p>Set the search criteria to match the package name
850 of the application that contains the widget.
851
852
853</p>
854
855    </td>
856  </tr>
857
858
859
860  <tr class="api apilevel-" >
861
862
863    <td><code>
864
865
866
867
868
869        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
870    </td>
871
872    <td width="100%">
873      <code>
874      <a href="/reference/android/support/test/uiautomator/UiSelector.html#packageNameMatches(java.lang.String)">packageNameMatches</a>(String regex)
875      </code>
876
877        <p>Set the search criteria to match the package name
878 of the application that contains the widget.
879
880
881</p>
882
883    </td>
884  </tr>
885
886
887
888  <tr class="api apilevel-" >
889
890
891    <td><code>
892
893
894
895
896
897        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
898    </td>
899
900    <td width="100%">
901      <code>
902      <a href="/reference/android/support/test/uiautomator/UiSelector.html#resourceId(java.lang.String)">resourceId</a>(String id)
903      </code>
904
905        <p>Set the search criteria to match the given resource ID.
906
907
908</p>
909
910    </td>
911  </tr>
912
913
914
915  <tr class="api apilevel-" >
916
917
918    <td><code>
919
920
921
922
923
924        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
925    </td>
926
927    <td width="100%">
928      <code>
929      <a href="/reference/android/support/test/uiautomator/UiSelector.html#resourceIdMatches(java.lang.String)">resourceIdMatches</a>(String regex)
930      </code>
931
932        <p>Set the search criteria to match the resource ID
933 of the widget, using a regular expression.
934
935
936</p>
937
938    </td>
939  </tr>
940
941
942
943  <tr class="api apilevel-" >
944
945
946    <td><code>
947
948
949
950
951
952        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
953    </td>
954
955    <td width="100%">
956      <code>
957      <a href="/reference/android/support/test/uiautomator/UiSelector.html#scrollable(boolean)">scrollable</a>(boolean val)
958      </code>
959
960        <p>Set the search criteria to match widgets that are scrollable.
961
962
963</p>
964
965    </td>
966  </tr>
967
968
969
970  <tr class="api apilevel-" >
971
972
973    <td><code>
974
975
976
977
978
979        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
980    </td>
981
982    <td width="100%">
983      <code>
984      <a href="/reference/android/support/test/uiautomator/UiSelector.html#selected(boolean)">selected</a>(boolean val)
985      </code>
986
987        <p>Set the search criteria to match widgets that
988 are currently selected.
989
990
991</p>
992
993    </td>
994  </tr>
995
996
997
998  <tr class="api apilevel-" >
999
1000
1001    <td><code>
1002
1003
1004
1005
1006
1007        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
1008    </td>
1009
1010    <td width="100%">
1011      <code>
1012      <a href="/reference/android/support/test/uiautomator/UiSelector.html#text(java.lang.String)">text</a>(String text)
1013      </code>
1014
1015        <p>Set the search criteria to match the visible text displayed
1016 in a widget (for example, the text label to launch an app).
1017
1018
1019</p>
1020
1021    </td>
1022  </tr>
1023
1024
1025
1026  <tr class="api apilevel-" >
1027
1028
1029    <td><code>
1030
1031
1032
1033
1034
1035        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
1036    </td>
1037
1038    <td width="100%">
1039      <code>
1040      <a href="/reference/android/support/test/uiautomator/UiSelector.html#textContains(java.lang.String)">textContains</a>(String text)
1041      </code>
1042
1043        <p>Set the search criteria to match the visible text in a widget
1044 where the visible text must contain the string in your input argument.
1045
1046
1047</p>
1048
1049    </td>
1050  </tr>
1051
1052
1053
1054  <tr class="api apilevel-" >
1055
1056
1057    <td><code>
1058
1059
1060
1061
1062
1063        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
1064    </td>
1065
1066    <td width="100%">
1067      <code>
1068      <a href="/reference/android/support/test/uiautomator/UiSelector.html#textMatches(java.lang.String)">textMatches</a>(String regex)
1069      </code>
1070
1071        <p>Set the search criteria to match the visible text displayed in a layout
1072 element, using a regular expression.
1073
1074
1075</p>
1076
1077    </td>
1078  </tr>
1079
1080
1081
1082  <tr class="api apilevel-" >
1083
1084
1085    <td><code>
1086
1087
1088
1089
1090
1091        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
1092    </td>
1093
1094    <td width="100%">
1095      <code>
1096      <a href="/reference/android/support/test/uiautomator/UiSelector.html#textStartsWith(java.lang.String)">textStartsWith</a>(String text)
1097      </code>
1098
1099        <p>Set the search criteria to match visible text in a widget that is
1100 prefixed by the text parameter.
1101
1102
1103</p>
1104
1105    </td>
1106  </tr>
1107
1108
1109
1110  <tr class="api apilevel-" >
1111
1112
1113    <td><code>
1114
1115
1116
1117
1118
1119        String</code>
1120    </td>
1121
1122    <td width="100%">
1123      <code>
1124      <a href="/reference/android/support/test/uiautomator/UiSelector.html#toString()">toString</a>()
1125      </code>
1126
1127    </td>
1128  </tr>
1129
1130
1131
1132</table>
1133
1134
1135
1136
1137<!-- ========== METHOD SUMMARY =========== -->
1138<table id="promethods" class="reponsive methods">
1139<tr><th colspan="2"><h3>Protected methods</h3></th></tr>
1140
1141
1142
1143
1144  <tr class="api apilevel-" >
1145
1146
1147    <td><code>
1148
1149
1150
1151
1152
1153        <a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>
1154    </td>
1155
1156    <td width="100%">
1157      <code>
1158      <a href="/reference/android/support/test/uiautomator/UiSelector.html#cloneSelector()">cloneSelector</a>()
1159      </code>
1160
1161    </td>
1162  </tr>
1163
1164
1165
1166</table>
1167
1168
1169
1170
1171
1172<!-- ========== METHOD SUMMARY =========== -->
1173<table id="inhmethods" class="methods inhtable">
1174<tr><th><h3>Inherited methods</h3></th></tr>
1175
1176
1177<tr class="api apilevel-" >
1178<td colspan="2">
1179
1180  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
1181          ><img height="34" id="inherited-methods-java.lang.Object-trigger"
1182          src="/assets/images/styles/disclosure_down.png"
1183          class="jd-expando-trigger-img" /></a>From
1184class
1185<code>
1186
1187    java.lang.Object
1188
1189</code>
1190<div id="inherited-methods-java.lang.Object">
1191  <div id="inherited-methods-java.lang.Object-list"
1192        class="jd-inheritedlinks">
1193  </div>
1194  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
1195    <table class="jd-sumtable-expando responsive">
1196
1197
1198
1199
1200  <tr class="api apilevel-" >
1201
1202
1203    <td><code>
1204
1205
1206
1207
1208
1209        Object</code>
1210    </td>
1211
1212    <td width="100%">
1213      <code>
1214      clone()
1215      </code>
1216
1217    </td>
1218  </tr>
1219
1220
1221
1222  <tr class="api apilevel-" >
1223
1224
1225    <td><code>
1226
1227
1228
1229
1230
1231        boolean</code>
1232    </td>
1233
1234    <td width="100%">
1235      <code>
1236      equals(Object arg0)
1237      </code>
1238
1239    </td>
1240  </tr>
1241
1242
1243
1244  <tr class="api apilevel-" >
1245
1246
1247    <td><code>
1248
1249
1250
1251
1252
1253        void</code>
1254    </td>
1255
1256    <td width="100%">
1257      <code>
1258      finalize()
1259      </code>
1260
1261    </td>
1262  </tr>
1263
1264
1265
1266  <tr class="api apilevel-" >
1267
1268
1269    <td><code>
1270
1271
1272
1273        final
1274
1275        Class&lt;?&gt;</code>
1276    </td>
1277
1278    <td width="100%">
1279      <code>
1280      getClass()
1281      </code>
1282
1283    </td>
1284  </tr>
1285
1286
1287
1288  <tr class="api apilevel-" >
1289
1290
1291    <td><code>
1292
1293
1294
1295
1296
1297        int</code>
1298    </td>
1299
1300    <td width="100%">
1301      <code>
1302      hashCode()
1303      </code>
1304
1305    </td>
1306  </tr>
1307
1308
1309
1310  <tr class="api apilevel-" >
1311
1312
1313    <td><code>
1314
1315
1316
1317        final
1318
1319        void</code>
1320    </td>
1321
1322    <td width="100%">
1323      <code>
1324      notify()
1325      </code>
1326
1327    </td>
1328  </tr>
1329
1330
1331
1332  <tr class="api apilevel-" >
1333
1334
1335    <td><code>
1336
1337
1338
1339        final
1340
1341        void</code>
1342    </td>
1343
1344    <td width="100%">
1345      <code>
1346      notifyAll()
1347      </code>
1348
1349    </td>
1350  </tr>
1351
1352
1353
1354  <tr class="api apilevel-" >
1355
1356
1357    <td><code>
1358
1359
1360
1361
1362
1363        String</code>
1364    </td>
1365
1366    <td width="100%">
1367      <code>
1368      toString()
1369      </code>
1370
1371    </td>
1372  </tr>
1373
1374
1375
1376  <tr class="api apilevel-" >
1377
1378
1379    <td><code>
1380
1381
1382
1383        final
1384
1385        void</code>
1386    </td>
1387
1388    <td width="100%">
1389      <code>
1390      wait(long arg0, int arg1)
1391      </code>
1392
1393    </td>
1394  </tr>
1395
1396
1397
1398  <tr class="api apilevel-" >
1399
1400
1401    <td><code>
1402
1403
1404
1405        final
1406
1407        void</code>
1408    </td>
1409
1410    <td width="100%">
1411      <code>
1412      wait(long arg0)
1413      </code>
1414
1415    </td>
1416  </tr>
1417
1418
1419
1420  <tr class="api apilevel-" >
1421
1422
1423    <td><code>
1424
1425
1426
1427        final
1428
1429        void</code>
1430    </td>
1431
1432    <td width="100%">
1433      <code>
1434      wait()
1435      </code>
1436
1437    </td>
1438  </tr>
1439
1440
1441
1442    </table>
1443  </div>
1444</div>
1445</td></tr>
1446
1447
1448</table>
1449
1450
1451
1452<!-- XML Attributes -->
1453
1454
1455<!-- Enum Values -->
1456
1457
1458<!-- Constants -->
1459
1460
1461<!-- Fields -->
1462
1463
1464<!-- Public ctors -->
1465
1466
1467<!-- ========= CONSTRUCTOR DETAIL ======== -->
1468<h2 class="api-section">Public constructors</h2>
1469
1470
1471
1472<A NAME="UiSelector()"></A>
1473
1474<div class="api apilevel-">
1475    <h3 class="api-name">UiSelector</h3>
1476    <div class="api-level">
1477      <div></div>
1478
1479
1480
1481    </div>
1482<pre class="api-signature no-pretty-print">
1483UiSelector ()</pre>
1484
1485
1486
1487
1488  <p></p>
1489
1490
1491</div>
1492
1493
1494
1495
1496
1497<!-- ========= CONSTRUCTOR DETAIL ======== -->
1498<!-- Protected ctors -->
1499
1500
1501
1502<!-- ========= METHOD DETAIL ======== -->
1503<!-- Public methdos -->
1504
1505<h2 class="api-section">Public methods</h2>
1506
1507
1508
1509<A NAME="checkable(boolean)"></A>
1510
1511<div class="api apilevel-">
1512    <h3 class="api-name">checkable</h3>
1513    <div class="api-level">
1514      <div></div>
1515
1516
1517
1518    </div>
1519<pre class="api-signature no-pretty-print">
1520<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> checkable (boolean val)</pre>
1521
1522
1523
1524
1525  <p>Set the search criteria to match widgets that are checkable.
1526
1527 Typically, using this search criteria alone is not useful.
1528 You should also include additional criteria, such as text,
1529 content-description, or the class name for a widget.
1530
1531 If no other search criteria is specified, and there is more
1532 than one matching widget, the first widget in the tree
1533 is selected.</p>
1534
1535    <table class="responsive">
1536    <tr><th colspan=2>Parameters</th></tr>
1537      <tr>
1538        <td><code>val</code></td>
1539        <td width="100%">
1540          <code>boolean</code>:
1541          Value to match</td>
1542      </tr>
1543    </table>
1544    <table class="responsive">
1545      <tr><th colspan=2>Returns</th></tr>
1546      <tr>
1547        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1548        <td width="100%">UiSelector with the specified search criteria</td>
1549      </tr>
1550    </table>
1551
1552</div>
1553
1554
1555<A NAME="checked(boolean)"></A>
1556
1557<div class="api apilevel-">
1558    <h3 class="api-name">checked</h3>
1559    <div class="api-level">
1560      <div></div>
1561
1562
1563
1564    </div>
1565<pre class="api-signature no-pretty-print">
1566<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> checked (boolean val)</pre>
1567
1568
1569
1570
1571  <p>Set the search criteria to match widgets that
1572 are currently checked (usually for checkboxes).
1573
1574 Typically, using this search criteria alone is not useful.
1575 You should also include additional criteria, such as text,
1576 content-description, or the class name for a widget.
1577
1578 If no other search criteria is specified, and there is more
1579 than one matching widget, the first widget in the tree
1580 is selected.</p>
1581
1582    <table class="responsive">
1583    <tr><th colspan=2>Parameters</th></tr>
1584      <tr>
1585        <td><code>val</code></td>
1586        <td width="100%">
1587          <code>boolean</code>:
1588          Value to match</td>
1589      </tr>
1590    </table>
1591    <table class="responsive">
1592      <tr><th colspan=2>Returns</th></tr>
1593      <tr>
1594        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1595        <td width="100%">UiSelector with the specified search criteria</td>
1596      </tr>
1597    </table>
1598
1599</div>
1600
1601
1602<A NAME="childSelector(android.support.test.uiautomator.UiSelector)"></A>
1603
1604<div class="api apilevel-">
1605    <h3 class="api-name">childSelector</h3>
1606    <div class="api-level">
1607      <div></div>
1608
1609
1610
1611    </div>
1612<pre class="api-signature no-pretty-print">
1613<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childSelector (<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)</pre>
1614
1615
1616
1617
1618  <p>Adds a child UiSelector criteria to this selector.
1619
1620 Use this selector to narrow the search scope to
1621 child widgets under a specific parent widget.</p>
1622
1623    <table class="responsive">
1624      <tr><th colspan=2>Returns</th></tr>
1625      <tr>
1626        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1627        <td width="100%">UiSelector with this added search criterion</td>
1628      </tr>
1629    </table>
1630
1631</div>
1632
1633
1634<A NAME="className(java.lang.String)"></A>
1635
1636<div class="api apilevel-">
1637    <h3 class="api-name">className</h3>
1638    <div class="api-level">
1639      <div></div>
1640
1641
1642
1643    </div>
1644<pre class="api-signature no-pretty-print">
1645<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> className (String className)</pre>
1646
1647
1648
1649
1650  <p>Set the search criteria to match the class property
1651 for a widget (for example, "android.widget.Button").</p>
1652
1653    <table class="responsive">
1654    <tr><th colspan=2>Parameters</th></tr>
1655      <tr>
1656        <td><code>className</code></td>
1657        <td width="100%">
1658          <code>String</code>:
1659          Value to match</td>
1660      </tr>
1661    </table>
1662    <table class="responsive">
1663      <tr><th colspan=2>Returns</th></tr>
1664      <tr>
1665        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1666        <td width="100%">UiSelector with the specified search criteria</td>
1667      </tr>
1668    </table>
1669
1670</div>
1671
1672
1673<A NAME="className(java.lang.Class<T>)"></A>
1674
1675<div class="api apilevel-">
1676    <h3 class="api-name">className</h3>
1677    <div class="api-level">
1678      <div></div>
1679
1680
1681
1682    </div>
1683<pre class="api-signature no-pretty-print">
1684<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> className (Class&lt;T&gt; type)</pre>
1685
1686
1687
1688
1689  <p>Set the search criteria to match the class property
1690 for a widget (for example, "android.widget.Button").</p>
1691
1692    <table class="responsive">
1693    <tr><th colspan=2>Parameters</th></tr>
1694      <tr>
1695        <td><code>type</code></td>
1696        <td width="100%">
1697          <code>Class</code>:
1698          type</td>
1699      </tr>
1700    </table>
1701    <table class="responsive">
1702      <tr><th colspan=2>Returns</th></tr>
1703      <tr>
1704        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1705        <td width="100%">UiSelector with the specified search criteria</td>
1706      </tr>
1707    </table>
1708
1709</div>
1710
1711
1712<A NAME="classNameMatches(java.lang.String)"></A>
1713
1714<div class="api apilevel-">
1715    <h3 class="api-name">classNameMatches</h3>
1716    <div class="api-level">
1717      <div></div>
1718
1719
1720
1721    </div>
1722<pre class="api-signature no-pretty-print">
1723<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> classNameMatches (String regex)</pre>
1724
1725
1726
1727
1728  <p>Set the search criteria to match the class property
1729 for a widget, using a regular expression.</p>
1730
1731    <table class="responsive">
1732    <tr><th colspan=2>Parameters</th></tr>
1733      <tr>
1734        <td><code>regex</code></td>
1735        <td width="100%">
1736          <code>String</code>:
1737          a regular expression</td>
1738      </tr>
1739    </table>
1740    <table class="responsive">
1741      <tr><th colspan=2>Returns</th></tr>
1742      <tr>
1743        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1744        <td width="100%">UiSelector with the specified search criteria</td>
1745      </tr>
1746    </table>
1747
1748</div>
1749
1750
1751<A NAME="clickable(boolean)"></A>
1752
1753<div class="api apilevel-">
1754    <h3 class="api-name">clickable</h3>
1755    <div class="api-level">
1756      <div></div>
1757
1758
1759
1760    </div>
1761<pre class="api-signature no-pretty-print">
1762<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> clickable (boolean val)</pre>
1763
1764
1765
1766
1767  <p>Set the search criteria to match widgets that are clickable.
1768
1769 Typically, using this search criteria alone is not useful.
1770 You should also include additional criteria, such as text,
1771 content-description, or the class name for a widget.
1772
1773 If no other search criteria is specified, and there is more
1774 than one matching widget, the first widget in the tree
1775 is selected.</p>
1776
1777    <table class="responsive">
1778    <tr><th colspan=2>Parameters</th></tr>
1779      <tr>
1780        <td><code>val</code></td>
1781        <td width="100%">
1782          <code>boolean</code>:
1783          Value to match</td>
1784      </tr>
1785    </table>
1786    <table class="responsive">
1787      <tr><th colspan=2>Returns</th></tr>
1788      <tr>
1789        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1790        <td width="100%">UiSelector with the specified search criteria</td>
1791      </tr>
1792    </table>
1793
1794</div>
1795
1796
1797<A NAME="description(java.lang.String)"></A>
1798
1799<div class="api apilevel-">
1800    <h3 class="api-name">description</h3>
1801    <div class="api-level">
1802      <div></div>
1803
1804
1805
1806    </div>
1807<pre class="api-signature no-pretty-print">
1808<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> description (String desc)</pre>
1809
1810
1811
1812
1813  <p>Set the search criteria to match the content-description
1814 property for a widget.
1815
1816 The content-description is typically used
1817 by the Android Accessibility framework to
1818 provide an audio prompt for the widget when
1819 the widget is selected. The content-description
1820 for the widget must match exactly
1821 with the string in your input argument.
1822
1823 Matching is case-sensitive.</p>
1824
1825    <table class="responsive">
1826    <tr><th colspan=2>Parameters</th></tr>
1827      <tr>
1828        <td><code>desc</code></td>
1829        <td width="100%">
1830          <code>String</code>:
1831          Value to match</td>
1832      </tr>
1833    </table>
1834    <table class="responsive">
1835      <tr><th colspan=2>Returns</th></tr>
1836      <tr>
1837        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1838        <td width="100%">UiSelector with the specified search criteria</td>
1839      </tr>
1840    </table>
1841
1842</div>
1843
1844
1845<A NAME="descriptionContains(java.lang.String)"></A>
1846
1847<div class="api apilevel-">
1848    <h3 class="api-name">descriptionContains</h3>
1849    <div class="api-level">
1850      <div></div>
1851
1852
1853
1854    </div>
1855<pre class="api-signature no-pretty-print">
1856<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> descriptionContains (String desc)</pre>
1857
1858
1859
1860
1861  <p>Set the search criteria to match the content-description
1862 property for a widget.
1863
1864 The content-description is typically used
1865 by the Android Accessibility framework to
1866 provide an audio prompt for the widget when
1867 the widget is selected. The content-description
1868 for the widget must contain
1869 the string in your input argument.
1870
1871 Matching is case-insensitive.</p>
1872
1873    <table class="responsive">
1874    <tr><th colspan=2>Parameters</th></tr>
1875      <tr>
1876        <td><code>desc</code></td>
1877        <td width="100%">
1878          <code>String</code>:
1879          Value to match</td>
1880      </tr>
1881    </table>
1882    <table class="responsive">
1883      <tr><th colspan=2>Returns</th></tr>
1884      <tr>
1885        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1886        <td width="100%">UiSelector with the specified search criteria</td>
1887      </tr>
1888    </table>
1889
1890</div>
1891
1892
1893<A NAME="descriptionMatches(java.lang.String)"></A>
1894
1895<div class="api apilevel-">
1896    <h3 class="api-name">descriptionMatches</h3>
1897    <div class="api-level">
1898      <div></div>
1899
1900
1901
1902    </div>
1903<pre class="api-signature no-pretty-print">
1904<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> descriptionMatches (String regex)</pre>
1905
1906
1907
1908
1909  <p>Set the search criteria to match the content-description
1910 property for a widget.
1911
1912 The content-description is typically used
1913 by the Android Accessibility framework to
1914 provide an audio prompt for the widget when
1915 the widget is selected. The content-description
1916 for the widget must match exactly
1917 with the string in your input argument.</p>
1918
1919    <table class="responsive">
1920    <tr><th colspan=2>Parameters</th></tr>
1921      <tr>
1922        <td><code>regex</code></td>
1923        <td width="100%">
1924          <code>String</code>:
1925          a regular expression</td>
1926      </tr>
1927    </table>
1928    <table class="responsive">
1929      <tr><th colspan=2>Returns</th></tr>
1930      <tr>
1931        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1932        <td width="100%">UiSelector with the specified search criteria</td>
1933      </tr>
1934    </table>
1935
1936</div>
1937
1938
1939<A NAME="descriptionStartsWith(java.lang.String)"></A>
1940
1941<div class="api apilevel-">
1942    <h3 class="api-name">descriptionStartsWith</h3>
1943    <div class="api-level">
1944      <div></div>
1945
1946
1947
1948    </div>
1949<pre class="api-signature no-pretty-print">
1950<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> descriptionStartsWith (String desc)</pre>
1951
1952
1953
1954
1955  <p>Set the search criteria to match the content-description
1956 property for a widget.
1957
1958 The content-description is typically used
1959 by the Android Accessibility framework to
1960 provide an audio prompt for the widget when
1961 the widget is selected. The content-description
1962 for the widget must start
1963 with the string in your input argument.
1964
1965 Matching is case-insensitive.</p>
1966
1967    <table class="responsive">
1968    <tr><th colspan=2>Parameters</th></tr>
1969      <tr>
1970        <td><code>desc</code></td>
1971        <td width="100%">
1972          <code>String</code>:
1973          Value to match</td>
1974      </tr>
1975    </table>
1976    <table class="responsive">
1977      <tr><th colspan=2>Returns</th></tr>
1978      <tr>
1979        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
1980        <td width="100%">UiSelector with the specified search criteria</td>
1981      </tr>
1982    </table>
1983
1984</div>
1985
1986
1987<A NAME="enabled(boolean)"></A>
1988
1989<div class="api apilevel-">
1990    <h3 class="api-name">enabled</h3>
1991    <div class="api-level">
1992      <div></div>
1993
1994
1995
1996    </div>
1997<pre class="api-signature no-pretty-print">
1998<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> enabled (boolean val)</pre>
1999
2000
2001
2002
2003  <p>Set the search criteria to match widgets that are enabled.
2004
2005 Typically, using this search criteria alone is not useful.
2006 You should also include additional criteria, such as text,
2007 content-description, or the class name for a widget.
2008
2009 If no other search criteria is specified, and there is more
2010 than one matching widget, the first widget in the tree
2011 is selected.</p>
2012
2013    <table class="responsive">
2014    <tr><th colspan=2>Parameters</th></tr>
2015      <tr>
2016        <td><code>val</code></td>
2017        <td width="100%">
2018          <code>boolean</code>:
2019          Value to match</td>
2020      </tr>
2021    </table>
2022    <table class="responsive">
2023      <tr><th colspan=2>Returns</th></tr>
2024      <tr>
2025        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2026        <td width="100%">UiSelector with the specified search criteria</td>
2027      </tr>
2028    </table>
2029
2030</div>
2031
2032
2033<A NAME="focusable(boolean)"></A>
2034
2035<div class="api apilevel-">
2036    <h3 class="api-name">focusable</h3>
2037    <div class="api-level">
2038      <div></div>
2039
2040
2041
2042    </div>
2043<pre class="api-signature no-pretty-print">
2044<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> focusable (boolean val)</pre>
2045
2046
2047
2048
2049  <p>Set the search criteria to match widgets that are focusable.
2050
2051 Typically, using this search criteria alone is not useful.
2052 You should also include additional criteria, such as text,
2053 content-description, or the class name for a widget.
2054
2055 If no other search criteria is specified, and there is more
2056 than one matching widget, the first widget in the tree
2057 is selected.</p>
2058
2059    <table class="responsive">
2060    <tr><th colspan=2>Parameters</th></tr>
2061      <tr>
2062        <td><code>val</code></td>
2063        <td width="100%">
2064          <code>boolean</code>:
2065          Value to match</td>
2066      </tr>
2067    </table>
2068    <table class="responsive">
2069      <tr><th colspan=2>Returns</th></tr>
2070      <tr>
2071        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2072        <td width="100%">UiSelector with the specified search criteria</td>
2073      </tr>
2074    </table>
2075
2076</div>
2077
2078
2079<A NAME="focused(boolean)"></A>
2080
2081<div class="api apilevel-">
2082    <h3 class="api-name">focused</h3>
2083    <div class="api-level">
2084      <div></div>
2085
2086
2087
2088    </div>
2089<pre class="api-signature no-pretty-print">
2090<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> focused (boolean val)</pre>
2091
2092
2093
2094
2095  <p>Set the search criteria to match widgets that have focus.
2096
2097 Typically, using this search criteria alone is not useful.
2098 You should also include additional criteria, such as text,
2099 content-description, or the class name for a widget.
2100
2101 If no other search criteria is specified, and there is more
2102 than one matching widget, the first widget in the tree
2103 is selected.</p>
2104
2105    <table class="responsive">
2106    <tr><th colspan=2>Parameters</th></tr>
2107      <tr>
2108        <td><code>val</code></td>
2109        <td width="100%">
2110          <code>boolean</code>:
2111          Value to match</td>
2112      </tr>
2113    </table>
2114    <table class="responsive">
2115      <tr><th colspan=2>Returns</th></tr>
2116      <tr>
2117        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2118        <td width="100%">UiSelector with the specified search criteria</td>
2119      </tr>
2120    </table>
2121
2122</div>
2123
2124
2125<A NAME="fromParent(android.support.test.uiautomator.UiSelector)"></A>
2126
2127<div class="api apilevel-">
2128    <h3 class="api-name">fromParent</h3>
2129    <div class="api-level">
2130      <div></div>
2131
2132
2133
2134    </div>
2135<pre class="api-signature no-pretty-print">
2136<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> fromParent (<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)</pre>
2137
2138
2139
2140
2141  <p>Adds a child UiSelector criteria to this selector which is used to
2142 start search from the parent widget.
2143
2144 Use this selector to narrow the search scope to
2145 sibling widgets as well all child widgets under a parent.</p>
2146
2147    <table class="responsive">
2148      <tr><th colspan=2>Returns</th></tr>
2149      <tr>
2150        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2151        <td width="100%">UiSelector with this added search criterion</td>
2152      </tr>
2153    </table>
2154
2155</div>
2156
2157
2158<A NAME="index(int)"></A>
2159
2160<div class="api apilevel-">
2161    <h3 class="api-name">index</h3>
2162    <div class="api-level">
2163      <div></div>
2164
2165
2166
2167    </div>
2168<pre class="api-signature no-pretty-print">
2169<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> index (int index)</pre>
2170
2171
2172
2173
2174  <p>Set the search criteria to match the widget by its node
2175 index in the layout hierarchy.
2176
2177 The index value must be 0 or greater.
2178
2179 Using the index can be unreliable and should only
2180 be used as a last resort for matching. Instead,
2181 consider using the <code><a href="/reference/android/support/test/uiautomator/UiSelector.html#instance(int)">instance(int)</a></code> method.</p>
2182
2183    <table class="responsive">
2184    <tr><th colspan=2>Parameters</th></tr>
2185      <tr>
2186        <td><code>index</code></td>
2187        <td width="100%">
2188          <code>int</code>:
2189          Value to match</td>
2190      </tr>
2191    </table>
2192    <table class="responsive">
2193      <tr><th colspan=2>Returns</th></tr>
2194      <tr>
2195        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2196        <td width="100%">UiSelector with the specified search criteria</td>
2197      </tr>
2198    </table>
2199
2200</div>
2201
2202
2203<A NAME="instance(int)"></A>
2204
2205<div class="api apilevel-">
2206    <h3 class="api-name">instance</h3>
2207    <div class="api-level">
2208      <div></div>
2209
2210
2211
2212    </div>
2213<pre class="api-signature no-pretty-print">
2214<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> instance (int instance)</pre>
2215
2216
2217
2218
2219  <p>Set the search criteria to match the
2220 widget by its instance number.
2221
2222 The instance value must be 0 or greater, where
2223 the first instance is 0.
2224
2225 For example, to simulate a user click on
2226 the third image that is enabled in a UI screen, you
2227 could specify a a search criteria where the instance is
2228 2, the <code><a href="/reference/android/support/test/uiautomator/UiSelector.html#className(java.lang.String)">className(String)</a></code> matches the image
2229 widget class, and <code><a href="/reference/android/support/test/uiautomator/UiSelector.html#enabled(boolean)">enabled(boolean)</a></code> is true.
2230 The code would look like this:
2231 <code>
2232 new UiSelector().className("android.widget.ImageView")
2233    .enabled(true).instance(2);
2234 </code></p>
2235
2236    <table class="responsive">
2237    <tr><th colspan=2>Parameters</th></tr>
2238      <tr>
2239        <td><code>instance</code></td>
2240        <td width="100%">
2241          <code>int</code>:
2242          Value to match</td>
2243      </tr>
2244    </table>
2245    <table class="responsive">
2246      <tr><th colspan=2>Returns</th></tr>
2247      <tr>
2248        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2249        <td width="100%">UiSelector with the specified search criteria</td>
2250      </tr>
2251    </table>
2252
2253</div>
2254
2255
2256<A NAME="longClickable(boolean)"></A>
2257
2258<div class="api apilevel-">
2259    <h3 class="api-name">longClickable</h3>
2260    <div class="api-level">
2261      <div></div>
2262
2263
2264
2265    </div>
2266<pre class="api-signature no-pretty-print">
2267<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> longClickable (boolean val)</pre>
2268
2269
2270
2271
2272  <p>Set the search criteria to match widgets that are long-clickable.
2273
2274 Typically, using this search criteria alone is not useful.
2275 You should also include additional criteria, such as text,
2276 content-description, or the class name for a widget.
2277
2278 If no other search criteria is specified, and there is more
2279 than one matching widget, the first widget in the tree
2280 is selected.</p>
2281
2282    <table class="responsive">
2283    <tr><th colspan=2>Parameters</th></tr>
2284      <tr>
2285        <td><code>val</code></td>
2286        <td width="100%">
2287          <code>boolean</code>:
2288          Value to match</td>
2289      </tr>
2290    </table>
2291    <table class="responsive">
2292      <tr><th colspan=2>Returns</th></tr>
2293      <tr>
2294        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2295        <td width="100%">UiSelector with the specified search criteria</td>
2296      </tr>
2297    </table>
2298
2299</div>
2300
2301
2302<A NAME="packageName(java.lang.String)"></A>
2303
2304<div class="api apilevel-">
2305    <h3 class="api-name">packageName</h3>
2306    <div class="api-level">
2307      <div></div>
2308
2309
2310
2311    </div>
2312<pre class="api-signature no-pretty-print">
2313<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> packageName (String name)</pre>
2314
2315
2316
2317
2318  <p>Set the search criteria to match the package name
2319 of the application that contains the widget.</p>
2320
2321    <table class="responsive">
2322    <tr><th colspan=2>Parameters</th></tr>
2323      <tr>
2324        <td><code>name</code></td>
2325        <td width="100%">
2326          <code>String</code>:
2327          Value to match</td>
2328      </tr>
2329    </table>
2330    <table class="responsive">
2331      <tr><th colspan=2>Returns</th></tr>
2332      <tr>
2333        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2334        <td width="100%">UiSelector with the specified search criteria</td>
2335      </tr>
2336    </table>
2337
2338</div>
2339
2340
2341<A NAME="packageNameMatches(java.lang.String)"></A>
2342
2343<div class="api apilevel-">
2344    <h3 class="api-name">packageNameMatches</h3>
2345    <div class="api-level">
2346      <div></div>
2347
2348
2349
2350    </div>
2351<pre class="api-signature no-pretty-print">
2352<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> packageNameMatches (String regex)</pre>
2353
2354
2355
2356
2357  <p>Set the search criteria to match the package name
2358 of the application that contains the widget.</p>
2359
2360    <table class="responsive">
2361    <tr><th colspan=2>Parameters</th></tr>
2362      <tr>
2363        <td><code>regex</code></td>
2364        <td width="100%">
2365          <code>String</code>:
2366          a regular expression</td>
2367      </tr>
2368    </table>
2369    <table class="responsive">
2370      <tr><th colspan=2>Returns</th></tr>
2371      <tr>
2372        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2373        <td width="100%">UiSelector with the specified search criteria</td>
2374      </tr>
2375    </table>
2376
2377</div>
2378
2379
2380<A NAME="resourceId(java.lang.String)"></A>
2381
2382<div class="api apilevel-">
2383    <h3 class="api-name">resourceId</h3>
2384    <div class="api-level">
2385      <div></div>
2386
2387
2388
2389    </div>
2390<pre class="api-signature no-pretty-print">
2391<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> resourceId (String id)</pre>
2392
2393
2394
2395
2396  <p>Set the search criteria to match the given resource ID.</p>
2397
2398    <table class="responsive">
2399    <tr><th colspan=2>Parameters</th></tr>
2400      <tr>
2401        <td><code>id</code></td>
2402        <td width="100%">
2403          <code>String</code>:
2404          Value to match</td>
2405      </tr>
2406    </table>
2407    <table class="responsive">
2408      <tr><th colspan=2>Returns</th></tr>
2409      <tr>
2410        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2411        <td width="100%">UiSelector with the specified search criteria</td>
2412      </tr>
2413    </table>
2414
2415</div>
2416
2417
2418<A NAME="resourceIdMatches(java.lang.String)"></A>
2419
2420<div class="api apilevel-">
2421    <h3 class="api-name">resourceIdMatches</h3>
2422    <div class="api-level">
2423      <div></div>
2424
2425
2426
2427    </div>
2428<pre class="api-signature no-pretty-print">
2429<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> resourceIdMatches (String regex)</pre>
2430
2431
2432
2433
2434  <p>Set the search criteria to match the resource ID
2435 of the widget, using a regular expression.</p>
2436
2437    <table class="responsive">
2438    <tr><th colspan=2>Parameters</th></tr>
2439      <tr>
2440        <td><code>regex</code></td>
2441        <td width="100%">
2442          <code>String</code>:
2443          a regular expression</td>
2444      </tr>
2445    </table>
2446    <table class="responsive">
2447      <tr><th colspan=2>Returns</th></tr>
2448      <tr>
2449        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2450        <td width="100%">UiSelector with the specified search criteria</td>
2451      </tr>
2452    </table>
2453
2454</div>
2455
2456
2457<A NAME="scrollable(boolean)"></A>
2458
2459<div class="api apilevel-">
2460    <h3 class="api-name">scrollable</h3>
2461    <div class="api-level">
2462      <div></div>
2463
2464
2465
2466    </div>
2467<pre class="api-signature no-pretty-print">
2468<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> scrollable (boolean val)</pre>
2469
2470
2471
2472
2473  <p>Set the search criteria to match widgets that are scrollable.
2474
2475 Typically, using this search criteria alone is not useful.
2476 You should also include additional criteria, such as text,
2477 content-description, or the class name for a widget.
2478
2479 If no other search criteria is specified, and there is more
2480 than one matching widget, the first widget in the tree
2481 is selected.</p>
2482
2483    <table class="responsive">
2484    <tr><th colspan=2>Parameters</th></tr>
2485      <tr>
2486        <td><code>val</code></td>
2487        <td width="100%">
2488          <code>boolean</code>:
2489          Value to match</td>
2490      </tr>
2491    </table>
2492    <table class="responsive">
2493      <tr><th colspan=2>Returns</th></tr>
2494      <tr>
2495        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2496        <td width="100%">UiSelector with the specified search criteria</td>
2497      </tr>
2498    </table>
2499
2500</div>
2501
2502
2503<A NAME="selected(boolean)"></A>
2504
2505<div class="api apilevel-">
2506    <h3 class="api-name">selected</h3>
2507    <div class="api-level">
2508      <div></div>
2509
2510
2511
2512    </div>
2513<pre class="api-signature no-pretty-print">
2514<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selected (boolean val)</pre>
2515
2516
2517
2518
2519  <p>Set the search criteria to match widgets that
2520 are currently selected.
2521
2522 Typically, using this search criteria alone is not useful.
2523 You should also include additional criteria, such as text,
2524 content-description, or the class name for a widget.
2525
2526 If no other search criteria is specified, and there is more
2527 than one matching widget, the first widget in the tree
2528 is selected.</p>
2529
2530    <table class="responsive">
2531    <tr><th colspan=2>Parameters</th></tr>
2532      <tr>
2533        <td><code>val</code></td>
2534        <td width="100%">
2535          <code>boolean</code>:
2536          Value to match</td>
2537      </tr>
2538    </table>
2539    <table class="responsive">
2540      <tr><th colspan=2>Returns</th></tr>
2541      <tr>
2542        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2543        <td width="100%">UiSelector with the specified search criteria</td>
2544      </tr>
2545    </table>
2546
2547</div>
2548
2549
2550<A NAME="text(java.lang.String)"></A>
2551
2552<div class="api apilevel-">
2553    <h3 class="api-name">text</h3>
2554    <div class="api-level">
2555      <div></div>
2556
2557
2558
2559    </div>
2560<pre class="api-signature no-pretty-print">
2561<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> text (String text)</pre>
2562
2563
2564
2565
2566  <p>Set the search criteria to match the visible text displayed
2567 in a widget (for example, the text label to launch an app).
2568
2569 The text for the element must match exactly with the string in your input
2570 argument. Matching is case-sensitive.</p>
2571
2572    <table class="responsive">
2573    <tr><th colspan=2>Parameters</th></tr>
2574      <tr>
2575        <td><code>text</code></td>
2576        <td width="100%">
2577          <code>String</code>:
2578          Value to match</td>
2579      </tr>
2580    </table>
2581    <table class="responsive">
2582      <tr><th colspan=2>Returns</th></tr>
2583      <tr>
2584        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2585        <td width="100%">UiSelector with the specified search criteria</td>
2586      </tr>
2587    </table>
2588
2589</div>
2590
2591
2592<A NAME="textContains(java.lang.String)"></A>
2593
2594<div class="api apilevel-">
2595    <h3 class="api-name">textContains</h3>
2596    <div class="api-level">
2597      <div></div>
2598
2599
2600
2601    </div>
2602<pre class="api-signature no-pretty-print">
2603<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> textContains (String text)</pre>
2604
2605
2606
2607
2608  <p>Set the search criteria to match the visible text in a widget
2609 where the visible text must contain the string in your input argument.
2610
2611 The matching is case-sensitive.</p>
2612
2613    <table class="responsive">
2614    <tr><th colspan=2>Parameters</th></tr>
2615      <tr>
2616        <td><code>text</code></td>
2617        <td width="100%">
2618          <code>String</code>:
2619          Value to match</td>
2620      </tr>
2621    </table>
2622    <table class="responsive">
2623      <tr><th colspan=2>Returns</th></tr>
2624      <tr>
2625        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2626        <td width="100%">UiSelector with the specified search criteria</td>
2627      </tr>
2628    </table>
2629
2630</div>
2631
2632
2633<A NAME="textMatches(java.lang.String)"></A>
2634
2635<div class="api apilevel-">
2636    <h3 class="api-name">textMatches</h3>
2637    <div class="api-level">
2638      <div></div>
2639
2640
2641
2642    </div>
2643<pre class="api-signature no-pretty-print">
2644<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> textMatches (String regex)</pre>
2645
2646
2647
2648
2649  <p>Set the search criteria to match the visible text displayed in a layout
2650 element, using a regular expression.
2651
2652 The text in the widget must match exactly with the string in your
2653 input argument.</p>
2654
2655    <table class="responsive">
2656    <tr><th colspan=2>Parameters</th></tr>
2657      <tr>
2658        <td><code>regex</code></td>
2659        <td width="100%">
2660          <code>String</code>:
2661          a regular expression</td>
2662      </tr>
2663    </table>
2664    <table class="responsive">
2665      <tr><th colspan=2>Returns</th></tr>
2666      <tr>
2667        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2668        <td width="100%">UiSelector with the specified search criteria</td>
2669      </tr>
2670    </table>
2671
2672</div>
2673
2674
2675<A NAME="textStartsWith(java.lang.String)"></A>
2676
2677<div class="api apilevel-">
2678    <h3 class="api-name">textStartsWith</h3>
2679    <div class="api-level">
2680      <div></div>
2681
2682
2683
2684    </div>
2685<pre class="api-signature no-pretty-print">
2686<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> textStartsWith (String text)</pre>
2687
2688
2689
2690
2691  <p>Set the search criteria to match visible text in a widget that is
2692 prefixed by the text parameter.
2693
2694 The matching is case-insensitive.</p>
2695
2696    <table class="responsive">
2697    <tr><th colspan=2>Parameters</th></tr>
2698      <tr>
2699        <td><code>text</code></td>
2700        <td width="100%">
2701          <code>String</code>:
2702          Value to match</td>
2703      </tr>
2704    </table>
2705    <table class="responsive">
2706      <tr><th colspan=2>Returns</th></tr>
2707      <tr>
2708        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2709        <td width="100%">UiSelector with the specified search criteria</td>
2710      </tr>
2711    </table>
2712
2713</div>
2714
2715
2716<A NAME="toString()"></A>
2717
2718<div class="api apilevel-">
2719    <h3 class="api-name">toString</h3>
2720    <div class="api-level">
2721      <div></div>
2722
2723
2724
2725    </div>
2726<pre class="api-signature no-pretty-print">
2727String toString ()</pre>
2728
2729
2730
2731
2732  <p></p>
2733    <table class="responsive">
2734      <tr><th colspan=2>Returns</th></tr>
2735      <tr>
2736        <td><code>String</code></td>
2737        <td width="100%"><!-- no returns description in source --></td>
2738      </tr>
2739    </table>
2740
2741</div>
2742
2743
2744
2745
2746
2747<!-- ========= METHOD DETAIL ======== -->
2748
2749<h2 class="api-section">Protected methods</h2>
2750
2751
2752
2753<A NAME="cloneSelector()"></A>
2754
2755<div class="api apilevel-">
2756    <h3 class="api-name">cloneSelector</h3>
2757    <div class="api-level">
2758      <div></div>
2759
2760
2761
2762    </div>
2763<pre class="api-signature no-pretty-print">
2764<a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> cloneSelector ()</pre>
2765
2766
2767
2768
2769  <p></p>
2770
2771    <table class="responsive">
2772      <tr><th colspan=2>Returns</th></tr>
2773      <tr>
2774        <td><code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code></td>
2775        <td width="100%"><!-- no returns description in source --></td>
2776      </tr>
2777    </table>
2778
2779</div>
2780
2781
2782
2783
2784
2785<!-- ========= END OF CLASS DATA ========= -->
2786
2787</div><!-- end jd-content -->
2788
2789
2790
2791<div class="data-reference-resources-wrapper">
2792
2793  <ul data-reference-resources>
2794
2795
2796    <li><h2>Interfaces</h2>
2797      <ul>
2798          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a></li>
2799          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiWatcher.html">UiWatcher</a></li>
2800      </ul>
2801    </li>
2802
2803    <li><h2>Classes</h2>
2804      <ul>
2805          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/By.html">By</a></li>
2806          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/BySelector.html">BySelector</a></li>
2807          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></li>
2808          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/EventCondition.html">EventCondition</a></li>
2809          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/SearchCondition.html">SearchCondition</a></li>
2810          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner.html">UiAutomatorInstrumentationTestRunner</a></li>
2811          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html">UiAutomatorTestCase</a></li>
2812          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiCollection.html">UiCollection</a></li>
2813          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></li>
2814          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject.html">UiObject</a></li>
2815          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2.html">UiObject2</a></li>
2816          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2Condition.html">UiObject2Condition</a></li>
2817          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></li>
2818          <li class="selected api apilevel-"><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></li>
2819          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Until.html">Until</a></li>
2820      </ul>
2821    </li>
2822
2823    <li><h2>Enums</h2>
2824      <ul>
2825          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Direction.html">Direction</a></li>
2826      </ul>
2827    </li>
2828
2829    <li><h2>Exceptions</h2>
2830      <ul>
2831          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/StaleObjectException.html">StaleObjectException</a></li>
2832          <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></li>
2833      </ul>
2834    </li>
2835
2836  </ul>
2837
2838</div>
2839
2840
2841
2842</body>
2843</html>
2844