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>UiAutomatorTestCase</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 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204<div class="sum-details-links"> 205 206Summary: 207 208 209 210 211 212 213 214 215 216 <a href="#pubctors">Ctors</a> 217 218 219 220 221 | <a href="#pubmethods">Methods</a> 222 223 224 225 226 | <a href="#inhmethods">Inherited Methods</a> 227 228| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 229 230</div><!-- end sum-details-links --> 231</div><!-- end api-info-block --> 232 233<div class="api apilevel-" id="jd-content"> 234 235<!-- ======== START OF CLASS DATA ======== --> 236 237<h1 class="api-title">UiAutomatorTestCase</h1> 238<p> 239<code class="api-signature"> 240 public 241 242 243 244 class 245 UiAutomatorTestCase 246</code> 247<br> 248 249 250<code class="api-signature"> 251 252 253 254</code> 255 256<code class="api-signature"> 257 258 259 260</code> 261 262<code class="api-signature"> 263 264 265 266</code> 267 268<code class="api-signature"> 269 270 extends InstrumentationTestCase 271 272 273 274</code> 275 276<code class="api-signature"> 277 278 279 280</code> 281 282</p><table class="jd-inheritance-table"> 283 284 285 <tr> 286 287 <td colspan="5" class="jd-inheritance-class-cell">java.lang.Object 288 </td> 289 </tr> 290 291 292 <tr> 293 294 <td class="jd-inheritance-space"> ↳</td> 295 296 <td colspan="4" class="jd-inheritance-class-cell">junit.framework.Assert 297 </td> 298 </tr> 299 300 301 <tr> 302 303 <td class="jd-inheritance-space"> </td> 304 305 <td class="jd-inheritance-space"> ↳</td> 306 307 <td colspan="3" class="jd-inheritance-class-cell">junit.framework.TestCase 308 </td> 309 </tr> 310 311 312 <tr> 313 314 <td class="jd-inheritance-space"> </td> 315 316 <td class="jd-inheritance-space"> </td> 317 318 <td class="jd-inheritance-space"> ↳</td> 319 320 <td colspan="2" class="jd-inheritance-class-cell">android.test.InstrumentationTestCase 321 </td> 322 </tr> 323 324 325 <tr> 326 327 <td class="jd-inheritance-space"> </td> 328 329 <td class="jd-inheritance-space"> </td> 330 331 <td class="jd-inheritance-space"> </td> 332 333 <td class="jd-inheritance-space"> ↳</td> 334 335 <td colspan="1" class="jd-inheritance-class-cell">android.support.test.uiautomator.UiAutomatorTestCase 336 </td> 337 </tr> 338 339 340</table> 341 342 343 344 345<br><hr><p> 346 <p class="caution"><strong> 347 This class is deprecated.</strong><br/> 348 It is no longer necessary to extend UiAutomatorTestCase. You can use 349 <code><a href="/reference/android/support/test/uiautomator/UiDevice.html#getInstance(android.app.Instrumentation)">getInstance(Instrumentation)</a></code> from any test class as long as you have access to 350 an <code><a href="/reference/android/app/Instrumentation.html">Instrumentation</a></code> instance. 351 352 </p> 353 354 355 <p>UI Automator test case that is executed on the device.</p> 356 357 358 359 360 361 362 363<h2 class="api-section">Summary</h2> 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387<!-- ======== CONSTRUCTOR SUMMARY ======== --> 388<table id="pubctors" class="responsive constructors"> 389<tr><th colspan="2"><h3>Public constructors</h3></th></tr> 390 391 392 393 394 <tr class="api apilevel-" > 395 396 397 <td width="100%"> 398 <code> 399 <a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html#UiAutomatorTestCase()">UiAutomatorTestCase</a>() 400 </code> 401 402 </td> 403 </tr> 404 405 406 407</table> 408 409 410 411 412 413 414<!-- ========== METHOD SUMMARY =========== --> 415<table id="pubmethods" class="responsive methods"> 416<tr><th colspan="2"><h3>Public methods</h3></th></tr> 417 418 419 420 421 <tr class="api apilevel-" > 422 423 424 <td><code> 425 426 427 428 429 430 <a href="/reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a></code> 431 </td> 432 433 <td width="100%"> 434 <code> 435 <a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html#getAutomationSupport()">getAutomationSupport</a>() 436 </code> 437 438 <p><em> 439 This method is deprecated. 440 Use <code><a href="/reference/android/app/Instrumentation.html#sendStatus(int, android.os.Bundle)">sendStatus(int, Bundle)</a></code> instead 441</em> 442 443 444</p> 445 446 </td> 447 </tr> 448 449 450 451 <tr class="api apilevel-" > 452 453 454 <td><code> 455 456 457 458 459 460 Bundle</code> 461 </td> 462 463 <td width="100%"> 464 <code> 465 <a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html#getParams()">getParams</a>() 466 </code> 467 468 <p>Get command line parameters. 469 470 471</p> 472 473 </td> 474 </tr> 475 476 477 478 <tr class="api apilevel-" > 479 480 481 <td><code> 482 483 484 485 486 487 <a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></code> 488 </td> 489 490 <td width="100%"> 491 <code> 492 <a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html#getUiDevice()">getUiDevice</a>() 493 </code> 494 495 <p>Get current instance of <code><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></code>. 496 497 498</p> 499 500 </td> 501 </tr> 502 503 504 505 <tr class="api apilevel-" > 506 507 508 <td><code> 509 510 511 512 513 514 void</code> 515 </td> 516 517 <td width="100%"> 518 <code> 519 <a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html#sleep(long)">sleep</a>(long ms) 520 </code> 521 522 <p><em> 523 This method is deprecated. 524 Use <code><a href="/reference/android/os/SystemClock.html#sleep(long)">sleep(long)</a></code> instead. 525</em> 526 527 528</p> 529 530 </td> 531 </tr> 532 533 534 535</table> 536 537 538 539 540 541 542 543<!-- ========== METHOD SUMMARY =========== --> 544<table id="inhmethods" class="methods inhtable"> 545<tr><th><h3>Inherited methods</h3></th></tr> 546 547 548<tr class="api apilevel-" > 549<td colspan="2"> 550 551 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.test.InstrumentationTestCase" class="jd-expando-trigger closed" 552 ><img height="34" id="inherited-methods-android.test.InstrumentationTestCase-trigger" 553 src="/assets/images/styles/disclosure_down.png" 554 class="jd-expando-trigger-img" /></a>From 555class 556<code> 557 558 android.test.InstrumentationTestCase 559 560</code> 561<div id="inherited-methods-android.test.InstrumentationTestCase"> 562 <div id="inherited-methods-android.test.InstrumentationTestCase-list" 563 class="jd-inheritedlinks"> 564 </div> 565 <div id="inherited-methods-android.test.InstrumentationTestCase-summary" style="display: none;"> 566 <table class="jd-sumtable-expando responsive"> 567 568 569 570 571 <tr class="api apilevel-" > 572 573 574 <td><code> 575 576 577 578 579 580 Instrumentation</code> 581 </td> 582 583 <td width="100%"> 584 <code> 585 getInstrumentation() 586 </code> 587 588 </td> 589 </tr> 590 591 592 593 <tr class="api apilevel-" > 594 595 596 <td><code> 597 598 599 600 601 602 void</code> 603 </td> 604 605 <td width="100%"> 606 <code> 607 injectInsrumentation(Instrumentation arg0) 608 </code> 609 610 </td> 611 </tr> 612 613 614 615 <tr class="api apilevel-" > 616 617 618 <td><code> 619 620 621 622 623 624 void</code> 625 </td> 626 627 <td width="100%"> 628 <code> 629 injectInstrumentation(Instrumentation arg0) 630 </code> 631 632 </td> 633 </tr> 634 635 636 637 <tr class="api apilevel-" > 638 639 640 <td><code> 641 642 643 644 final 645 <T extends Activity> 646 T</code> 647 </td> 648 649 <td width="100%"> 650 <code> 651 launchActivity(String arg0, Class<T> arg1, Bundle arg2) 652 </code> 653 654 </td> 655 </tr> 656 657 658 659 <tr class="api apilevel-" > 660 661 662 <td><code> 663 664 665 666 final 667 <T extends Activity> 668 T</code> 669 </td> 670 671 <td width="100%"> 672 <code> 673 launchActivityWithIntent(String arg0, Class<T> arg1, Intent arg2) 674 </code> 675 676 </td> 677 </tr> 678 679 680 681 <tr class="api apilevel-" > 682 683 684 <td><code> 685 686 687 688 689 690 void</code> 691 </td> 692 693 <td width="100%"> 694 <code> 695 runTest() 696 </code> 697 698 </td> 699 </tr> 700 701 702 703 <tr class="api apilevel-" > 704 705 706 <td><code> 707 708 709 710 711 712 void</code> 713 </td> 714 715 <td width="100%"> 716 <code> 717 runTestOnUiThread(Runnable arg0) 718 </code> 719 720 </td> 721 </tr> 722 723 724 725 <tr class="api apilevel-" > 726 727 728 <td><code> 729 730 731 732 733 734 void</code> 735 </td> 736 737 <td width="100%"> 738 <code> 739 sendKeys(String arg0) 740 </code> 741 742 </td> 743 </tr> 744 745 746 747 <tr class="api apilevel-" > 748 749 750 <td><code> 751 752 753 754 755 756 void</code> 757 </td> 758 759 <td width="100%"> 760 <code> 761 sendKeys(int... arg0) 762 </code> 763 764 </td> 765 </tr> 766 767 768 769 <tr class="api apilevel-" > 770 771 772 <td><code> 773 774 775 776 777 778 void</code> 779 </td> 780 781 <td width="100%"> 782 <code> 783 sendRepeatedKeys(int... arg0) 784 </code> 785 786 </td> 787 </tr> 788 789 790 791 <tr class="api apilevel-" > 792 793 794 <td><code> 795 796 797 798 799 800 void</code> 801 </td> 802 803 <td width="100%"> 804 <code> 805 tearDown() 806 </code> 807 808 </td> 809 </tr> 810 811 812 813 </table> 814 </div> 815</div> 816</td></tr> 817 818 819 820<tr class="api apilevel-" > 821<td colspan="2"> 822 823 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-junit.framework.TestCase" class="jd-expando-trigger closed" 824 ><img height="34" id="inherited-methods-junit.framework.TestCase-trigger" 825 src="/assets/images/styles/disclosure_down.png" 826 class="jd-expando-trigger-img" /></a>From 827class 828<code> 829 830 junit.framework.TestCase 831 832</code> 833<div id="inherited-methods-junit.framework.TestCase"> 834 <div id="inherited-methods-junit.framework.TestCase-list" 835 class="jd-inheritedlinks"> 836 </div> 837 <div id="inherited-methods-junit.framework.TestCase-summary" style="display: none;"> 838 <table class="jd-sumtable-expando responsive"> 839 840 841 842 843 <tr class="api apilevel-" > 844 845 846 <td><code> 847 848 849 850 851 852 int</code> 853 </td> 854 855 <td width="100%"> 856 <code> 857 countTestCases() 858 </code> 859 860 </td> 861 </tr> 862 863 864 865 <tr class="api apilevel-" > 866 867 868 <td><code> 869 870 871 872 873 874 TestResult</code> 875 </td> 876 877 <td width="100%"> 878 <code> 879 createResult() 880 </code> 881 882 </td> 883 </tr> 884 885 886 887 <tr class="api apilevel-" > 888 889 890 <td><code> 891 892 893 894 895 896 String</code> 897 </td> 898 899 <td width="100%"> 900 <code> 901 getName() 902 </code> 903 904 </td> 905 </tr> 906 907 908 909 <tr class="api apilevel-" > 910 911 912 <td><code> 913 914 915 916 917 918 TestResult</code> 919 </td> 920 921 <td width="100%"> 922 <code> 923 run() 924 </code> 925 926 </td> 927 </tr> 928 929 930 931 <tr class="api apilevel-" > 932 933 934 <td><code> 935 936 937 938 939 940 void</code> 941 </td> 942 943 <td width="100%"> 944 <code> 945 run(TestResult arg0) 946 </code> 947 948 </td> 949 </tr> 950 951 952 953 <tr class="api apilevel-" > 954 955 956 <td><code> 957 958 959 960 961 962 void</code> 963 </td> 964 965 <td width="100%"> 966 <code> 967 runBare() 968 </code> 969 970 </td> 971 </tr> 972 973 974 975 <tr class="api apilevel-" > 976 977 978 <td><code> 979 980 981 982 983 984 void</code> 985 </td> 986 987 <td width="100%"> 988 <code> 989 runTest() 990 </code> 991 992 </td> 993 </tr> 994 995 996 997 <tr class="api apilevel-" > 998 999 1000 <td><code> 1001 1002 1003 1004 1005 1006 void</code> 1007 </td> 1008 1009 <td width="100%"> 1010 <code> 1011 setName(String arg0) 1012 </code> 1013 1014 </td> 1015 </tr> 1016 1017 1018 1019 <tr class="api apilevel-" > 1020 1021 1022 <td><code> 1023 1024 1025 1026 1027 1028 void</code> 1029 </td> 1030 1031 <td width="100%"> 1032 <code> 1033 setUp() 1034 </code> 1035 1036 </td> 1037 </tr> 1038 1039 1040 1041 <tr class="api apilevel-" > 1042 1043 1044 <td><code> 1045 1046 1047 1048 1049 1050 void</code> 1051 </td> 1052 1053 <td width="100%"> 1054 <code> 1055 tearDown() 1056 </code> 1057 1058 </td> 1059 </tr> 1060 1061 1062 1063 <tr class="api apilevel-" > 1064 1065 1066 <td><code> 1067 1068 1069 1070 1071 1072 String</code> 1073 </td> 1074 1075 <td width="100%"> 1076 <code> 1077 toString() 1078 </code> 1079 1080 </td> 1081 </tr> 1082 1083 1084 1085 </table> 1086 </div> 1087</div> 1088</td></tr> 1089 1090 1091 1092<tr class="api apilevel-" > 1093<td colspan="2"> 1094 1095 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-junit.framework.Assert" class="jd-expando-trigger closed" 1096 ><img height="34" id="inherited-methods-junit.framework.Assert-trigger" 1097 src="/assets/images/styles/disclosure_down.png" 1098 class="jd-expando-trigger-img" /></a>From 1099class 1100<code> 1101 1102 junit.framework.Assert 1103 1104</code> 1105<div id="inherited-methods-junit.framework.Assert"> 1106 <div id="inherited-methods-junit.framework.Assert-list" 1107 class="jd-inheritedlinks"> 1108 </div> 1109 <div id="inherited-methods-junit.framework.Assert-summary" style="display: none;"> 1110 <table class="jd-sumtable-expando responsive"> 1111 1112 1113 1114 1115 <tr class="api apilevel-" > 1116 1117 1118 <td><code> 1119 1120 1121 static 1122 1123 1124 void</code> 1125 </td> 1126 1127 <td width="100%"> 1128 <code> 1129 assertEquals(boolean arg0, boolean arg1) 1130 </code> 1131 1132 </td> 1133 </tr> 1134 1135 1136 1137 <tr class="api apilevel-" > 1138 1139 1140 <td><code> 1141 1142 1143 static 1144 1145 1146 void</code> 1147 </td> 1148 1149 <td width="100%"> 1150 <code> 1151 assertEquals(String arg0, long arg1, long arg2) 1152 </code> 1153 1154 </td> 1155 </tr> 1156 1157 1158 1159 <tr class="api apilevel-" > 1160 1161 1162 <td><code> 1163 1164 1165 static 1166 1167 1168 void</code> 1169 </td> 1170 1171 <td width="100%"> 1172 <code> 1173 assertEquals(short arg0, short arg1) 1174 </code> 1175 1176 </td> 1177 </tr> 1178 1179 1180 1181 <tr class="api apilevel-" > 1182 1183 1184 <td><code> 1185 1186 1187 static 1188 1189 1190 void</code> 1191 </td> 1192 1193 <td width="100%"> 1194 <code> 1195 assertEquals(String arg0, String arg1, String arg2) 1196 </code> 1197 1198 </td> 1199 </tr> 1200 1201 1202 1203 <tr class="api apilevel-" > 1204 1205 1206 <td><code> 1207 1208 1209 static 1210 1211 1212 void</code> 1213 </td> 1214 1215 <td width="100%"> 1216 <code> 1217 assertEquals(String arg0, int arg1, int arg2) 1218 </code> 1219 1220 </td> 1221 </tr> 1222 1223 1224 1225 <tr class="api apilevel-" > 1226 1227 1228 <td><code> 1229 1230 1231 static 1232 1233 1234 void</code> 1235 </td> 1236 1237 <td width="100%"> 1238 <code> 1239 assertEquals(Object arg0, Object arg1) 1240 </code> 1241 1242 </td> 1243 </tr> 1244 1245 1246 1247 <tr class="api apilevel-" > 1248 1249 1250 <td><code> 1251 1252 1253 static 1254 1255 1256 void</code> 1257 </td> 1258 1259 <td width="100%"> 1260 <code> 1261 assertEquals(String arg0, boolean arg1, boolean arg2) 1262 </code> 1263 1264 </td> 1265 </tr> 1266 1267 1268 1269 <tr class="api apilevel-" > 1270 1271 1272 <td><code> 1273 1274 1275 static 1276 1277 1278 void</code> 1279 </td> 1280 1281 <td width="100%"> 1282 <code> 1283 assertEquals(String arg0, String arg1) 1284 </code> 1285 1286 </td> 1287 </tr> 1288 1289 1290 1291 <tr class="api apilevel-" > 1292 1293 1294 <td><code> 1295 1296 1297 static 1298 1299 1300 void</code> 1301 </td> 1302 1303 <td width="100%"> 1304 <code> 1305 assertEquals(String arg0, short arg1, short arg2) 1306 </code> 1307 1308 </td> 1309 </tr> 1310 1311 1312 1313 <tr class="api apilevel-" > 1314 1315 1316 <td><code> 1317 1318 1319 static 1320 1321 1322 void</code> 1323 </td> 1324 1325 <td width="100%"> 1326 <code> 1327 assertEquals(String arg0, Object arg1, Object arg2) 1328 </code> 1329 1330 </td> 1331 </tr> 1332 1333 1334 1335 <tr class="api apilevel-" > 1336 1337 1338 <td><code> 1339 1340 1341 static 1342 1343 1344 void</code> 1345 </td> 1346 1347 <td width="100%"> 1348 <code> 1349 assertEquals(char arg0, char arg1) 1350 </code> 1351 1352 </td> 1353 </tr> 1354 1355 1356 1357 <tr class="api apilevel-" > 1358 1359 1360 <td><code> 1361 1362 1363 static 1364 1365 1366 void</code> 1367 </td> 1368 1369 <td width="100%"> 1370 <code> 1371 assertEquals(byte arg0, byte arg1) 1372 </code> 1373 1374 </td> 1375 </tr> 1376 1377 1378 1379 <tr class="api apilevel-" > 1380 1381 1382 <td><code> 1383 1384 1385 static 1386 1387 1388 void</code> 1389 </td> 1390 1391 <td width="100%"> 1392 <code> 1393 assertEquals(double arg0, double arg1, double arg2) 1394 </code> 1395 1396 </td> 1397 </tr> 1398 1399 1400 1401 <tr class="api apilevel-" > 1402 1403 1404 <td><code> 1405 1406 1407 static 1408 1409 1410 void</code> 1411 </td> 1412 1413 <td width="100%"> 1414 <code> 1415 assertEquals(String arg0, char arg1, char arg2) 1416 </code> 1417 1418 </td> 1419 </tr> 1420 1421 1422 1423 <tr class="api apilevel-" > 1424 1425 1426 <td><code> 1427 1428 1429 static 1430 1431 1432 void</code> 1433 </td> 1434 1435 <td width="100%"> 1436 <code> 1437 assertEquals(float arg0, float arg1, float arg2) 1438 </code> 1439 1440 </td> 1441 </tr> 1442 1443 1444 1445 <tr class="api apilevel-" > 1446 1447 1448 <td><code> 1449 1450 1451 static 1452 1453 1454 void</code> 1455 </td> 1456 1457 <td width="100%"> 1458 <code> 1459 assertEquals(String arg0, double arg1, double arg2, double arg3) 1460 </code> 1461 1462 </td> 1463 </tr> 1464 1465 1466 1467 <tr class="api apilevel-" > 1468 1469 1470 <td><code> 1471 1472 1473 static 1474 1475 1476 void</code> 1477 </td> 1478 1479 <td width="100%"> 1480 <code> 1481 assertEquals(String arg0, byte arg1, byte arg2) 1482 </code> 1483 1484 </td> 1485 </tr> 1486 1487 1488 1489 <tr class="api apilevel-" > 1490 1491 1492 <td><code> 1493 1494 1495 static 1496 1497 1498 void</code> 1499 </td> 1500 1501 <td width="100%"> 1502 <code> 1503 assertEquals(String arg0, float arg1, float arg2, float arg3) 1504 </code> 1505 1506 </td> 1507 </tr> 1508 1509 1510 1511 <tr class="api apilevel-" > 1512 1513 1514 <td><code> 1515 1516 1517 static 1518 1519 1520 void</code> 1521 </td> 1522 1523 <td width="100%"> 1524 <code> 1525 assertEquals(long arg0, long arg1) 1526 </code> 1527 1528 </td> 1529 </tr> 1530 1531 1532 1533 <tr class="api apilevel-" > 1534 1535 1536 <td><code> 1537 1538 1539 static 1540 1541 1542 void</code> 1543 </td> 1544 1545 <td width="100%"> 1546 <code> 1547 assertEquals(int arg0, int arg1) 1548 </code> 1549 1550 </td> 1551 </tr> 1552 1553 1554 1555 <tr class="api apilevel-" > 1556 1557 1558 <td><code> 1559 1560 1561 static 1562 1563 1564 void</code> 1565 </td> 1566 1567 <td width="100%"> 1568 <code> 1569 assertFalse(String arg0, boolean arg1) 1570 </code> 1571 1572 </td> 1573 </tr> 1574 1575 1576 1577 <tr class="api apilevel-" > 1578 1579 1580 <td><code> 1581 1582 1583 static 1584 1585 1586 void</code> 1587 </td> 1588 1589 <td width="100%"> 1590 <code> 1591 assertFalse(boolean arg0) 1592 </code> 1593 1594 </td> 1595 </tr> 1596 1597 1598 1599 <tr class="api apilevel-" > 1600 1601 1602 <td><code> 1603 1604 1605 static 1606 1607 1608 void</code> 1609 </td> 1610 1611 <td width="100%"> 1612 <code> 1613 assertNotNull(Object arg0) 1614 </code> 1615 1616 </td> 1617 </tr> 1618 1619 1620 1621 <tr class="api apilevel-" > 1622 1623 1624 <td><code> 1625 1626 1627 static 1628 1629 1630 void</code> 1631 </td> 1632 1633 <td width="100%"> 1634 <code> 1635 assertNotNull(String arg0, Object arg1) 1636 </code> 1637 1638 </td> 1639 </tr> 1640 1641 1642 1643 <tr class="api apilevel-" > 1644 1645 1646 <td><code> 1647 1648 1649 static 1650 1651 1652 void</code> 1653 </td> 1654 1655 <td width="100%"> 1656 <code> 1657 assertNotSame(String arg0, Object arg1, Object arg2) 1658 </code> 1659 1660 </td> 1661 </tr> 1662 1663 1664 1665 <tr class="api apilevel-" > 1666 1667 1668 <td><code> 1669 1670 1671 static 1672 1673 1674 void</code> 1675 </td> 1676 1677 <td width="100%"> 1678 <code> 1679 assertNotSame(Object arg0, Object arg1) 1680 </code> 1681 1682 </td> 1683 </tr> 1684 1685 1686 1687 <tr class="api apilevel-" > 1688 1689 1690 <td><code> 1691 1692 1693 static 1694 1695 1696 void</code> 1697 </td> 1698 1699 <td width="100%"> 1700 <code> 1701 assertNull(String arg0, Object arg1) 1702 </code> 1703 1704 </td> 1705 </tr> 1706 1707 1708 1709 <tr class="api apilevel-" > 1710 1711 1712 <td><code> 1713 1714 1715 static 1716 1717 1718 void</code> 1719 </td> 1720 1721 <td width="100%"> 1722 <code> 1723 assertNull(Object arg0) 1724 </code> 1725 1726 </td> 1727 </tr> 1728 1729 1730 1731 <tr class="api apilevel-" > 1732 1733 1734 <td><code> 1735 1736 1737 static 1738 1739 1740 void</code> 1741 </td> 1742 1743 <td width="100%"> 1744 <code> 1745 assertSame(String arg0, Object arg1, Object arg2) 1746 </code> 1747 1748 </td> 1749 </tr> 1750 1751 1752 1753 <tr class="api apilevel-" > 1754 1755 1756 <td><code> 1757 1758 1759 static 1760 1761 1762 void</code> 1763 </td> 1764 1765 <td width="100%"> 1766 <code> 1767 assertSame(Object arg0, Object arg1) 1768 </code> 1769 1770 </td> 1771 </tr> 1772 1773 1774 1775 <tr class="api apilevel-" > 1776 1777 1778 <td><code> 1779 1780 1781 static 1782 1783 1784 void</code> 1785 </td> 1786 1787 <td width="100%"> 1788 <code> 1789 assertTrue(String arg0, boolean arg1) 1790 </code> 1791 1792 </td> 1793 </tr> 1794 1795 1796 1797 <tr class="api apilevel-" > 1798 1799 1800 <td><code> 1801 1802 1803 static 1804 1805 1806 void</code> 1807 </td> 1808 1809 <td width="100%"> 1810 <code> 1811 assertTrue(boolean arg0) 1812 </code> 1813 1814 </td> 1815 </tr> 1816 1817 1818 1819 <tr class="api apilevel-" > 1820 1821 1822 <td><code> 1823 1824 1825 static 1826 1827 1828 void</code> 1829 </td> 1830 1831 <td width="100%"> 1832 <code> 1833 fail(String arg0) 1834 </code> 1835 1836 </td> 1837 </tr> 1838 1839 1840 1841 <tr class="api apilevel-" > 1842 1843 1844 <td><code> 1845 1846 1847 static 1848 1849 1850 void</code> 1851 </td> 1852 1853 <td width="100%"> 1854 <code> 1855 fail() 1856 </code> 1857 1858 </td> 1859 </tr> 1860 1861 1862 1863 <tr class="api apilevel-" > 1864 1865 1866 <td><code> 1867 1868 1869 static 1870 1871 1872 void</code> 1873 </td> 1874 1875 <td width="100%"> 1876 <code> 1877 failNotEquals(String arg0, Object arg1, Object arg2) 1878 </code> 1879 1880 </td> 1881 </tr> 1882 1883 1884 1885 <tr class="api apilevel-" > 1886 1887 1888 <td><code> 1889 1890 1891 static 1892 1893 1894 void</code> 1895 </td> 1896 1897 <td width="100%"> 1898 <code> 1899 failNotSame(String arg0, Object arg1, Object arg2) 1900 </code> 1901 1902 </td> 1903 </tr> 1904 1905 1906 1907 <tr class="api apilevel-" > 1908 1909 1910 <td><code> 1911 1912 1913 static 1914 1915 1916 void</code> 1917 </td> 1918 1919 <td width="100%"> 1920 <code> 1921 failSame(String arg0) 1922 </code> 1923 1924 </td> 1925 </tr> 1926 1927 1928 1929 <tr class="api apilevel-" > 1930 1931 1932 <td><code> 1933 1934 1935 static 1936 1937 1938 String</code> 1939 </td> 1940 1941 <td width="100%"> 1942 <code> 1943 format(String arg0, Object arg1, Object arg2) 1944 </code> 1945 1946 </td> 1947 </tr> 1948 1949 1950 1951 </table> 1952 </div> 1953</div> 1954</td></tr> 1955 1956 1957 1958<tr class="api apilevel-" > 1959<td colspan="2"> 1960 1961 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 1962 ><img height="34" id="inherited-methods-java.lang.Object-trigger" 1963 src="/assets/images/styles/disclosure_down.png" 1964 class="jd-expando-trigger-img" /></a>From 1965class 1966<code> 1967 1968 java.lang.Object 1969 1970</code> 1971<div id="inherited-methods-java.lang.Object"> 1972 <div id="inherited-methods-java.lang.Object-list" 1973 class="jd-inheritedlinks"> 1974 </div> 1975 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 1976 <table class="jd-sumtable-expando responsive"> 1977 1978 1979 1980 1981 <tr class="api apilevel-" > 1982 1983 1984 <td><code> 1985 1986 1987 1988 1989 1990 Object</code> 1991 </td> 1992 1993 <td width="100%"> 1994 <code> 1995 clone() 1996 </code> 1997 1998 </td> 1999 </tr> 2000 2001 2002 2003 <tr class="api apilevel-" > 2004 2005 2006 <td><code> 2007 2008 2009 2010 2011 2012 boolean</code> 2013 </td> 2014 2015 <td width="100%"> 2016 <code> 2017 equals(Object arg0) 2018 </code> 2019 2020 </td> 2021 </tr> 2022 2023 2024 2025 <tr class="api apilevel-" > 2026 2027 2028 <td><code> 2029 2030 2031 2032 2033 2034 void</code> 2035 </td> 2036 2037 <td width="100%"> 2038 <code> 2039 finalize() 2040 </code> 2041 2042 </td> 2043 </tr> 2044 2045 2046 2047 <tr class="api apilevel-" > 2048 2049 2050 <td><code> 2051 2052 2053 2054 final 2055 2056 Class<?></code> 2057 </td> 2058 2059 <td width="100%"> 2060 <code> 2061 getClass() 2062 </code> 2063 2064 </td> 2065 </tr> 2066 2067 2068 2069 <tr class="api apilevel-" > 2070 2071 2072 <td><code> 2073 2074 2075 2076 2077 2078 int</code> 2079 </td> 2080 2081 <td width="100%"> 2082 <code> 2083 hashCode() 2084 </code> 2085 2086 </td> 2087 </tr> 2088 2089 2090 2091 <tr class="api apilevel-" > 2092 2093 2094 <td><code> 2095 2096 2097 2098 final 2099 2100 void</code> 2101 </td> 2102 2103 <td width="100%"> 2104 <code> 2105 notify() 2106 </code> 2107 2108 </td> 2109 </tr> 2110 2111 2112 2113 <tr class="api apilevel-" > 2114 2115 2116 <td><code> 2117 2118 2119 2120 final 2121 2122 void</code> 2123 </td> 2124 2125 <td width="100%"> 2126 <code> 2127 notifyAll() 2128 </code> 2129 2130 </td> 2131 </tr> 2132 2133 2134 2135 <tr class="api apilevel-" > 2136 2137 2138 <td><code> 2139 2140 2141 2142 2143 2144 String</code> 2145 </td> 2146 2147 <td width="100%"> 2148 <code> 2149 toString() 2150 </code> 2151 2152 </td> 2153 </tr> 2154 2155 2156 2157 <tr class="api apilevel-" > 2158 2159 2160 <td><code> 2161 2162 2163 2164 final 2165 2166 void</code> 2167 </td> 2168 2169 <td width="100%"> 2170 <code> 2171 wait(long arg0, int arg1) 2172 </code> 2173 2174 </td> 2175 </tr> 2176 2177 2178 2179 <tr class="api apilevel-" > 2180 2181 2182 <td><code> 2183 2184 2185 2186 final 2187 2188 void</code> 2189 </td> 2190 2191 <td width="100%"> 2192 <code> 2193 wait(long arg0) 2194 </code> 2195 2196 </td> 2197 </tr> 2198 2199 2200 2201 <tr class="api apilevel-" > 2202 2203 2204 <td><code> 2205 2206 2207 2208 final 2209 2210 void</code> 2211 </td> 2212 2213 <td width="100%"> 2214 <code> 2215 wait() 2216 </code> 2217 2218 </td> 2219 </tr> 2220 2221 2222 2223 </table> 2224 </div> 2225</div> 2226</td></tr> 2227 2228 2229 2230<tr class="api apilevel-" > 2231<td colspan="2"> 2232 2233 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-junit.framework.Test" class="jd-expando-trigger closed" 2234 ><img height="34" id="inherited-methods-junit.framework.Test-trigger" 2235 src="/assets/images/styles/disclosure_down.png" 2236 class="jd-expando-trigger-img" /></a>From 2237interface 2238<code> 2239 2240 junit.framework.Test 2241 2242</code> 2243<div id="inherited-methods-junit.framework.Test"> 2244 <div id="inherited-methods-junit.framework.Test-list" 2245 class="jd-inheritedlinks"> 2246 </div> 2247 <div id="inherited-methods-junit.framework.Test-summary" style="display: none;"> 2248 <table class="jd-sumtable-expando responsive"> 2249 2250 2251 2252 2253 <tr class="api apilevel-" > 2254 2255 2256 <td><code> 2257 abstract 2258 2259 2260 2261 2262 int</code> 2263 </td> 2264 2265 <td width="100%"> 2266 <code> 2267 countTestCases() 2268 </code> 2269 2270 </td> 2271 </tr> 2272 2273 2274 2275 <tr class="api apilevel-" > 2276 2277 2278 <td><code> 2279 abstract 2280 2281 2282 2283 2284 void</code> 2285 </td> 2286 2287 <td width="100%"> 2288 <code> 2289 run(TestResult arg0) 2290 </code> 2291 2292 </td> 2293 </tr> 2294 2295 2296 2297 </table> 2298 </div> 2299</div> 2300</td></tr> 2301 2302 2303</table> 2304 2305 2306 2307<!-- XML Attributes --> 2308 2309 2310<!-- Enum Values --> 2311 2312 2313<!-- Constants --> 2314 2315 2316<!-- Fields --> 2317 2318 2319<!-- Public ctors --> 2320 2321 2322<!-- ========= CONSTRUCTOR DETAIL ======== --> 2323<h2 class="api-section">Public constructors</h2> 2324 2325 2326 2327<A NAME="UiAutomatorTestCase()"></A> 2328 2329<div class="api apilevel-"> 2330 <h3 class="api-name">UiAutomatorTestCase</h3> 2331 <div class="api-level"> 2332 <div></div> 2333 2334 2335 2336 </div> 2337<pre class="api-signature no-pretty-print"> 2338UiAutomatorTestCase ()</pre> 2339 2340 2341 2342 2343 <p></p> 2344 2345</div> 2346 2347 2348 2349 2350 2351<!-- ========= CONSTRUCTOR DETAIL ======== --> 2352<!-- Protected ctors --> 2353 2354 2355 2356<!-- ========= METHOD DETAIL ======== --> 2357<!-- Public methdos --> 2358 2359<h2 class="api-section">Public methods</h2> 2360 2361 2362 2363<A NAME="getAutomationSupport()"></A> 2364 2365<div class="api apilevel-"> 2366 <h3 class="api-name">getAutomationSupport</h3> 2367 <div class="api-level"> 2368 <div></div> 2369 2370 2371 2372 </div> 2373<pre class="api-signature no-pretty-print"> 2374<a href="/reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a> getAutomationSupport ()</pre> 2375 2376 2377 2378 <p> 2379 <p class="caution"><strong> 2380 This method is deprecated.</strong><br/> 2381 Use <code><a href="/reference/android/app/Instrumentation.html#sendStatus(int, android.os.Bundle)">sendStatus(int, Bundle)</a></code> instead 2382 2383 </p> 2384 <p>Provides support for running tests to report interim status</p> 2385 2386 <table class="responsive"> 2387 <tr><th colspan=2>Returns</th></tr> 2388 <tr> 2389 <td><code><a href="/reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a></code></td> 2390 <td width="100%">IAutomationSupport</td> 2391 </tr> 2392 </table> 2393 2394</div> 2395 2396 2397<A NAME="getParams()"></A> 2398 2399<div class="api apilevel-"> 2400 <h3 class="api-name">getParams</h3> 2401 <div class="api-level"> 2402 <div></div> 2403 2404 2405 2406 </div> 2407<pre class="api-signature no-pretty-print"> 2408Bundle getParams ()</pre> 2409 2410 2411 2412 2413 <p>Get command line parameters. On the command line when passing <code>-e key value</code> 2414 pairs, the <code><a href="/reference/android/os/Bundle.html">Bundle</a></code> will have the key value pairs conveniently available to the 2415 tests.</p> 2416 2417 <table class="responsive"> 2418 <tr><th colspan=2>Returns</th></tr> 2419 <tr> 2420 <td><code>Bundle</code></td> 2421 <td width="100%"><!-- no returns description in source --></td> 2422 </tr> 2423 </table> 2424 2425</div> 2426 2427 2428<A NAME="getUiDevice()"></A> 2429 2430<div class="api apilevel-"> 2431 <h3 class="api-name">getUiDevice</h3> 2432 <div class="api-level"> 2433 <div></div> 2434 2435 2436 2437 </div> 2438<pre class="api-signature no-pretty-print"> 2439<a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a> getUiDevice ()</pre> 2440 2441 2442 2443 2444 <p>Get current instance of <code><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></code>. Works similar to calling the static 2445 <code><a href="/reference/android/support/test/uiautomator/UiDevice.html#getInstance()">getInstance()</a></code> from anywhere in the test classes.</p> 2446 2447 <table class="responsive"> 2448 <tr><th colspan=2>Returns</th></tr> 2449 <tr> 2450 <td><code><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></code></td> 2451 <td width="100%"><!-- no returns description in source --></td> 2452 </tr> 2453 </table> 2454 2455</div> 2456 2457 2458<A NAME="sleep(long)"></A> 2459 2460<div class="api apilevel-"> 2461 <h3 class="api-name">sleep</h3> 2462 <div class="api-level"> 2463 <div></div> 2464 2465 2466 2467 </div> 2468<pre class="api-signature no-pretty-print"> 2469void sleep (long ms)</pre> 2470 2471 2472 2473 <p> 2474 <p class="caution"><strong> 2475 This method is deprecated.</strong><br/> 2476 Use <code><a href="/reference/android/os/SystemClock.html#sleep(long)">sleep(long)</a></code> instead. 2477 2478 </p> 2479 <p>Calls <code><a href="/reference/android/os/SystemClock.html#sleep(long)">sleep(long)</a></code> to sleep</p> 2480 2481 <table class="responsive"> 2482 <tr><th colspan=2>Parameters</th></tr> 2483 <tr> 2484 <td><code>ms</code></td> 2485 <td width="100%"> 2486 <code>long</code>: 2487 is in milliseconds.</td> 2488 </tr> 2489 </table> 2490 2491</div> 2492 2493 2494 2495 2496 2497<!-- ========= METHOD DETAIL ======== --> 2498 2499 2500 2501<!-- ========= END OF CLASS DATA ========= --> 2502 2503</div><!-- end jd-content --> 2504 2505 2506 2507<div class="data-reference-resources-wrapper"> 2508 2509 <ul data-reference-resources> 2510 2511 2512 <li><h2>Interfaces</h2> 2513 <ul> 2514 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a></li> 2515 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiWatcher.html">UiWatcher</a></li> 2516 </ul> 2517 </li> 2518 2519 <li><h2>Classes</h2> 2520 <ul> 2521 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/By.html">By</a></li> 2522 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/BySelector.html">BySelector</a></li> 2523 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Configurator.html">Configurator</a></li> 2524 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/EventCondition.html">EventCondition</a></li> 2525 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/SearchCondition.html">SearchCondition</a></li> 2526 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner.html">UiAutomatorInstrumentationTestRunner</a></li> 2527 <li class="selected api apilevel-"><a href="/reference/android/support/test/uiautomator/UiAutomatorTestCase.html">UiAutomatorTestCase</a></li> 2528 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiCollection.html">UiCollection</a></li> 2529 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></li> 2530 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject.html">UiObject</a></li> 2531 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2.html">UiObject2</a></li> 2532 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObject2Condition.html">UiObject2Condition</a></li> 2533 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></li> 2534 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></li> 2535 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Until.html">Until</a></li> 2536 </ul> 2537 </li> 2538 2539 <li><h2>Enums</h2> 2540 <ul> 2541 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/Direction.html">Direction</a></li> 2542 </ul> 2543 </li> 2544 2545 <li><h2>Exceptions</h2> 2546 <ul> 2547 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/StaleObjectException.html">StaleObjectException</a></li> 2548 <li class="api apilevel-"><a href="/reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></li> 2549 </ul> 2550 </li> 2551 2552 </ul> 2553 2554</div> 2555 2556 2557 2558</body> 2559</html> 2560