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>Configurator</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 | <a href="#inhmethods">Inherited Methods</a> 196 197| <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">Configurator</h1> 207<p> 208<code class="api-signature"> 209 public 210 211 final 212 213 class 214 Configurator 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"> ↳</td> 246 247 <td colspan="1" class="jd-inheritance-class-cell">android.support.test.uiautomator.Configurator 248 </td> 249 </tr> 250 251 252</table> 253 254 255 256 257<br><hr> 258 259 260 <p>Allows you to set key parameters for running uiautomator tests. The new 261 settings take effect immediately and can be changed any time during a test run. 262 263 To modify parameters using Configurator, first obtain an instance by calling 264 <code><a href="/reference/android/support/test/uiautomator/Configurator.html#getInstance()">getInstance()</a></code>. As a best practice, make sure you always save 265 the original value of any parameter that you are modifying. After running your 266 tests with the modified parameters, make sure to also restore 267 the original parameter values, otherwise this will impact other tests cases.</p> 268 269 270 271 272 273 274 275<h2 class="api-section">Summary</h2> 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303<!-- ========== METHOD SUMMARY =========== --> 304<table id="pubmethods" class="responsive methods"> 305<tr><th colspan="2"><h3>Public methods</h3></th></tr> 306 307 308 309 310 <tr class="api apilevel-" > 311 312 313 <td><code> 314 315 316 317 318 319 long</code> 320 </td> 321 322 <td width="100%"> 323 <code> 324 <a href="/reference/android/support/test/uiautomator/Configurator.html#getActionAcknowledgmentTimeout()">getActionAcknowledgmentTimeout</a>() 325 </code> 326 327 <p>Gets the current timeout for waiting for an acknowledgment of generic 328 uiautomator actions, such as clicks, text setting, and menu presses. 329 330 331</p> 332 333 </td> 334 </tr> 335 336 337 338 <tr class="api apilevel-" > 339 340 341 <td><code> 342 343 344 static 345 346 347 <a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code> 348 </td> 349 350 <td width="100%"> 351 <code> 352 <a href="/reference/android/support/test/uiautomator/Configurator.html#getInstance()">getInstance</a>() 353 </code> 354 355 <p>Retrieves a singleton instance of Configurator. 356 357 358</p> 359 360 </td> 361 </tr> 362 363 364 365 <tr class="api apilevel-" > 366 367 368 <td><code> 369 370 371 372 373 374 long</code> 375 </td> 376 377 <td width="100%"> 378 <code> 379 <a href="/reference/android/support/test/uiautomator/Configurator.html#getKeyInjectionDelay()">getKeyInjectionDelay</a>() 380 </code> 381 382 <p>Gets the current delay between key presses when injecting text input. 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 long</code> 402 </td> 403 404 <td width="100%"> 405 <code> 406 <a href="/reference/android/support/test/uiautomator/Configurator.html#getScrollAcknowledgmentTimeout()">getScrollAcknowledgmentTimeout</a>() 407 </code> 408 409 <p>Gets the timeout for waiting for an acknowledgement of an 410 uiautomtor scroll swipe action. 411 412 413</p> 414 415 </td> 416 </tr> 417 418 419 420 <tr class="api apilevel-" > 421 422 423 <td><code> 424 425 426 427 428 429 int</code> 430 </td> 431 432 <td width="100%"> 433 <code> 434 <a href="/reference/android/support/test/uiautomator/Configurator.html#getToolType()">getToolType</a>() 435 </code> 436 437 <p>Gets the current tool type to use for motion events. 438 439 440</p> 441 442 </td> 443 </tr> 444 445 446 447 <tr class="api apilevel-" > 448 449 450 <td><code> 451 452 453 454 455 456 long</code> 457 </td> 458 459 <td width="100%"> 460 <code> 461 <a href="/reference/android/support/test/uiautomator/Configurator.html#getWaitForIdleTimeout()">getWaitForIdleTimeout</a>() 462 </code> 463 464 <p>Gets the current timeout used for waiting for the user interface to go 465 into an idle state. 466 467 468</p> 469 470 </td> 471 </tr> 472 473 474 475 <tr class="api apilevel-" > 476 477 478 <td><code> 479 480 481 482 483 484 long</code> 485 </td> 486 487 <td width="100%"> 488 <code> 489 <a href="/reference/android/support/test/uiautomator/Configurator.html#getWaitForSelectorTimeout()">getWaitForSelectorTimeout</a>() 490 </code> 491 492 <p>Gets the current timeout for waiting for a widget to become visible in 493 the user interface so that it can be matched by a selector. 494 495 496</p> 497 498 </td> 499 </tr> 500 501 502 503 <tr class="api apilevel-" > 504 505 506 <td><code> 507 508 509 510 511 512 <a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code> 513 </td> 514 515 <td width="100%"> 516 <code> 517 <a href="/reference/android/support/test/uiautomator/Configurator.html#setActionAcknowledgmentTimeout(long)">setActionAcknowledgmentTimeout</a>(long timeout) 518 </code> 519 520 <p>Sets the timeout for waiting for an acknowledgment of generic uiautomator 521 actions, such as clicks, text setting, and menu presses. 522 523 524</p> 525 526 </td> 527 </tr> 528 529 530 531 <tr class="api apilevel-" > 532 533 534 <td><code> 535 536 537 538 539 540 <a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code> 541 </td> 542 543 <td width="100%"> 544 <code> 545 <a href="/reference/android/support/test/uiautomator/Configurator.html#setKeyInjectionDelay(long)">setKeyInjectionDelay</a>(long delay) 546 </code> 547 548 <p>Sets a delay between key presses when injecting text input. 549 550 551</p> 552 553 </td> 554 </tr> 555 556 557 558 <tr class="api apilevel-" > 559 560 561 <td><code> 562 563 564 565 566 567 <a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code> 568 </td> 569 570 <td width="100%"> 571 <code> 572 <a href="/reference/android/support/test/uiautomator/Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout</a>(long timeout) 573 </code> 574 575 <p>Sets the timeout for waiting for an acknowledgement of an 576 uiautomtor scroll swipe action. 577 578 579</p> 580 581 </td> 582 </tr> 583 584 585 586 <tr class="api apilevel-" > 587 588 589 <td><code> 590 591 592 593 594 595 <a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code> 596 </td> 597 598 <td width="100%"> 599 <code> 600 <a href="/reference/android/support/test/uiautomator/Configurator.html#setToolType(int)">setToolType</a>(int toolType) 601 </code> 602 603 <p>Sets the current tool type to use for motion events. 604 605 606</p> 607 608 </td> 609 </tr> 610 611 612 613 <tr class="api apilevel-" > 614 615 616 <td><code> 617 618 619 620 621 622 <a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code> 623 </td> 624 625 <td width="100%"> 626 <code> 627 <a href="/reference/android/support/test/uiautomator/Configurator.html#setWaitForIdleTimeout(long)">setWaitForIdleTimeout</a>(long timeout) 628 </code> 629 630 <p>Sets the timeout for waiting for the user interface to go into an idle 631 state before starting a uiautomator action. 632 633 634</p> 635 636 </td> 637 </tr> 638 639 640 641 <tr class="api apilevel-" > 642 643 644 <td><code> 645 646 647 648 649 650 <a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code> 651 </td> 652 653 <td width="100%"> 654 <code> 655 <a href="/reference/android/support/test/uiautomator/Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout</a>(long timeout) 656 </code> 657 658 <p>Sets the timeout for waiting for a widget to become visible in the user 659 interface so that it can be matched by a selector. 660 661 662</p> 663 664 </td> 665 </tr> 666 667 668 669</table> 670 671 672 673 674 675 676 677<!-- ========== METHOD SUMMARY =========== --> 678<table id="inhmethods" class="methods inhtable"> 679<tr><th><h3>Inherited methods</h3></th></tr> 680 681 682<tr class="api apilevel-" > 683<td colspan="2"> 684 685 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 686 ><img height="34" id="inherited-methods-java.lang.Object-trigger" 687 src="/assets/images/styles/disclosure_down.png" 688 class="jd-expando-trigger-img" /></a>From 689class 690<code> 691 692 java.lang.Object 693 694</code> 695<div id="inherited-methods-java.lang.Object"> 696 <div id="inherited-methods-java.lang.Object-list" 697 class="jd-inheritedlinks"> 698 </div> 699 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 700 <table class="jd-sumtable-expando responsive"> 701 702 703 704 705 <tr class="api apilevel-" > 706 707 708 <td><code> 709 710 711 712 713 714 Object</code> 715 </td> 716 717 <td width="100%"> 718 <code> 719 clone() 720 </code> 721 722 </td> 723 </tr> 724 725 726 727 <tr class="api apilevel-" > 728 729 730 <td><code> 731 732 733 734 735 736 boolean</code> 737 </td> 738 739 <td width="100%"> 740 <code> 741 equals(Object arg0) 742 </code> 743 744 </td> 745 </tr> 746 747 748 749 <tr class="api apilevel-" > 750 751 752 <td><code> 753 754 755 756 757 758 void</code> 759 </td> 760 761 <td width="100%"> 762 <code> 763 finalize() 764 </code> 765 766 </td> 767 </tr> 768 769 770 771 <tr class="api apilevel-" > 772 773 774 <td><code> 775 776 777 778 final 779 780 Class<?></code> 781 </td> 782 783 <td width="100%"> 784 <code> 785 getClass() 786 </code> 787 788 </td> 789 </tr> 790 791 792 793 <tr class="api apilevel-" > 794 795 796 <td><code> 797 798 799 800 801 802 int</code> 803 </td> 804 805 <td width="100%"> 806 <code> 807 hashCode() 808 </code> 809 810 </td> 811 </tr> 812 813 814 815 <tr class="api apilevel-" > 816 817 818 <td><code> 819 820 821 822 final 823 824 void</code> 825 </td> 826 827 <td width="100%"> 828 <code> 829 notify() 830 </code> 831 832 </td> 833 </tr> 834 835 836 837 <tr class="api apilevel-" > 838 839 840 <td><code> 841 842 843 844 final 845 846 void</code> 847 </td> 848 849 <td width="100%"> 850 <code> 851 notifyAll() 852 </code> 853 854 </td> 855 </tr> 856 857 858 859 <tr class="api apilevel-" > 860 861 862 <td><code> 863 864 865 866 867 868 String</code> 869 </td> 870 871 <td width="100%"> 872 <code> 873 toString() 874 </code> 875 876 </td> 877 </tr> 878 879 880 881 <tr class="api apilevel-" > 882 883 884 <td><code> 885 886 887 888 final 889 890 void</code> 891 </td> 892 893 <td width="100%"> 894 <code> 895 wait(long arg0, int arg1) 896 </code> 897 898 </td> 899 </tr> 900 901 902 903 <tr class="api apilevel-" > 904 905 906 <td><code> 907 908 909 910 final 911 912 void</code> 913 </td> 914 915 <td width="100%"> 916 <code> 917 wait(long arg0) 918 </code> 919 920 </td> 921 </tr> 922 923 924 925 <tr class="api apilevel-" > 926 927 928 <td><code> 929 930 931 932 final 933 934 void</code> 935 </td> 936 937 <td width="100%"> 938 <code> 939 wait() 940 </code> 941 942 </td> 943 </tr> 944 945 946 947 </table> 948 </div> 949</div> 950</td></tr> 951 952 953</table> 954 955 956 957<!-- XML Attributes --> 958 959 960<!-- Enum Values --> 961 962 963<!-- Constants --> 964 965 966<!-- Fields --> 967 968 969<!-- Public ctors --> 970 971 972 973<!-- ========= CONSTRUCTOR DETAIL ======== --> 974<!-- Protected ctors --> 975 976 977 978<!-- ========= METHOD DETAIL ======== --> 979<!-- Public methdos --> 980 981<h2 class="api-section">Public methods</h2> 982 983 984 985<A NAME="getActionAcknowledgmentTimeout()"></A> 986 987<div class="api apilevel-"> 988 <h3 class="api-name">getActionAcknowledgmentTimeout</h3> 989 <div class="api-level"> 990 <div></div> 991 992 993 994 </div> 995<pre class="api-signature no-pretty-print"> 996long getActionAcknowledgmentTimeout ()</pre> 997 998 999 1000 1001 <p>Gets the current timeout for waiting for an acknowledgment of generic 1002 uiautomator actions, such as clicks, text setting, and menu presses. 1003 1004 The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>, 1005 corresponding to an action, that lets the framework determine if the 1006 action was successful. Generally, this timeout should not be modified. 1007 See <code><a href="/reference/android/support/test/uiautomator/UiObject.html">UiObject</a></code></p> 1008 1009 <table class="responsive"> 1010 <tr><th colspan=2>Returns</th></tr> 1011 <tr> 1012 <td><code>long</code></td> 1013 <td width="100%">current timeout in milliseconds</td> 1014 </tr> 1015 </table> 1016 1017</div> 1018 1019 1020<A NAME="getInstance()"></A> 1021 1022<div class="api apilevel-"> 1023 <h3 class="api-name">getInstance</h3> 1024 <div class="api-level"> 1025 <div></div> 1026 1027 1028 1029 </div> 1030<pre class="api-signature no-pretty-print"> 1031<a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a> getInstance ()</pre> 1032 1033 1034 1035 1036 <p>Retrieves a singleton instance of Configurator.</p> 1037 1038 <table class="responsive"> 1039 <tr><th colspan=2>Returns</th></tr> 1040 <tr> 1041 <td><code><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code></td> 1042 <td width="100%">Configurator instance</td> 1043 </tr> 1044 </table> 1045 1046</div> 1047 1048 1049<A NAME="getKeyInjectionDelay()"></A> 1050 1051<div class="api apilevel-"> 1052 <h3 class="api-name">getKeyInjectionDelay</h3> 1053 <div class="api-level"> 1054 <div></div> 1055 1056 1057 1058 </div> 1059<pre class="api-signature no-pretty-print"> 1060long getKeyInjectionDelay ()</pre> 1061 1062 1063 1064 1065 <p>Gets the current delay between key presses when injecting text input. 1066 See <code><a href="/reference/android/support/test/uiautomator/UiObject.html#setText(java.lang.String)">setText(String)</a></code></p> 1067 1068 <table class="responsive"> 1069 <tr><th colspan=2>Returns</th></tr> 1070 <tr> 1071 <td><code>long</code></td> 1072 <td width="100%">current delay in milliseconds</td> 1073 </tr> 1074 </table> 1075 1076</div> 1077 1078 1079<A NAME="getScrollAcknowledgmentTimeout()"></A> 1080 1081<div class="api apilevel-"> 1082 <h3 class="api-name">getScrollAcknowledgmentTimeout</h3> 1083 <div class="api-level"> 1084 <div></div> 1085 1086 1087 1088 </div> 1089<pre class="api-signature no-pretty-print"> 1090long getScrollAcknowledgmentTimeout ()</pre> 1091 1092 1093 1094 1095 <p>Gets the timeout for waiting for an acknowledgement of an 1096 uiautomtor scroll swipe action. 1097 1098 The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>, 1099 corresponding to the scroll action, that lets the framework determine if 1100 the scroll action was successful. Generally, this timeout should not be modified. 1101 See <code><a href="/reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></code></p> 1102 1103 <table class="responsive"> 1104 <tr><th colspan=2>Returns</th></tr> 1105 <tr> 1106 <td><code>long</code></td> 1107 <td width="100%">current timeout in milliseconds</td> 1108 </tr> 1109 </table> 1110 1111</div> 1112 1113 1114<A NAME="getToolType()"></A> 1115 1116<div class="api apilevel-"> 1117 <h3 class="api-name">getToolType</h3> 1118 <div class="api-level"> 1119 <div></div> 1120 1121 1122 1123 </div> 1124<pre class="api-signature no-pretty-print"> 1125int getToolType ()</pre> 1126 1127 1128 1129 1130 <p>Gets the current tool type to use for motion events.</p> 1131 <table class="responsive"> 1132 <tr><th colspan=2>Returns</th></tr> 1133 <tr> 1134 <td><code>int</code></td> 1135 <td width="100%"><!-- no returns description in source --></td> 1136 </tr> 1137 </table> 1138 <div> 1139 <p><b>See also:</b></p> 1140 <ul class="nolist"><li><code><a href="/reference/android/view/MotionEvent.html#getToolType(int)">getToolType(int)</a></code></li> 1141 </ul> 1142 </div> 1143 1144</div> 1145 1146 1147<A NAME="getWaitForIdleTimeout()"></A> 1148 1149<div class="api apilevel-"> 1150 <h3 class="api-name">getWaitForIdleTimeout</h3> 1151 <div class="api-level"> 1152 <div></div> 1153 1154 1155 1156 </div> 1157<pre class="api-signature no-pretty-print"> 1158long getWaitForIdleTimeout ()</pre> 1159 1160 1161 1162 1163 <p>Gets the current timeout used for waiting for the user interface to go 1164 into an idle state. 1165 1166 By default, all core uiautomator objects except <code><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></code> will perform 1167 this wait before starting to search for the widget specified by the 1168 object's <code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>. Once the idle state is detected or the 1169 timeout elapses (whichever occurs first), the object will start to wait 1170 for the selector to find a match. 1171 See <code><a href="/reference/android/support/test/uiautomator/Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code></p> 1172 1173 <table class="responsive"> 1174 <tr><th colspan=2>Returns</th></tr> 1175 <tr> 1176 <td><code>long</code></td> 1177 <td width="100%">Current timeout value in milliseconds</td> 1178 </tr> 1179 </table> 1180 1181</div> 1182 1183 1184<A NAME="getWaitForSelectorTimeout()"></A> 1185 1186<div class="api apilevel-"> 1187 <h3 class="api-name">getWaitForSelectorTimeout</h3> 1188 <div class="api-level"> 1189 <div></div> 1190 1191 1192 1193 </div> 1194<pre class="api-signature no-pretty-print"> 1195long getWaitForSelectorTimeout ()</pre> 1196 1197 1198 1199 1200 <p>Gets the current timeout for waiting for a widget to become visible in 1201 the user interface so that it can be matched by a selector. 1202 1203 Because user interface content is dynamic, sometimes a widget may not 1204 be visible immediately and won't be detected by a selector. This timeout 1205 allows the uiautomator framework to wait for a match to be found, up until 1206 the timeout elapses.</p> 1207 1208 <table class="responsive"> 1209 <tr><th colspan=2>Returns</th></tr> 1210 <tr> 1211 <td><code>long</code></td> 1212 <td width="100%">Current timeout value in milliseconds</td> 1213 </tr> 1214 </table> 1215 1216</div> 1217 1218 1219<A NAME="setActionAcknowledgmentTimeout(long)"></A> 1220 1221<div class="api apilevel-"> 1222 <h3 class="api-name">setActionAcknowledgmentTimeout</h3> 1223 <div class="api-level"> 1224 <div></div> 1225 1226 1227 1228 </div> 1229<pre class="api-signature no-pretty-print"> 1230<a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a> setActionAcknowledgmentTimeout (long timeout)</pre> 1231 1232 1233 1234 1235 <p>Sets the timeout for waiting for an acknowledgment of generic uiautomator 1236 actions, such as clicks, text setting, and menu presses. 1237 1238 The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>, 1239 corresponding to an action, that lets the framework determine if the 1240 action was successful. Generally, this timeout should not be modified. 1241 See <code><a href="/reference/android/support/test/uiautomator/UiObject.html">UiObject</a></code></p> 1242 1243 <table class="responsive"> 1244 <tr><th colspan=2>Parameters</th></tr> 1245 <tr> 1246 <td><code>timeout</code></td> 1247 <td width="100%"> 1248 <code>long</code>: 1249 Timeout value in milliseconds</td> 1250 </tr> 1251 </table> 1252 <table class="responsive"> 1253 <tr><th colspan=2>Returns</th></tr> 1254 <tr> 1255 <td><code><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code></td> 1256 <td width="100%">self</td> 1257 </tr> 1258 </table> 1259 1260</div> 1261 1262 1263<A NAME="setKeyInjectionDelay(long)"></A> 1264 1265<div class="api apilevel-"> 1266 <h3 class="api-name">setKeyInjectionDelay</h3> 1267 <div class="api-level"> 1268 <div></div> 1269 1270 1271 1272 </div> 1273<pre class="api-signature no-pretty-print"> 1274<a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a> setKeyInjectionDelay (long delay)</pre> 1275 1276 1277 1278 1279 <p>Sets a delay between key presses when injecting text input. 1280 See <code><a href="/reference/android/support/test/uiautomator/UiObject.html#setText(java.lang.String)">setText(String)</a></code></p> 1281 1282 <table class="responsive"> 1283 <tr><th colspan=2>Parameters</th></tr> 1284 <tr> 1285 <td><code>delay</code></td> 1286 <td width="100%"> 1287 <code>long</code>: 1288 Delay value in milliseconds</td> 1289 </tr> 1290 </table> 1291 <table class="responsive"> 1292 <tr><th colspan=2>Returns</th></tr> 1293 <tr> 1294 <td><code><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code></td> 1295 <td width="100%">self</td> 1296 </tr> 1297 </table> 1298 1299</div> 1300 1301 1302<A NAME="setScrollAcknowledgmentTimeout(long)"></A> 1303 1304<div class="api apilevel-"> 1305 <h3 class="api-name">setScrollAcknowledgmentTimeout</h3> 1306 <div class="api-level"> 1307 <div></div> 1308 1309 1310 1311 </div> 1312<pre class="api-signature no-pretty-print"> 1313<a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a> setScrollAcknowledgmentTimeout (long timeout)</pre> 1314 1315 1316 1317 1318 <p>Sets the timeout for waiting for an acknowledgement of an 1319 uiautomtor scroll swipe action. 1320 1321 The acknowledgment is an <a href="http://developer.android.com/reference/android/view/accessibility/AccessibilityEvent.html">AccessibilityEvent</a>, 1322 corresponding to the scroll action, that lets the framework determine if 1323 the scroll action was successful. Generally, this timeout should not be modified. 1324 See <code><a href="/reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></code></p> 1325 1326 <table class="responsive"> 1327 <tr><th colspan=2>Parameters</th></tr> 1328 <tr> 1329 <td><code>timeout</code></td> 1330 <td width="100%"> 1331 <code>long</code>: 1332 Timeout value in milliseconds</td> 1333 </tr> 1334 </table> 1335 <table class="responsive"> 1336 <tr><th colspan=2>Returns</th></tr> 1337 <tr> 1338 <td><code><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code></td> 1339 <td width="100%">self</td> 1340 </tr> 1341 </table> 1342 1343</div> 1344 1345 1346<A NAME="setToolType(int)"></A> 1347 1348<div class="api apilevel-"> 1349 <h3 class="api-name">setToolType</h3> 1350 <div class="api-level"> 1351 <div></div> 1352 1353 1354 1355 </div> 1356<pre class="api-signature no-pretty-print"> 1357<a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a> setToolType (int toolType)</pre> 1358 1359 1360 1361 1362 <p>Sets the current tool type to use for motion events.</p> 1363 <table class="responsive"> 1364 <tr><th colspan=2>Parameters</th></tr> 1365 <tr> 1366 <td><code>toolType</code></td> 1367 <td width="100%"> 1368 <code>int</code> 1369 <!-- no parameter comment --></td> 1370 </tr> 1371 </table> 1372 <table class="responsive"> 1373 <tr><th colspan=2>Returns</th></tr> 1374 <tr> 1375 <td><code><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code></td> 1376 <td width="100%"><!-- no returns description in source --></td> 1377 </tr> 1378 </table> 1379 <div> 1380 <p><b>See also:</b></p> 1381 <ul class="nolist"><li><code><a href="/reference/android/view/MotionEvent.html#getToolType(int)">getToolType(int)</a></code></li> 1382 </ul> 1383 </div> 1384 1385</div> 1386 1387 1388<A NAME="setWaitForIdleTimeout(long)"></A> 1389 1390<div class="api apilevel-"> 1391 <h3 class="api-name">setWaitForIdleTimeout</h3> 1392 <div class="api-level"> 1393 <div></div> 1394 1395 1396 1397 </div> 1398<pre class="api-signature no-pretty-print"> 1399<a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a> setWaitForIdleTimeout (long timeout)</pre> 1400 1401 1402 1403 1404 <p>Sets the timeout for waiting for the user interface to go into an idle 1405 state before starting a uiautomator action. 1406 1407 By default, all core uiautomator objects except <code><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></code> will perform 1408 this wait before starting to search for the widget specified by the 1409 object's <code><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code>. Once the idle state is detected or the 1410 timeout elapses (whichever occurs first), the object will start to wait 1411 for the selector to find a match. 1412 See <code><a href="/reference/android/support/test/uiautomator/Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code></p> 1413 1414 <table class="responsive"> 1415 <tr><th colspan=2>Parameters</th></tr> 1416 <tr> 1417 <td><code>timeout</code></td> 1418 <td width="100%"> 1419 <code>long</code>: 1420 Timeout value in milliseconds</td> 1421 </tr> 1422 </table> 1423 <table class="responsive"> 1424 <tr><th colspan=2>Returns</th></tr> 1425 <tr> 1426 <td><code><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code></td> 1427 <td width="100%">self</td> 1428 </tr> 1429 </table> 1430 1431</div> 1432 1433 1434<A NAME="setWaitForSelectorTimeout(long)"></A> 1435 1436<div class="api apilevel-"> 1437 <h3 class="api-name">setWaitForSelectorTimeout</h3> 1438 <div class="api-level"> 1439 <div></div> 1440 1441 1442 1443 </div> 1444<pre class="api-signature no-pretty-print"> 1445<a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a> setWaitForSelectorTimeout (long timeout)</pre> 1446 1447 1448 1449 1450 <p>Sets the timeout for waiting for a widget to become visible in the user 1451 interface so that it can be matched by a selector. 1452 1453 Because user interface content is dynamic, sometimes a widget may not 1454 be visible immediately and won't be detected by a selector. This timeout 1455 allows the uiautomator framework to wait for a match to be found, up until 1456 the timeout elapses.</p> 1457 1458 <table class="responsive"> 1459 <tr><th colspan=2>Parameters</th></tr> 1460 <tr> 1461 <td><code>timeout</code></td> 1462 <td width="100%"> 1463 <code>long</code>: 1464 Timeout value in milliseconds.</td> 1465 </tr> 1466 </table> 1467 <table class="responsive"> 1468 <tr><th colspan=2>Returns</th></tr> 1469 <tr> 1470 <td><code><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></code></td> 1471 <td width="100%">self</td> 1472 </tr> 1473 </table> 1474 1475</div> 1476 1477 1478 1479 1480 1481<!-- ========= METHOD DETAIL ======== --> 1482 1483 1484 1485<!-- ========= END OF CLASS DATA ========= --> 1486 1487</div><!-- end jd-content --> 1488 1489 1490 1491<div class="data-reference-resources-wrapper"> 1492 1493 <ul data-reference-resources> 1494 1495 1496 <li><h2>Interfaces</h2> 1497 <ul> 1498 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a></li> 1499 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiWatcher.html">UiWatcher</a></li> 1500 </ul> 1501 </li> 1502 1503 <li><h2>Classes</h2> 1504 <ul> 1505 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/By.html">By</a></li> 1506 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/BySelector.html">BySelector</a></li> 1507 <li class="selected api apilevel-"><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></li> 1508 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/EventCondition.html">EventCondition</a></li> 1509 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/SearchCondition.html">SearchCondition</a></li> 1510 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner.html">UiAutomatorInstrumentationTestRunner</a></li> 1511 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html">UiAutomatorTestCase</a></li> 1512 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiCollection.html">UiCollection</a></li> 1513 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></li> 1514 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject.html">UiObject</a></li> 1515 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2.html">UiObject2</a></li> 1516 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2Condition.html">UiObject2Condition</a></li> 1517 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></li> 1518 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></li> 1519 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Until.html">Until</a></li> 1520 </ul> 1521 </li> 1522 1523 <li><h2>Enums</h2> 1524 <ul> 1525 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Direction.html">Direction</a></li> 1526 </ul> 1527 </li> 1528 1529 <li><h2>Exceptions</h2> 1530 <ul> 1531 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/StaleObjectException.html">StaleObjectException</a></li> 1532 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></li> 1533 </ul> 1534 </li> 1535 1536 </ul> 1537 1538</div> 1539 1540 1541 1542</body> 1543</html> 1544