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>ViewAssertions</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
189
190  <a href="#pubmethods">Methods</a>
191
192
193
194
195  &#124; <a href="#inhmethods">Inherited Methods</a>
196
197&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
198
199</div><!-- end sum-details-links -->
200</div><!-- end api-info-block -->
201
202<div class="api apilevel-" id="jd-content">
203
204<!-- ======== START OF CLASS DATA ======== -->
205
206<h1 class="api-title">ViewAssertions</h1>
207<p>
208<code class="api-signature">
209  public
210
211  final
212
213  class
214  ViewAssertions
215</code>
216<br>
217
218
219<code class="api-signature">
220
221    extends Object
222
223
224
225</code>
226
227<code class="api-signature">
228
229
230
231</code>
232
233</p><table class="jd-inheritance-table">
234
235
236  <tr>
237
238    <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object
239    </td>
240  </tr>
241
242
243  <tr>
244
245      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
246
247    <td colspan="1" class="jd-inheritance-class-cell">android.support.test.espresso.assertion.ViewAssertions
248    </td>
249  </tr>
250
251
252</table>
253
254
255
256
257<br><hr>
258
259
260  <p>A collection of common <code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code>s.
261</p>
262
263
264
265
266
267
268
269<h2 class="api-section">Summary</h2>
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297<!-- ========== METHOD SUMMARY =========== -->
298<table id="pubmethods" class="responsive methods">
299<tr><th colspan="2"><h3>Public methods</h3></th></tr>
300
301
302
303
304  <tr class="api apilevel-" >
305
306
307    <td><code>
308
309
310        static
311
312
313        <a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code>
314    </td>
315
316    <td width="100%">
317      <code>
318      <a href="/reference/android/support/test/espresso/assertion/ViewAssertions.html#doesNotExist()">doesNotExist</a>()
319      </code>
320
321        <p>Returns an assert that ensures the view matcher does not find any matching view in the
322 hierarchy.
323
324
325</p>
326
327    </td>
328  </tr>
329
330
331
332  <tr class="api apilevel-" >
333
334
335    <td><code>
336
337
338        static
339
340
341        <a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code>
342    </td>
343
344    <td width="100%">
345      <code>
346      <a href="/reference/android/support/test/espresso/assertion/ViewAssertions.html#matches(org.hamcrest.Matcher<? super android.view.View>)">matches</a>(Matcher&lt;?&nbsp;super&nbsp;View&gt; viewMatcher)
347      </code>
348
349        <p>Returns a generic <code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code> that asserts that a view exists in the view hierarchy
350 and is matched by the given view matcher.
351
352
353</p>
354
355    </td>
356  </tr>
357
358
359
360  <tr class="api apilevel-" >
361
362
363    <td><code>
364
365
366        static
367
368
369        <a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code>
370    </td>
371
372    <td width="100%">
373      <code>
374      <a href="/reference/android/support/test/espresso/assertion/ViewAssertions.html#selectedDescendantsMatch(org.hamcrest.Matcher<android.view.View>, org.hamcrest.Matcher<android.view.View>)">selectedDescendantsMatch</a>(Matcher&lt;View&gt; selector, Matcher&lt;View&gt; matcher)
375      </code>
376
377        <p>Returns a generic <code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code> that asserts that the descendant views selected by the
378 selector match the specified matcher.
379
380
381</p>
382
383    </td>
384  </tr>
385
386
387
388</table>
389
390
391
392
393
394
395
396<!-- ========== METHOD SUMMARY =========== -->
397<table id="inhmethods" class="methods inhtable">
398<tr><th><h3>Inherited methods</h3></th></tr>
399
400
401<tr class="api apilevel-" >
402<td colspan="2">
403
404  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
405          ><img height="34" id="inherited-methods-java.lang.Object-trigger"
406          src="/assets/images/styles/disclosure_down.png"
407          class="jd-expando-trigger-img" /></a>From
408class
409<code>
410
411    java.lang.Object
412
413</code>
414<div id="inherited-methods-java.lang.Object">
415  <div id="inherited-methods-java.lang.Object-list"
416        class="jd-inheritedlinks">
417  </div>
418  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
419    <table class="jd-sumtable-expando responsive">
420
421
422
423
424  <tr class="api apilevel-" >
425
426
427    <td><code>
428
429
430
431
432
433        Object</code>
434    </td>
435
436    <td width="100%">
437      <code>
438      clone()
439      </code>
440
441    </td>
442  </tr>
443
444
445
446  <tr class="api apilevel-" >
447
448
449    <td><code>
450
451
452
453
454
455        boolean</code>
456    </td>
457
458    <td width="100%">
459      <code>
460      equals(Object arg0)
461      </code>
462
463    </td>
464  </tr>
465
466
467
468  <tr class="api apilevel-" >
469
470
471    <td><code>
472
473
474
475
476
477        void</code>
478    </td>
479
480    <td width="100%">
481      <code>
482      finalize()
483      </code>
484
485    </td>
486  </tr>
487
488
489
490  <tr class="api apilevel-" >
491
492
493    <td><code>
494
495
496
497        final
498
499        Class&lt;?&gt;</code>
500    </td>
501
502    <td width="100%">
503      <code>
504      getClass()
505      </code>
506
507    </td>
508  </tr>
509
510
511
512  <tr class="api apilevel-" >
513
514
515    <td><code>
516
517
518
519
520
521        int</code>
522    </td>
523
524    <td width="100%">
525      <code>
526      hashCode()
527      </code>
528
529    </td>
530  </tr>
531
532
533
534  <tr class="api apilevel-" >
535
536
537    <td><code>
538
539
540
541        final
542
543        void</code>
544    </td>
545
546    <td width="100%">
547      <code>
548      notify()
549      </code>
550
551    </td>
552  </tr>
553
554
555
556  <tr class="api apilevel-" >
557
558
559    <td><code>
560
561
562
563        final
564
565        void</code>
566    </td>
567
568    <td width="100%">
569      <code>
570      notifyAll()
571      </code>
572
573    </td>
574  </tr>
575
576
577
578  <tr class="api apilevel-" >
579
580
581    <td><code>
582
583
584
585
586
587        String</code>
588    </td>
589
590    <td width="100%">
591      <code>
592      toString()
593      </code>
594
595    </td>
596  </tr>
597
598
599
600  <tr class="api apilevel-" >
601
602
603    <td><code>
604
605
606
607        final
608
609        void</code>
610    </td>
611
612    <td width="100%">
613      <code>
614      wait(long arg0, int arg1)
615      </code>
616
617    </td>
618  </tr>
619
620
621
622  <tr class="api apilevel-" >
623
624
625    <td><code>
626
627
628
629        final
630
631        void</code>
632    </td>
633
634    <td width="100%">
635      <code>
636      wait(long arg0)
637      </code>
638
639    </td>
640  </tr>
641
642
643
644  <tr class="api apilevel-" >
645
646
647    <td><code>
648
649
650
651        final
652
653        void</code>
654    </td>
655
656    <td width="100%">
657      <code>
658      wait()
659      </code>
660
661    </td>
662  </tr>
663
664
665
666    </table>
667  </div>
668</div>
669</td></tr>
670
671
672</table>
673
674
675
676<!-- XML Attributes -->
677
678
679<!-- Enum Values -->
680
681
682<!-- Constants -->
683
684
685<!-- Fields -->
686
687
688<!-- Public ctors -->
689
690
691
692<!-- ========= CONSTRUCTOR DETAIL ======== -->
693<!-- Protected ctors -->
694
695
696
697<!-- ========= METHOD DETAIL ======== -->
698<!-- Public methdos -->
699
700<h2 class="api-section">Public methods</h2>
701
702
703
704<A NAME="doesNotExist()"></A>
705
706<div class="api apilevel-">
707    <h3 class="api-name">doesNotExist</h3>
708    <div class="api-level">
709      <div></div>
710
711
712
713    </div>
714<pre class="api-signature no-pretty-print">
715<a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a> doesNotExist ()</pre>
716
717
718
719
720  <p>Returns an assert that ensures the view matcher does not find any matching view in the
721 hierarchy.
722</p>
723    <table class="responsive">
724      <tr><th colspan=2>Returns</th></tr>
725      <tr>
726        <td><code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code></td>
727        <td width="100%"><!-- no returns description in source --></td>
728      </tr>
729    </table>
730
731</div>
732
733
734<A NAME="matches(org.hamcrest.Matcher<? super android.view.View>)"></A>
735
736<div class="api apilevel-">
737    <h3 class="api-name">matches</h3>
738    <div class="api-level">
739      <div></div>
740
741
742
743    </div>
744<pre class="api-signature no-pretty-print">
745<a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a> matches (Matcher&lt;?&nbsp;super&nbsp;View&gt; viewMatcher)</pre>
746
747
748
749
750  <p>Returns a generic <code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code> that asserts that a view exists in the view hierarchy
751 and is matched by the given view matcher.
752</p>
753    <table class="responsive">
754    <tr><th colspan=2>Parameters</th></tr>
755      <tr>
756        <td><code>viewMatcher</code></td>
757        <td width="100%">
758          <code>Matcher</code>
759          <!-- no parameter comment --></td>
760      </tr>
761    </table>
762    <table class="responsive">
763      <tr><th colspan=2>Returns</th></tr>
764      <tr>
765        <td><code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code></td>
766        <td width="100%"><!-- no returns description in source --></td>
767      </tr>
768    </table>
769
770</div>
771
772
773<A NAME="selectedDescendantsMatch(org.hamcrest.Matcher<android.view.View>, org.hamcrest.Matcher<android.view.View>)"></A>
774
775<div class="api apilevel-">
776    <h3 class="api-name">selectedDescendantsMatch</h3>
777    <div class="api-level">
778      <div></div>
779
780
781
782    </div>
783<pre class="api-signature no-pretty-print">
784<a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a> selectedDescendantsMatch (Matcher&lt;View&gt; selector,
785                Matcher&lt;View&gt; matcher)</pre>
786
787
788
789
790  <p>Returns a generic <code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code> that asserts that the descendant views selected by the
791 selector match the specified matcher.
792
793  Example: onView(rootView).check(selectedDescendantsMatch(
794 not(isAssignableFrom(TextView.class)), hasContentDescription()));
795</p>
796    <table class="responsive">
797    <tr><th colspan=2>Parameters</th></tr>
798      <tr>
799        <td><code>selector</code></td>
800        <td width="100%">
801          <code>Matcher</code>
802          <!-- no parameter comment --></td>
803      </tr>
804      <tr>
805        <td><code>matcher</code></td>
806        <td width="100%">
807          <code>Matcher</code>
808          <!-- no parameter comment --></td>
809      </tr>
810    </table>
811    <table class="responsive">
812      <tr><th colspan=2>Returns</th></tr>
813      <tr>
814        <td><code><a href="/reference/android/support/test/espresso/ViewAssertion.html">ViewAssertion</a></code></td>
815        <td width="100%"><!-- no returns description in source --></td>
816      </tr>
817    </table>
818
819</div>
820
821
822
823
824
825<!-- ========= METHOD DETAIL ======== -->
826
827
828
829<!-- ========= END OF CLASS DATA ========= -->
830
831</div><!-- end jd-content -->
832
833
834
835<div class="data-reference-resources-wrapper">
836
837  <ul data-reference-resources>
838
839
840
841    <li><h2>Classes</h2>
842      <ul>
843          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/assertion/LayoutAssertions.html">LayoutAssertions</a></li>
844          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/assertion/PositionAssertions.html">PositionAssertions</a></li>
845          <li class="selected api apilevel-"><a href="/reference/android/support/test/espresso/assertion/ViewAssertions.html">ViewAssertions</a></li>
846      </ul>
847    </li>
848
849
850
851  </ul>
852
853</div>
854
855
856
857</body>
858</html>
859