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>TypeTextAction</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
177
178
179
180
181
182
183<div class="sum-details-links">
184
185Summary:
186
187
188
189
190
191
192
193
194
195  <a href="#pubctors">Ctors</a>
196
197
198
199
200  &#124; <a href="#pubmethods">Methods</a>
201
202
203
204
205  &#124; <a href="#inhmethods">Inherited Methods</a>
206
207&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
208
209</div><!-- end sum-details-links -->
210</div><!-- end api-info-block -->
211
212<div class="api apilevel-" id="jd-content">
213
214<!-- ======== START OF CLASS DATA ======== -->
215
216<h1 class="api-title">TypeTextAction</h1>
217<p>
218<code class="api-signature">
219  public
220
221  final
222
223  class
224  TypeTextAction
225</code>
226<br>
227
228
229<code class="api-signature">
230
231    extends Object
232
233
234
235</code>
236
237<code class="api-signature">
238
239
240      implements
241
242        <a href="/reference/android/support/test/espresso/ViewAction.html">ViewAction</a>
243
244
245
246</code>
247
248</p><table class="jd-inheritance-table">
249
250
251  <tr>
252
253    <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object
254    </td>
255  </tr>
256
257
258  <tr>
259
260      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
261
262    <td colspan="1" class="jd-inheritance-class-cell">android.support.test.espresso.action.TypeTextAction
263    </td>
264  </tr>
265
266
267</table>
268
269
270
271
272<br><hr>
273
274
275  <p>Enables typing text on views.
276</p>
277
278
279
280
281
282
283
284<h2 class="api-section">Summary</h2>
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308<!-- ======== CONSTRUCTOR SUMMARY ======== -->
309<table id="pubctors" class="responsive constructors">
310<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
311
312
313
314
315  <tr class="api apilevel-" >
316
317
318    <td width="100%">
319      <code>
320      <a href="/reference/android/support/test/espresso/action/TypeTextAction.html#TypeTextAction(java.lang.String)">TypeTextAction</a>(String stringToBeTyped)
321      </code>
322
323        <p>Constructs <code><a href="/reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></code> with given string.
324
325
326</p>
327
328    </td>
329  </tr>
330
331
332
333  <tr class="api apilevel-" >
334
335
336    <td width="100%">
337      <code>
338      <a href="/reference/android/support/test/espresso/action/TypeTextAction.html#TypeTextAction(java.lang.String, boolean)">TypeTextAction</a>(String stringToBeTyped, boolean tapToFocus)
339      </code>
340
341        <p>Constructs <code><a href="/reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></code> with given string.
342
343
344</p>
345
346    </td>
347  </tr>
348
349
350
351</table>
352
353
354
355
356
357
358<!-- ========== METHOD SUMMARY =========== -->
359<table id="pubmethods" class="responsive methods">
360<tr><th colspan="2"><h3>Public methods</h3></th></tr>
361
362
363
364
365  <tr class="api apilevel-" >
366
367
368    <td><code>
369
370
371
372
373
374        Matcher&lt;View&gt;</code>
375    </td>
376
377    <td width="100%">
378      <code>
379      <a href="/reference/android/support/test/espresso/action/TypeTextAction.html#getConstraints()">getConstraints</a>()
380      </code>
381
382        <p>A mechanism for ViewActions to specify what type of views they can operate on.
383
384
385</p>
386
387    </td>
388  </tr>
389
390
391
392  <tr class="api apilevel-" >
393
394
395    <td><code>
396
397
398
399
400
401        String</code>
402    </td>
403
404    <td width="100%">
405      <code>
406      <a href="/reference/android/support/test/espresso/action/TypeTextAction.html#getDescription()">getDescription</a>()
407      </code>
408
409        <p>Returns a description of the view action.
410
411
412</p>
413
414    </td>
415  </tr>
416
417
418
419  <tr class="api apilevel-" >
420
421
422    <td><code>
423
424
425
426
427
428        void</code>
429    </td>
430
431    <td width="100%">
432      <code>
433      <a href="/reference/android/support/test/espresso/action/TypeTextAction.html#perform(android.support.test.espresso.UiController, android.view.View)">perform</a>(<a href="/reference/android/support/test/espresso/UiController.html">UiController</a> uiController, View view)
434      </code>
435
436        <p>Performs this action on the given view.
437
438
439</p>
440
441    </td>
442  </tr>
443
444
445
446</table>
447
448
449
450
451
452
453
454<!-- ========== METHOD SUMMARY =========== -->
455<table id="inhmethods" class="methods inhtable">
456<tr><th><h3>Inherited methods</h3></th></tr>
457
458
459<tr class="api apilevel-" >
460<td colspan="2">
461
462  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
463          ><img height="34" id="inherited-methods-java.lang.Object-trigger"
464          src="/assets/images/styles/disclosure_down.png"
465          class="jd-expando-trigger-img" /></a>From
466class
467<code>
468
469    java.lang.Object
470
471</code>
472<div id="inherited-methods-java.lang.Object">
473  <div id="inherited-methods-java.lang.Object-list"
474        class="jd-inheritedlinks">
475  </div>
476  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
477    <table class="jd-sumtable-expando responsive">
478
479
480
481
482  <tr class="api apilevel-" >
483
484
485    <td><code>
486
487
488
489
490
491        Object</code>
492    </td>
493
494    <td width="100%">
495      <code>
496      clone()
497      </code>
498
499    </td>
500  </tr>
501
502
503
504  <tr class="api apilevel-" >
505
506
507    <td><code>
508
509
510
511
512
513        boolean</code>
514    </td>
515
516    <td width="100%">
517      <code>
518      equals(Object arg0)
519      </code>
520
521    </td>
522  </tr>
523
524
525
526  <tr class="api apilevel-" >
527
528
529    <td><code>
530
531
532
533
534
535        void</code>
536    </td>
537
538    <td width="100%">
539      <code>
540      finalize()
541      </code>
542
543    </td>
544  </tr>
545
546
547
548  <tr class="api apilevel-" >
549
550
551    <td><code>
552
553
554
555        final
556
557        Class&lt;?&gt;</code>
558    </td>
559
560    <td width="100%">
561      <code>
562      getClass()
563      </code>
564
565    </td>
566  </tr>
567
568
569
570  <tr class="api apilevel-" >
571
572
573    <td><code>
574
575
576
577
578
579        int</code>
580    </td>
581
582    <td width="100%">
583      <code>
584      hashCode()
585      </code>
586
587    </td>
588  </tr>
589
590
591
592  <tr class="api apilevel-" >
593
594
595    <td><code>
596
597
598
599        final
600
601        void</code>
602    </td>
603
604    <td width="100%">
605      <code>
606      notify()
607      </code>
608
609    </td>
610  </tr>
611
612
613
614  <tr class="api apilevel-" >
615
616
617    <td><code>
618
619
620
621        final
622
623        void</code>
624    </td>
625
626    <td width="100%">
627      <code>
628      notifyAll()
629      </code>
630
631    </td>
632  </tr>
633
634
635
636  <tr class="api apilevel-" >
637
638
639    <td><code>
640
641
642
643
644
645        String</code>
646    </td>
647
648    <td width="100%">
649      <code>
650      toString()
651      </code>
652
653    </td>
654  </tr>
655
656
657
658  <tr class="api apilevel-" >
659
660
661    <td><code>
662
663
664
665        final
666
667        void</code>
668    </td>
669
670    <td width="100%">
671      <code>
672      wait(long arg0, int arg1)
673      </code>
674
675    </td>
676  </tr>
677
678
679
680  <tr class="api apilevel-" >
681
682
683    <td><code>
684
685
686
687        final
688
689        void</code>
690    </td>
691
692    <td width="100%">
693      <code>
694      wait(long arg0)
695      </code>
696
697    </td>
698  </tr>
699
700
701
702  <tr class="api apilevel-" >
703
704
705    <td><code>
706
707
708
709        final
710
711        void</code>
712    </td>
713
714    <td width="100%">
715      <code>
716      wait()
717      </code>
718
719    </td>
720  </tr>
721
722
723
724    </table>
725  </div>
726</div>
727</td></tr>
728
729
730
731<tr class="api apilevel-" >
732<td colspan="2">
733
734  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.support.test.espresso.ViewAction" class="jd-expando-trigger closed"
735          ><img height="34" id="inherited-methods-android.support.test.espresso.ViewAction-trigger"
736          src="/assets/images/styles/disclosure_down.png"
737          class="jd-expando-trigger-img" /></a>From
738interface
739<code>
740
741    <a href="/reference/android/support/test/espresso/ViewAction.html">android.support.test.espresso.ViewAction</a>
742
743</code>
744<div id="inherited-methods-android.support.test.espresso.ViewAction">
745  <div id="inherited-methods-android.support.test.espresso.ViewAction-list"
746        class="jd-inheritedlinks">
747  </div>
748  <div id="inherited-methods-android.support.test.espresso.ViewAction-summary" style="display: none;">
749    <table class="jd-sumtable-expando responsive">
750
751
752
753
754  <tr class="api apilevel-" >
755
756
757    <td><code>
758        abstract
759
760
761
762
763        Matcher&lt;View&gt;</code>
764    </td>
765
766    <td width="100%">
767      <code>
768      <a href="/reference/android/support/test/espresso/ViewAction.html#getConstraints()">getConstraints</a>()
769      </code>
770
771        <p>A mechanism for ViewActions to specify what type of views they can operate on.
772
773
774</p>
775
776    </td>
777  </tr>
778
779
780
781  <tr class="api apilevel-" >
782
783
784    <td><code>
785        abstract
786
787
788
789
790        String</code>
791    </td>
792
793    <td width="100%">
794      <code>
795      <a href="/reference/android/support/test/espresso/ViewAction.html#getDescription()">getDescription</a>()
796      </code>
797
798        <p>Returns a description of the view action.
799
800
801</p>
802
803    </td>
804  </tr>
805
806
807
808  <tr class="api apilevel-" >
809
810
811    <td><code>
812        abstract
813
814
815
816
817        void</code>
818    </td>
819
820    <td width="100%">
821      <code>
822      <a href="/reference/android/support/test/espresso/ViewAction.html#perform(android.support.test.espresso.UiController, android.view.View)">perform</a>(<a href="/reference/android/support/test/espresso/UiController.html">UiController</a> uiController, View view)
823      </code>
824
825        <p>Performs this action on the given view.
826
827
828</p>
829
830    </td>
831  </tr>
832
833
834
835    </table>
836  </div>
837</div>
838</td></tr>
839
840
841</table>
842
843
844
845<!-- XML Attributes -->
846
847
848<!-- Enum Values -->
849
850
851<!-- Constants -->
852
853
854<!-- Fields -->
855
856
857<!-- Public ctors -->
858
859
860<!-- ========= CONSTRUCTOR DETAIL ======== -->
861<h2 class="api-section">Public constructors</h2>
862
863
864
865<A NAME="TypeTextAction(java.lang.String)"></A>
866
867<div class="api apilevel-">
868    <h3 class="api-name">TypeTextAction</h3>
869    <div class="api-level">
870      <div></div>
871
872
873
874    </div>
875<pre class="api-signature no-pretty-print">
876TypeTextAction (String stringToBeTyped)</pre>
877
878
879
880
881  <p>Constructs <code><a href="/reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></code> with given string. If the string is empty it results in no-op
882 (nothing is typed). By default this action sends a tap event to the center of the view to
883 attain focus before typing.</p>
884    <table class="responsive">
885    <tr><th colspan=2>Parameters</th></tr>
886      <tr>
887        <td><code>stringToBeTyped</code></td>
888        <td width="100%">
889          <code>String</code>:
890          String To be typed by <code><a href="/reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></code>
891</td>
892      </tr>
893    </table>
894
895</div>
896
897
898<A NAME="TypeTextAction(java.lang.String, boolean)"></A>
899
900<div class="api apilevel-">
901    <h3 class="api-name">TypeTextAction</h3>
902    <div class="api-level">
903      <div></div>
904
905
906
907    </div>
908<pre class="api-signature no-pretty-print">
909TypeTextAction (String stringToBeTyped,
910                boolean tapToFocus)</pre>
911
912
913
914
915  <p>Constructs <code><a href="/reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></code> with given string. If the string is empty it results in no-op
916 (nothing is typed).</p>
917    <table class="responsive">
918    <tr><th colspan=2>Parameters</th></tr>
919      <tr>
920        <td><code>stringToBeTyped</code></td>
921        <td width="100%">
922          <code>String</code>:
923          String To be typed by <code><a href="/reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></code></td>
924      </tr>
925      <tr>
926        <td><code>tapToFocus</code></td>
927        <td width="100%">
928          <code>boolean</code>:
929          indicates whether a tap should be sent to the underlying view before typing.
930</td>
931      </tr>
932    </table>
933
934</div>
935
936
937
938
939
940<!-- ========= CONSTRUCTOR DETAIL ======== -->
941<!-- Protected ctors -->
942
943
944
945<!-- ========= METHOD DETAIL ======== -->
946<!-- Public methdos -->
947
948<h2 class="api-section">Public methods</h2>
949
950
951
952<A NAME="getConstraints()"></A>
953
954<div class="api apilevel-">
955    <h3 class="api-name">getConstraints</h3>
956    <div class="api-level">
957      <div></div>
958
959
960
961    </div>
962<pre class="api-signature no-pretty-print">
963Matcher&lt;View&gt; getConstraints ()</pre>
964
965
966
967
968  <p>A mechanism for ViewActions to specify what type of views they can operate on.
969
970 A ViewAction can demand that the view passed to perform meets certain constraints. For example
971 it may want to ensure the view is already in the viewable physical screen of the device or is
972 of a certain type.</p>
973    <table class="responsive">
974      <tr><th colspan=2>Returns</th></tr>
975      <tr>
976        <td><code>Matcher&lt;View&gt;</code></td>
977        <td width="100%">a <a href="http://hamcrest.org/JavaHamcrest/javadoc/1.3/org/hamcrest/Matcher.html">
978     <code>Matcher</code></a> that will be tested prior to calling perform.
979</td>
980      </tr>
981    </table>
982
983</div>
984
985
986<A NAME="getDescription()"></A>
987
988<div class="api apilevel-">
989    <h3 class="api-name">getDescription</h3>
990    <div class="api-level">
991      <div></div>
992
993
994
995    </div>
996<pre class="api-signature no-pretty-print">
997String getDescription ()</pre>
998
999
1000
1001
1002  <p>Returns a description of the view action. The description should not be overly long and should
1003 fit nicely in a sentence like: "performing %description% action on view with id ..."
1004</p>
1005    <table class="responsive">
1006      <tr><th colspan=2>Returns</th></tr>
1007      <tr>
1008        <td><code>String</code></td>
1009        <td width="100%"><!-- no returns description in source --></td>
1010      </tr>
1011    </table>
1012
1013</div>
1014
1015
1016<A NAME="perform(android.support.test.espresso.UiController, android.view.View)"></A>
1017
1018<div class="api apilevel-">
1019    <h3 class="api-name">perform</h3>
1020    <div class="api-level">
1021      <div></div>
1022
1023
1024
1025    </div>
1026<pre class="api-signature no-pretty-print">
1027void perform (<a href="/reference/android/support/test/espresso/UiController.html">UiController</a> uiController,
1028                View view)</pre>
1029
1030
1031
1032
1033  <p>Performs this action on the given view.</p>
1034    <table class="responsive">
1035    <tr><th colspan=2>Parameters</th></tr>
1036      <tr>
1037        <td><code>uiController</code></td>
1038        <td width="100%">
1039          <code>UiController</code>:
1040          the controller to use to interact with the UI.</td>
1041      </tr>
1042      <tr>
1043        <td><code>view</code></td>
1044        <td width="100%">
1045          <code>View</code>:
1046          the view to act upon. never null.
1047</td>
1048      </tr>
1049    </table>
1050
1051</div>
1052
1053
1054
1055
1056
1057<!-- ========= METHOD DETAIL ======== -->
1058
1059
1060
1061<!-- ========= END OF CLASS DATA ========= -->
1062
1063</div><!-- end jd-content -->
1064
1065
1066
1067<div class="data-reference-resources-wrapper">
1068
1069  <ul data-reference-resources>
1070
1071
1072    <li><h2>Interfaces</h2>
1073      <ul>
1074          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/AdapterViewProtocol.html">AdapterViewProtocol</a></li>
1075          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/AdapterViewProtocol.DataFunction.html">AdapterViewProtocol.DataFunction</a></li>
1076          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/CoordinatesProvider.html">CoordinatesProvider</a></li>
1077          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/PrecisionDescriber.html">PrecisionDescriber</a></li>
1078          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/Swiper.html">Swiper</a></li>
1079          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/Tapper.html">Tapper</a></li>
1080      </ul>
1081    </li>
1082
1083    <li><h2>Classes</h2>
1084      <ul>
1085          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/AdapterDataLoaderAction.html">AdapterDataLoaderAction</a></li>
1086          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.html">AdapterViewProtocol.AdaptedData</a></li>
1087          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.Builder.html">AdapterViewProtocol.AdaptedData.Builder</a></li>
1088          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/AdapterViewProtocols.html">AdapterViewProtocols</a></li>
1089          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/CloseKeyboardAction.html">CloseKeyboardAction</a></li>
1090          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/EditorAction.html">EditorAction</a></li>
1091          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/EspressoKey.html">EspressoKey</a></li>
1092          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/EspressoKey.Builder.html">EspressoKey.Builder</a></li>
1093          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/GeneralClickAction.html">GeneralClickAction</a></li>
1094          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/GeneralSwipeAction.html">GeneralSwipeAction</a></li>
1095          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/KeyEventAction.html">KeyEventAction</a></li>
1096          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/MotionEvents.html">MotionEvents</a></li>
1097          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/MotionEvents.DownResultHolder.html">MotionEvents.DownResultHolder</a></li>
1098          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/OpenLinkAction.html">OpenLinkAction</a></li>
1099          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/ReplaceTextAction.html">ReplaceTextAction</a></li>
1100          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/ScrollToAction.html">ScrollToAction</a></li>
1101          <li class="selected api apilevel-"><a href="/reference/android/support/test/espresso/action/TypeTextAction.html">TypeTextAction</a></li>
1102          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/ViewActions.html">ViewActions</a></li>
1103      </ul>
1104    </li>
1105
1106    <li><h2>Enums</h2>
1107      <ul>
1108          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/GeneralLocation.html">GeneralLocation</a></li>
1109          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/Press.html">Press</a></li>
1110          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/Swipe.html">Swipe</a></li>
1111          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/Swiper.Status.html">Swiper.Status</a></li>
1112          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/Tap.html">Tap</a></li>
1113          <li class="api apilevel-"><a href="/reference/android/support/test/espresso/action/Tapper.Status.html">Tapper.Status</a></li>
1114      </ul>
1115    </li>
1116
1117
1118  </ul>
1119
1120</div>
1121
1122
1123
1124</body>
1125</html>
1126