1<!DOCTYPE html> 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<html> 97<head> 98 99 100<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 101<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /> 102<meta content="IE=edge" http-equiv="X-UA-Compatible"> 103 104<link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" /> 105<title>UiCollection | Android Developers</title> 106 107<!-- STYLESHEETS --> 108<link rel="stylesheet" 109href="http://fonts.googleapis.com/css?family=Roboto+Condensed"> 110<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:light,regular,medium,thin,italic,mediumitalic,bold" 111 title="roboto"> 112 113<link href="../../../../../assets/css/default.css?v=7" rel="stylesheet" type="text/css"> 114 115 116<!-- FULLSCREEN STYLESHEET --> 117<link href="../../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen" 118type="text/css"> 119 120 121<!-- JAVASCRIPT --> 122<script src="http://www.google.com/jsapi" type="text/javascript"></script> 123<script src="../../../../../assets/js/android_3p-bundle.js" type="text/javascript"></script> 124<script type="text/javascript"> 125 var toRoot = "../../../../../"; 126 var metaTags = []; 127 var devsite = false; 128</script> 129<script src="../../../../../assets/js/docs.js?v=5" type="text/javascript"></script> 130 131 132 133<script> 134 (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ 135 (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), 136 m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) 137 })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); 138 139 ga('create', 'UA-5831155-1', 'android.com'); 140 ga('create', 'UA-49880327-2', 'android.com', {'name': 'universal'}); // New tracker); 141 ga('send', 'pageview'); 142 ga('universal.send', 'pageview'); // Send page view for new tracker. 143</script> 144 145</head> 146 147<body class="gc-documentation 148 develop reference" itemscope itemtype="http://schema.org/Article"> 149 <div id="doc-api-level" class="" style="display:none"></div> 150 <a name="top"></a> 151 152<a name="top"></a> 153 154<!-- dialog to prompt lang pref change when loaded from hardcoded URL 155<div id="langMessage" style="display:none"> 156 <div> 157 <div class="lang en"> 158 <p>You requested a page in English, would you like to proceed with this language setting?</p> 159 </div> 160 <div class="lang es"> 161 <p>You requested a page in Spanish (Español), would you like to proceed with this language setting?</p> 162 </div> 163 <div class="lang ja"> 164 <p>You requested a page in Japanese (日本語), would you like to proceed with this language setting?</p> 165 </div> 166 <div class="lang ko"> 167 <p>You requested a page in Korean (한국어), would you like to proceed with this language setting?</p> 168 </div> 169 <div class="lang ru"> 170 <p>You requested a page in Russian (Русский), would you like to proceed with this language setting?</p> 171 </div> 172 <div class="lang zh-cn"> 173 <p>You requested a page in Simplified Chinese (简体中文), would you like to proceed with this language setting?</p> 174 </div> 175 <div class="lang zh-tw"> 176 <p>You requested a page in Traditional Chinese (繁體中文), would you like to proceed with this language setting?</p> 177 </div> 178 <a href="#" class="button yes" onclick="return false;"> 179 <span class="lang en">Yes</span> 180 <span class="lang es">Sí</span> 181 <span class="lang ja">Yes</span> 182 <span class="lang ko">Yes</span> 183 <span class="lang ru">Yes</span> 184 <span class="lang zh-cn">是的</span> 185 <span class="lang zh-tw">没有</span> 186 </a> 187 <a href="#" class="button" onclick="$('#langMessage').hide();return false;"> 188 <span class="lang en">No</span> 189 <span class="lang es">No</span> 190 <span class="lang ja">No</span> 191 <span class="lang ko">No</span> 192 <span class="lang ru">No</span> 193 <span class="lang zh-cn">没有</span> 194 <span class="lang zh-tw">没有</span> 195 </a> 196 </div> 197</div> --> 198 199 200 <!-- Header --> 201 <div id="header-wrapper"> 202 <div class="dac-header" id="header"> 203 204 205 206 207 <div class="dac-header-inner"> 208 <a class="dac-nav-toggle" data-dac-toggle-nav href="javascript:;" title="Open navigation"> 209 <span class="dac-nav-hamburger"> 210 <span class="dac-nav-hamburger-top"></span> 211 <span class="dac-nav-hamburger-mid"></span> 212 <span class="dac-nav-hamburger-bot"></span> 213 </span> 214 </a> 215 <a class="dac-header-logo" href="../../../../../index.html"> 216 <img class="dac-header-logo-image" src="../../../../../assets/images/android_logo.png" 217 srcset="../../../../../assets/images/android_logo@2x.png 2x" 218 width="32" height="36" alt="Android" /> Developers 219 </a> 220 221 <ul class="dac-header-crumbs"> 222 223 <li class="dac-header-crumbs-item"><span class="dac-header-crumbs-link current ">UiCollection</a></li> 224 </ul> 225 226 227 228 229 <div class="dac-header-search" id="search-container"> 230 <div class="dac-header-search-inner"> 231 <div class="dac-sprite dac-search dac-header-search-btn" id="search-btn"></div> 232 <form class="dac-header-search-form" onsubmit="return submit_search()"> 233 <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" 234 onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" 235 onkeydown="return search_changed(event, true, '../../../../../')" 236 onkeyup="return search_changed(event, false, '../../../../../')" 237 class="dac-header-search-input" placeholder="Search" /> 238 <a class="dac-header-search-close hide" id="search-close">close</a> 239 </form> 240 </div><!-- end dac-header-search-inner --> 241 </div><!-- end dac-header-search --> 242 243 <div class="search_filtered_wrapper"> 244 <div class="suggest-card reference no-display"> 245 <ul class="search_filtered"> 246 </ul> 247 </div> 248 <div class="suggest-card develop no-display"> 249 <ul class="search_filtered"> 250 </ul> 251 <div class="child-card guides no-display"> 252 </div> 253 <div class="child-card training no-display"> 254 </div> 255 <div class="child-card samples no-display"> 256 </div> 257 </div> 258 <div class="suggest-card design no-display"> 259 <ul class="search_filtered"> 260 </ul> 261 </div> 262 <div class="suggest-card distribute no-display"> 263 <ul class="search_filtered"> 264 </ul> 265 </div> 266 </div> 267 268 269 270 <a class="dac-header-console-btn" href="https://play.google.com/apps/publish/"> 271 <span class="dac-sprite dac-google-play"></span> 272 <span class="dac-visible-desktop-inline">Developer</span> 273 Console 274 </a> 275 276 </div><!-- end header-wrap.wrap --> 277 </div><!-- end header --> 278 279 <div id="searchResults" class="wrap" style="display:none;"> 280 <h2 id="searchTitle">Results</h2> 281 <div id="leftSearchControl" class="search-control">Loading...</div> 282 </div> 283 </div> <!--end header-wrapper --> 284 285 286 <!-- Navigation--> 287 <nav class="dac-nav"> 288 <div class="dac-nav-dimmer" data-dac-toggle-nav></div> 289 290 <ul class="dac-nav-list" data-dac-nav> 291 <li class="dac-nav-item dac-nav-head"> 292 <a class="dac-nav-link dac-nav-logo" data-dac-toggle-nav href="javascript:;" title="Close navigation"> 293 <img class="dac-logo-image" src="../../../../../assets/images/android_logo.png" 294 srcset="../../../../../assets/images/android_logo@2x.png 2x" 295 width="32" height="36" alt="Android" /> Developers 296 </a> 297 </li> 298 <li class="dac-nav-item home"> 299 <a class="dac-nav-link dac-visible-mobile-block" href="../../../../../index.html">Home</a> 300 <ul class="dac-nav-secondary about"> 301 <li class="dac-nav-item about"> 302 <a class="dac-nav-link" href="../../../../../about/index.html">Android</a> 303 </li> 304 <li class="dac-nav-item wear"> 305 <a class="dac-nav-link" href="../../../../../wear/index.html">Wear</a> 306 </li> 307 <li class="dac-nav-item tv"> 308 <a class="dac-nav-link" href="../../../../../tv/index.html">TV</a> 309 </li> 310 <li class="dac-nav-item auto"> 311 <a class="dac-nav-link" href="../../../../../auto/index.html">Auto</a> 312 </li> 313 </ul> 314 </li> 315 <li class="dac-nav-item design"> 316 <a class="dac-nav-link" href="../../../../../design/index.html" 317 zh-tw-lang="設計" 318 zh-cn-lang="设计" 319 ru-lang="Проектирование" 320 ko-lang="디자인" 321 ja-lang="設計" 322 es-lang="Diseñar">Design</a> 323 </li> 324 <li class="dac-nav-item develop"> 325 <a class="dac-nav-link" href="../../../../../develop/index.html" 326 zh-tw-lang="開發" 327 zh-cn-lang="开发" 328 ru-lang="Разработка" 329 ko-lang="개발" 330 ja-lang="開発" 331 es-lang="Desarrollar">Develop</a> 332 <ul class="dac-nav-secondary develop"> 333 <li class="dac-nav-item training"> 334 <a class="dac-nav-link" href="../../../../../training/index.html" 335 zh-tw-lang="訓練課程" 336 zh-cn-lang="培训" 337 ru-lang="Курсы" 338 ko-lang="교육" 339 ja-lang="トレーニング" 340 es-lang="Capacitación">Training</a> 341 </li> 342 <li class="dac-nav-item guide"> 343 <a class="dac-nav-link" href="../../../../../guide/index.html" 344 zh-tw-lang="API 指南" 345 zh-cn-lang="API 指南" 346 ru-lang="Руководства по API" 347 ko-lang="API 가이드" 348 ja-lang="API ガイド" 349 es-lang="Guías de la API">API Guides</a> 350 </li> 351 <li class="dac-nav-item reference"> 352 <a class="dac-nav-link" href="../../../../../reference/packages.html" 353 zh-tw-lang="參考資源" 354 zh-cn-lang="参考" 355 ru-lang="Справочник" 356 ko-lang="참조문서" 357 ja-lang="リファレンス" 358 es-lang="Referencia">Reference</a> 359 </li> 360 <li class="dac-nav-item tools"> 361 <a class="dac-nav-link" href="../../../../../sdk/index.html" 362 zh-tw-lang="相關工具" 363 zh-cn-lang="工具" 364 ru-lang="Инструменты" 365 ko-lang="도구" 366 ja-lang="ツール" 367 es-lang="Herramientas">Tools</a></li> 368 <li class="dac-nav-item google"> 369 <a class="dac-nav-link" href="../../../../../google/index.html">Google Services</a> 370 </li> 371 372 <li class="dac-nav-item preview"> 373 <a class="dac-nav-link" href="../../../../../preview/index.html">Preview</a> 374 </li> 375 </ul> 376 </li> 377 <li class="dac-nav-item distribute"> 378 <a class="dac-nav-link" href="../../../../../distribute/index.html" 379 zh-tw-lang="發佈" 380 zh-cn-lang="分发" 381 ru-lang="Распространение" 382 ko-lang="배포" 383 ja-lang="配布" 384 es-lang="Distribuir">Distribute</a> 385 <ul class="dac-nav-secondary distribute"> 386 <li class="dac-nav-item googleplay"> 387 <a class="dac-nav-link" href="../../../../../distribute/googleplay/index.html">Google Play</a></li> 388 <li class="dac-nav-item essentials"> 389 <a class="dac-nav-link" href="../../../../../distribute/essentials/index.html">Essentials</a></li> 390 <li class="dac-nav-item users"> 391 <a class="dac-nav-link" href="../../../../../distribute/users/index.html">Get Users</a></li> 392 <li class="dac-nav-item engage"> 393 <a class="dac-nav-link" href="../../../../../distribute/engage/index.html">Engage & Retain</a></li> 394 <li class="dac-nav-item monetize"> 395 <a class="dac-nav-link" href="../../../../../distribute/monetize/index.html">Earn</a> 396 </li> 397 <li class="dac-nav-item analyze"> 398 <a class="dac-nav-link" href="../../../../../distribute/analyze/index.html">Analyze</a> 399 </li> 400 <li class="dac-nav-item stories"> 401 <a class="dac-nav-link" href="../../../../../distribute/stories/index.html">Stories</a> 402 </li> 403 </ul> 404 </li> 405 </ul> 406 </nav> 407 <!-- end navigation--> 408 409 410 411 412 413 414 <div class="wrap clearfix" id="body-content"><div class="cols"> 415 <div class="col-4 dac-hidden-mobile" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> 416 <div id="devdoc-nav"> 417 <div id="api-nav-header"> 418 <div id="api-level-toggle"> 419 <label for="apiLevelCheckbox" class="disabled" 420 title="Select your target API level to dim unavailable APIs">API level: </label> 421 <div class="select-wrapper"> 422 <select id="apiLevelSelector"> 423 <!-- option elements added by buildApiLevelSelector() --> 424 </select> 425 </div> 426 </div><!-- end toggle --> 427 <div id="api-nav-title">Android APIs</div> 428 </div><!-- end nav header --> 429 <script> 430 var SINCE_DATA = [ ]; 431 buildApiLevelSelector(); 432 </script> 433 434 <div id="swapper"> 435 <div id="nav-panels"> 436 <div id="resize-packages-nav"> 437 <div id="packages-nav" class="scroll-pane"> 438 439 <ul> 440 441 <li class="api apilevel-"> 442 <a href="../../../../../reference/android/support/test/package-summary.html">android.support.test</a></li> 443 <li class="api apilevel-"> 444 <a href="../../../../../reference/android/support/test/annotation/package-summary.html">android.support.test.annotation</a></li> 445 <li class="api apilevel-"> 446 <a href="../../../../../reference/android/support/test/espresso/package-summary.html">android.support.test.espresso</a></li> 447 <li class="api apilevel-"> 448 <a href="../../../../../reference/android/support/test/espresso/action/package-summary.html">android.support.test.espresso.action</a></li> 449 <li class="api apilevel-"> 450 <a href="../../../../../reference/android/support/test/espresso/assertion/package-summary.html">android.support.test.espresso.assertion</a></li> 451 <li class="api apilevel-"> 452 <a href="../../../../../reference/android/support/test/espresso/base/package-summary.html">android.support.test.espresso.base</a></li> 453 <li class="api apilevel-"> 454 <a href="../../../../../reference/android/support/test/espresso/contrib/package-summary.html">android.support.test.espresso.contrib</a></li> 455 <li class="api apilevel-"> 456 <a href="../../../../../reference/android/support/test/espresso/intent/package-summary.html">android.support.test.espresso.intent</a></li> 457 <li class="api apilevel-"> 458 <a href="../../../../../reference/android/support/test/espresso/intent/matcher/package-summary.html">android.support.test.espresso.intent.matcher</a></li> 459 <li class="api apilevel-"> 460 <a href="../../../../../reference/android/support/test/espresso/intent/rule/package-summary.html">android.support.test.espresso.intent.rule</a></li> 461 <li class="api apilevel-"> 462 <a href="../../../../../reference/android/support/test/espresso/matcher/package-summary.html">android.support.test.espresso.matcher</a></li> 463 <li class="api apilevel-"> 464 <a href="../../../../../reference/android/support/test/espresso/util/package-summary.html">android.support.test.espresso.util</a></li> 465 <li class="api apilevel-"> 466 <a href="../../../../../reference/android/support/test/espresso/web/action/package-summary.html">android.support.test.espresso.web.action</a></li> 467 <li class="api apilevel-"> 468 <a href="../../../../../reference/android/support/test/espresso/web/assertion/package-summary.html">android.support.test.espresso.web.assertion</a></li> 469 <li class="api apilevel-"> 470 <a href="../../../../../reference/android/support/test/espresso/web/bridge/package-summary.html">android.support.test.espresso.web.bridge</a></li> 471 <li class="api apilevel-"> 472 <a href="../../../../../reference/android/support/test/espresso/web/matcher/package-summary.html">android.support.test.espresso.web.matcher</a></li> 473 <li class="api apilevel-"> 474 <a href="../../../../../reference/android/support/test/espresso/web/model/package-summary.html">android.support.test.espresso.web.model</a></li> 475 <li class="api apilevel-"> 476 <a href="../../../../../reference/android/support/test/espresso/web/sugar/package-summary.html">android.support.test.espresso.web.sugar</a></li> 477 <li class="api apilevel-"> 478 <a href="../../../../../reference/android/support/test/espresso/web/webdriver/package-summary.html">android.support.test.espresso.web.webdriver</a></li> 479 <li class="api apilevel-"> 480 <a href="../../../../../reference/android/support/test/filters/package-summary.html">android.support.test.filters</a></li> 481 <li class="api apilevel-"> 482 <a href="../../../../../reference/android/support/test/rule/package-summary.html">android.support.test.rule</a></li> 483 <li class="api apilevel-"> 484 <a href="../../../../../reference/android/support/test/runner/package-summary.html">android.support.test.runner</a></li> 485 <li class="api apilevel-"> 486 <a href="../../../../../reference/android/support/test/runner/intent/package-summary.html">android.support.test.runner.intent</a></li> 487 <li class="api apilevel-"> 488 <a href="../../../../../reference/android/support/test/runner/lifecycle/package-summary.html">android.support.test.runner.lifecycle</a></li> 489 <li class="selected api apilevel-"> 490 <a href="../../../../../reference/android/support/test/uiautomator/package-summary.html">android.support.test.uiautomator</a></li> 491 </ul><br/> 492 493 </div> <!-- end packages-nav --> 494 </div> <!-- end resize-packages --> 495 <div id="classes-nav" class="scroll-pane"> 496 497 498 499 <ul> 500 501 502 <li><h2>Interfaces</h2> 503 <ul> 504 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/IAutomationSupport.html">IAutomationSupport</a></li> 505 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiWatcher.html">UiWatcher</a></li> 506 </ul> 507 </li> 508 509 <li><h2>Classes</h2> 510 <ul> 511 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/By.html">By</a></li> 512 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/BySelector.html">BySelector</a></li> 513 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/Configurator.html">Configurator</a></li> 514 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/EventCondition.html">EventCondition</a></li> 515 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/SearchCondition.html">SearchCondition</a></li> 516 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiAutomatorInstrumentationTestRunner.html">UiAutomatorInstrumentationTestRunner</a></li> 517 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiAutomatorTestCase.html">UiAutomatorTestCase</a></li> 518 <li class="selected api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html">UiCollection</a></li> 519 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiDevice.html">UiDevice</a></li> 520 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></li> 521 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiObject2.html">UiObject2</a></li> 522 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiObject2Condition.html">UiObject2Condition</a></li> 523 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></li> 524 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></li> 525 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/Until.html">Until</a></li> 526 </ul> 527 </li> 528 529 <li><h2>Enums</h2> 530 <ul> 531 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/Direction.html">Direction</a></li> 532 </ul> 533 </li> 534 535 <li><h2>Exceptions</h2> 536 <ul> 537 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/StaleObjectException.html">StaleObjectException</a></li> 538 <li class="api apilevel-"><a href="../../../../../reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></li> 539 </ul> 540 </li> 541 542 </ul><br/> 543 544 545 </div><!-- end classes --> 546 </div><!-- end nav-panels --> 547 <div id="nav-tree" style="display:none" class="scroll-pane"> 548 <div id="tree-list"></div> 549 </div><!-- end nav-tree --> 550 </div><!-- end swapper --> 551 <div id="nav-swap"> 552 <a class="fullscreen">fullscreen</a> 553 <a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a> 554 </div> 555 </div> <!-- end devdoc-nav --> 556 </div> <!-- end side-nav --> 557 <script type="text/javascript"> 558 // init fullscreen based on user pref 559 var fullscreen = readCookie("fullscreen"); 560 if (fullscreen != 0) { 561 if (fullscreen == "false") { 562 toggleFullscreen(false); 563 } else { 564 toggleFullscreen(true); 565 } 566 } 567 // init nav version for mobile 568 if (isMobile) { 569 swapNav(); // tree view should be used on mobile 570 $('#nav-swap').hide(); 571 } else { 572 chooseDefaultNav(); 573 if ($("#nav-tree").is(':visible')) { 574 init_default_navtree("../../../../../"); 575 } 576 } 577 // scroll the selected page into view 578 $(document).ready(function() { 579 scrollIntoView("packages-nav"); 580 scrollIntoView("classes-nav"); 581 }); 582 </script> 583 584 585 586 587 588<div class="col-12" id="doc-col"> 589 590<div id="api-info-block"> 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611<div class="sum-details-links"> 612 613Summary: 614 615 616 617 618 619 620 <a href="#inhconstants">Inherited Constants</a> 621 622 623 624 625 626 | <a href="#pubctors">Ctors</a> 627 628 629 630 631 | <a href="#pubmethods">Methods</a> 632 633 634 635 636 | <a href="#inhmethods">Inherited Methods</a> 637 638| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 639 640</div><!-- end sum-details-links --> 641<div class="api-level"> 642 643 644 645 646</div> 647</div><!-- end api-info-block --> 648 649 650<!-- ======== START OF CLASS DATA ======== --> 651 652<div id="jd-header"> 653 public 654 655 656 657 class 658<h1 itemprop="name">UiCollection</h1> 659 660 661 662 663 664 665 666 667 extends <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a><br/> 668 669 670 671 672 673 674 675 676 677 678 679 680</div><!-- end header --> 681 682<div id="naMessage"></div> 683 684<div id="jd-content" class="api apilevel-"> 685<table class="jd-inheritance-table"> 686 687 688 <tr> 689 690 <td colspan="3" class="jd-inheritance-class-cell">java.lang.Object</td> 691 </tr> 692 693 694 <tr> 695 696 <td class="jd-inheritance-space"> ↳</td> 697 698 <td colspan="2" class="jd-inheritance-class-cell"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">android.support.test.uiautomator.UiObject</a></td> 699 </tr> 700 701 702 <tr> 703 704 <td class="jd-inheritance-space"> </td> 705 706 <td class="jd-inheritance-space"> ↳</td> 707 708 <td colspan="1" class="jd-inheritance-class-cell">android.support.test.uiautomator.UiCollection</td> 709 </tr> 710 711 712</table> 713 714 715 716 717<table class="jd-sumtable jd-sumtable-subclasses"><tr><td colspan="12" style="border:none;margin:0;padding:0;"> 718 719 <a href="#" onclick="return toggleInherited(this, null)" id="subclasses-direct" class="jd-expando-trigger closed" 720 ><img id="subclasses-direct-trigger" 721 src="../../../../../assets/images/triangle-closed.png" 722 class="jd-expando-trigger-img" /></a>Known Direct Subclasses 723 724 <div id="subclasses-direct"> 725 <div id="subclasses-direct-list" 726 class="jd-inheritedlinks" 727 728 > 729 730 731 <a href="../../../../../reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a> 732 733 734 </div> 735 <div id="subclasses-direct-summary" 736 style="display: none;" 737 > 738 739 <table class="jd-sumtable-expando"> 740 741 <tr class="alt-color api apilevel-" > 742 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/uiautomator/UiScrollable.html">UiScrollable</a></td> 743 <td class="jd-descrcol" width="100%"> 744 UiScrollable is a <code><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html">UiCollection</a></code> and provides support for searching 745 for items in scrollable layout elements. 746 747 748 749 </td> 750 </tr> 751 752 753 </table> 754 755 </div> 756 </div> 757</td></tr></table> 758 759 760 761 762<div class="jd-descr"> 763 764 765<h2>Class Overview</h2> 766<p itemprop="articleBody">Used to enumerate a container's UI elements for the purpose of counting, 767 or targeting a sub elements by a child's text or description.</p> 768 769 770 771 772 773</div><!-- jd-descr --> 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790<div class="jd-descr"> 791 792 793<h2>Summary</h2> 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810<!-- =========== ENUM CONSTANT SUMMARY =========== --> 811<table id="inhconstants" class="jd-sumtable"><tr><th> 812 <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> 813 <div style="clear:left;">Inherited Constants</div></th></tr> 814 815 816<tr class="api apilevel-" > 817<td colspan="12"> 818 819 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.support.test.uiautomator.UiObject" class="jd-expando-trigger closed" 820 ><img id="inherited-constants-android.support.test.uiautomator.UiObject-trigger" 821 src="../../../../../assets/images/triangle-closed.png" 822 class="jd-expando-trigger-img" /></a>From class 823<a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">android.support.test.uiautomator.UiObject</a> 824<div id="inherited-constants-android.support.test.uiautomator.UiObject"> 825 <div id="inherited-constants-android.support.test.uiautomator.UiObject-list" 826 class="jd-inheritedlinks"> 827 </div> 828 <div id="inherited-constants-android.support.test.uiautomator.UiObject-summary" style="display: none;"> 829 <table class="jd-sumtable-expando"> 830 831 832 833 <tr class="alt-color api apilevel-" > 834 <td class="jd-typecol">int</td> 835 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#FINGER_TOUCH_HALF_WIDTH">FINGER_TOUCH_HALF_WIDTH</a></td> 836 <td class="jd-descrcol" width="100%"> 837 838 839 840 841 </td> 842 </tr> 843 844 845 <tr class=" api apilevel-" > 846 <td class="jd-typecol">int</td> 847 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#SWIPE_MARGIN_LIMIT">SWIPE_MARGIN_LIMIT</a></td> 848 <td class="jd-descrcol" width="100%"> 849 850 851 852 853 </td> 854 </tr> 855 856 857 <tr class="alt-color api apilevel-" > 858 <td class="jd-typecol">long</td> 859 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#WAIT_FOR_EVENT_TMEOUT">WAIT_FOR_EVENT_TMEOUT</a></td> 860 <td class="jd-descrcol" width="100%"> 861 <em> 862 This constant is deprecated. 863 use <code><a href="../../../../../reference/android/support/test/uiautomator/Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code> 864</em> 865 866 867 868 </td> 869 </tr> 870 871 872 <tr class=" api apilevel-" > 873 <td class="jd-typecol">long</td> 874 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#WAIT_FOR_SELECTOR_POLL">WAIT_FOR_SELECTOR_POLL</a></td> 875 <td class="jd-descrcol" width="100%"> 876 877 878 879 880 </td> 881 </tr> 882 883 884 <tr class="alt-color api apilevel-" > 885 <td class="jd-typecol">long</td> 886 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#WAIT_FOR_SELECTOR_TIMEOUT">WAIT_FOR_SELECTOR_TIMEOUT</a></td> 887 <td class="jd-descrcol" width="100%"> 888 <em> 889 This constant is deprecated. 890 use <code><a href="../../../../../reference/android/support/test/uiautomator/Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code> 891</em> 892 893 894 895 </td> 896 </tr> 897 898 899 <tr class=" api apilevel-" > 900 <td class="jd-typecol">long</td> 901 <td class="jd-linkcol"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#WAIT_FOR_WINDOW_TMEOUT">WAIT_FOR_WINDOW_TMEOUT</a></td> 902 <td class="jd-descrcol" width="100%"> 903 904 905 906 907 </td> 908 </tr> 909 910 911</table> 912 </div> 913</div> 914</td></tr> 915 916 917 918 919</table> 920 921 922 923 924 925 926 927 928 929<!-- ======== CONSTRUCTOR SUMMARY ======== --> 930<table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr> 931 932 933 934 935 <tr class="alt-color api apilevel-" > 936 <td class="jd-typecol"><nobr> 937 938 939 940 941 942 </nobr> 943 </td> 944 <td class="jd-linkcol" width="100%"><nobr> 945 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html#UiCollection(android.support.test.uiautomator.UiSelector)">UiCollection</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)</nobr> 946 947 <div class="jd-descrdiv"> 948 Constructs an instance as described by the selector 949 950 951 952 </div> 953 954 </td></tr> 955 956 957 958</table> 959 960 961 962 963 964 965<!-- ========== METHOD SUMMARY =========== --> 966<table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> 967 968 969 970 971 <tr class="alt-color api apilevel-" > 972 <td class="jd-typecol"><nobr> 973 974 975 976 977 978 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></nobr> 979 </td> 980 <td class="jd-linkcol" width="100%"><nobr> 981 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html#getChildByDescription(android.support.test.uiautomator.UiSelector, java.lang.String)">getChildByDescription</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern, String text)</nobr> 982 983 <div class="jd-descrdiv"> 984 Searches for child UI element within the constraints of this UiCollection <code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> 985 selector. 986 987 988 989 </div> 990 991 </td></tr> 992 993 994 995 <tr class=" api apilevel-" > 996 <td class="jd-typecol"><nobr> 997 998 999 1000 1001 1002 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></nobr> 1003 </td> 1004 <td class="jd-linkcol" width="100%"><nobr> 1005 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html#getChildByInstance(android.support.test.uiautomator.UiSelector, int)">getChildByInstance</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern, int instance)</nobr> 1006 1007 <div class="jd-descrdiv"> 1008 Searches for child UI element within the constraints of this UiCollection <code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> 1009 selector. 1010 1011 1012 1013 </div> 1014 1015 </td></tr> 1016 1017 1018 1019 <tr class="alt-color api apilevel-" > 1020 <td class="jd-typecol"><nobr> 1021 1022 1023 1024 1025 1026 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></nobr> 1027 </td> 1028 <td class="jd-linkcol" width="100%"><nobr> 1029 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html#getChildByText(android.support.test.uiautomator.UiSelector, java.lang.String)">getChildByText</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern, String text)</nobr> 1030 1031 <div class="jd-descrdiv"> 1032 Searches for child UI element within the constraints of this UiCollection <code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> 1033 selector. 1034 1035 1036 1037 </div> 1038 1039 </td></tr> 1040 1041 1042 1043 <tr class=" api apilevel-" > 1044 <td class="jd-typecol"><nobr> 1045 1046 1047 1048 1049 1050 int</nobr> 1051 </td> 1052 <td class="jd-linkcol" width="100%"><nobr> 1053 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html#getChildCount(android.support.test.uiautomator.UiSelector)">getChildCount</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern)</nobr> 1054 1055 <div class="jd-descrdiv"> 1056 Counts child UI element instances matching the <code>childPattern</code> 1057 argument. 1058 1059 1060 1061 </div> 1062 1063 </td></tr> 1064 1065 1066 1067</table> 1068 1069 1070 1071 1072 1073 1074 1075<!-- ========== METHOD SUMMARY =========== --> 1076<table id="inhmethods" class="jd-sumtable"><tr><th> 1077 <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> 1078 <div style="clear:left;">Inherited Methods</div></th></tr> 1079 1080 1081<tr class="api apilevel-" > 1082<td colspan="12"> 1083 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.support.test.uiautomator.UiObject" class="jd-expando-trigger closed" 1084 ><img id="inherited-methods-android.support.test.uiautomator.UiObject-trigger" 1085 src="../../../../../assets/images/triangle-closed.png" 1086 class="jd-expando-trigger-img" /></a> 1087From class 1088 1089 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">android.support.test.uiautomator.UiObject</a> 1090 1091<div id="inherited-methods-android.support.test.uiautomator.UiObject"> 1092 <div id="inherited-methods-android.support.test.uiautomator.UiObject-list" 1093 class="jd-inheritedlinks"> 1094 </div> 1095 <div id="inherited-methods-android.support.test.uiautomator.UiObject-summary" style="display: none;"> 1096 <table class="jd-sumtable-expando"> 1097 1098 1099 1100 1101 <tr class="alt-color api apilevel-" > 1102 <td class="jd-typecol"><nobr> 1103 1104 1105 1106 1107 1108 void</nobr> 1109 </td> 1110 <td class="jd-linkcol" width="100%"><nobr> 1111 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#clearTextField()">clearTextField</a></span>()</nobr> 1112 1113 <div class="jd-descrdiv"> 1114 Clears the existing text contents in an editable field. 1115 1116 1117 1118 </div> 1119 1120 </td></tr> 1121 1122 1123 1124 <tr class=" api apilevel-" > 1125 <td class="jd-typecol"><nobr> 1126 1127 1128 1129 1130 1131 boolean</nobr> 1132 </td> 1133 <td class="jd-linkcol" width="100%"><nobr> 1134 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#click()">click</a></span>()</nobr> 1135 1136 <div class="jd-descrdiv"> 1137 Performs a click at the center of the visible bounds of the UI element represented 1138 by this UiObject. 1139 1140 1141 1142 </div> 1143 1144 </td></tr> 1145 1146 1147 1148 <tr class="alt-color api apilevel-" > 1149 <td class="jd-typecol"><nobr> 1150 1151 1152 1153 1154 1155 boolean</nobr> 1156 </td> 1157 <td class="jd-linkcol" width="100%"><nobr> 1158 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)</nobr> 1159 1160 <div class="jd-descrdiv"> 1161 Performs a click at the center of the visible bounds of the UI element represented 1162 by this UiObject and waits for window transitions. 1163 1164 1165 1166 </div> 1167 1168 </td></tr> 1169 1170 1171 1172 <tr class=" api apilevel-" > 1173 <td class="jd-typecol"><nobr> 1174 1175 1176 1177 1178 1179 boolean</nobr> 1180 </td> 1181 <td class="jd-linkcol" width="100%"><nobr> 1182 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()</nobr> 1183 1184 <div class="jd-descrdiv"> 1185 Waits for window transitions that would typically take longer than the 1186 usual default timeouts. 1187 1188 1189 1190 </div> 1191 1192 </td></tr> 1193 1194 1195 1196 <tr class="alt-color api apilevel-" > 1197 <td class="jd-typecol"><nobr> 1198 1199 1200 1201 1202 1203 boolean</nobr> 1204 </td> 1205 <td class="jd-linkcol" width="100%"><nobr> 1206 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#clickBottomRight()">clickBottomRight</a></span>()</nobr> 1207 1208 <div class="jd-descrdiv"> 1209 Clicks the bottom and right corner of the UI element 1210 1211 1212 1213 </div> 1214 1215 </td></tr> 1216 1217 1218 1219 <tr class=" api apilevel-" > 1220 <td class="jd-typecol"><nobr> 1221 1222 1223 1224 1225 1226 boolean</nobr> 1227 </td> 1228 <td class="jd-linkcol" width="100%"><nobr> 1229 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#clickTopLeft()">clickTopLeft</a></span>()</nobr> 1230 1231 <div class="jd-descrdiv"> 1232 Clicks the top and left corner of the UI element 1233 1234 1235 1236 </div> 1237 1238 </td></tr> 1239 1240 1241 1242 <tr class="alt-color api apilevel-" > 1243 <td class="jd-typecol"><nobr> 1244 1245 1246 1247 1248 1249 boolean</nobr> 1250 </td> 1251 <td class="jd-linkcol" width="100%"><nobr> 1252 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#dragTo(android.support.test.uiautomator.UiObject, int)">dragTo</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a> destObj, int steps)</nobr> 1253 1254 <div class="jd-descrdiv"> 1255 Drags this object to a destination UiObject. 1256 1257 1258 1259 </div> 1260 1261 </td></tr> 1262 1263 1264 1265 <tr class=" api apilevel-" > 1266 <td class="jd-typecol"><nobr> 1267 1268 1269 1270 1271 1272 boolean</nobr> 1273 </td> 1274 <td class="jd-linkcol" width="100%"><nobr> 1275 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#dragTo(int, int, int)">dragTo</a></span>(int destX, int destY, int steps)</nobr> 1276 1277 <div class="jd-descrdiv"> 1278 Drags this object to arbitrary coordinates. 1279 1280 1281 1282 </div> 1283 1284 </td></tr> 1285 1286 1287 1288 <tr class="alt-color api apilevel-" > 1289 <td class="jd-typecol"><nobr> 1290 1291 1292 1293 1294 1295 boolean</nobr> 1296 </td> 1297 <td class="jd-linkcol" width="100%"><nobr> 1298 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#exists()">exists</a></span>()</nobr> 1299 1300 <div class="jd-descrdiv"> 1301 Check if view exists. 1302 1303 1304 1305 </div> 1306 1307 </td></tr> 1308 1309 1310 1311 <tr class=" api apilevel-" > 1312 <td class="jd-typecol"><nobr> 1313 1314 1315 1316 1317 1318 AccessibilityNodeInfo</nobr> 1319 </td> 1320 <td class="jd-linkcol" width="100%"><nobr> 1321 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#findAccessibilityNodeInfo(long)">findAccessibilityNodeInfo</a></span>(long timeout)</nobr> 1322 1323 <div class="jd-descrdiv"> 1324 Finds a matching UI element in the accessibility hierarchy, by 1325 using the selector for this UiObject. 1326 1327 1328 1329 </div> 1330 1331 </td></tr> 1332 1333 1334 1335 <tr class="alt-color api apilevel-" > 1336 <td class="jd-typecol"><nobr> 1337 1338 1339 1340 1341 1342 Rect</nobr> 1343 </td> 1344 <td class="jd-linkcol" width="100%"><nobr> 1345 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getBounds()">getBounds</a></span>()</nobr> 1346 1347 <div class="jd-descrdiv"> 1348 Returns the view's <code>bounds</code> property. 1349 1350 1351 1352 </div> 1353 1354 </td></tr> 1355 1356 1357 1358 <tr class=" api apilevel-" > 1359 <td class="jd-typecol"><nobr> 1360 1361 1362 1363 1364 1365 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></nobr> 1366 </td> 1367 <td class="jd-linkcol" width="100%"><nobr> 1368 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getChild(android.support.test.uiautomator.UiSelector)">getChild</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)</nobr> 1369 1370 <div class="jd-descrdiv"> 1371 Creates a new UiObject for a child view that is under the present UiObject. 1372 1373 1374 1375 </div> 1376 1377 </td></tr> 1378 1379 1380 1381 <tr class="alt-color api apilevel-" > 1382 <td class="jd-typecol"><nobr> 1383 1384 1385 1386 1387 1388 int</nobr> 1389 </td> 1390 <td class="jd-linkcol" width="100%"><nobr> 1391 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getChildCount()">getChildCount</a></span>()</nobr> 1392 1393 <div class="jd-descrdiv"> 1394 Counts the child views immediately under the present UiObject. 1395 1396 1397 1398 </div> 1399 1400 </td></tr> 1401 1402 1403 1404 <tr class=" api apilevel-" > 1405 <td class="jd-typecol"><nobr> 1406 1407 1408 1409 1410 1411 String</nobr> 1412 </td> 1413 <td class="jd-linkcol" width="100%"><nobr> 1414 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getClassName()">getClassName</a></span>()</nobr> 1415 1416 <div class="jd-descrdiv"> 1417 Retrieves the <code>className</code> property of the UI element. 1418 1419 1420 1421 </div> 1422 1423 </td></tr> 1424 1425 1426 1427 <tr class="alt-color api apilevel-" > 1428 <td class="jd-typecol"><nobr> 1429 1430 1431 1432 1433 1434 String</nobr> 1435 </td> 1436 <td class="jd-linkcol" width="100%"><nobr> 1437 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getContentDescription()">getContentDescription</a></span>()</nobr> 1438 1439 <div class="jd-descrdiv"> 1440 Reads the <code>content_desc</code> property of the UI element 1441 1442 1443 1444 </div> 1445 1446 </td></tr> 1447 1448 1449 1450 <tr class=" api apilevel-" > 1451 <td class="jd-typecol"><nobr> 1452 1453 1454 1455 1456 1457 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></nobr> 1458 </td> 1459 <td class="jd-linkcol" width="100%"><nobr> 1460 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getFromParent(android.support.test.uiautomator.UiSelector)">getFromParent</a></span>(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)</nobr> 1461 1462 <div class="jd-descrdiv"> 1463 Creates a new UiObject for a sibling view or a child of the sibling view, 1464 relative to the present UiObject. 1465 1466 1467 1468 </div> 1469 1470 </td></tr> 1471 1472 1473 1474 <tr class="alt-color api apilevel-" > 1475 <td class="jd-typecol"><nobr> 1476 1477 1478 1479 1480 1481 String</nobr> 1482 </td> 1483 <td class="jd-linkcol" width="100%"><nobr> 1484 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getPackageName()">getPackageName</a></span>()</nobr> 1485 1486 <div class="jd-descrdiv"> 1487 Reads the view's <code>package</code> property 1488 1489 1490 1491 </div> 1492 1493 </td></tr> 1494 1495 1496 1497 <tr class=" api apilevel-" > 1498 <td class="jd-typecol"><nobr> 1499 1500 1501 final 1502 1503 1504 <a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></nobr> 1505 </td> 1506 <td class="jd-linkcol" width="100%"><nobr> 1507 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getSelector()">getSelector</a></span>()</nobr> 1508 1509 <div class="jd-descrdiv"> 1510 Debugging helper. 1511 1512 1513 1514 </div> 1515 1516 </td></tr> 1517 1518 1519 1520 <tr class="alt-color api apilevel-" > 1521 <td class="jd-typecol"><nobr> 1522 1523 1524 1525 1526 1527 String</nobr> 1528 </td> 1529 <td class="jd-linkcol" width="100%"><nobr> 1530 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getText()">getText</a></span>()</nobr> 1531 1532 <div class="jd-descrdiv"> 1533 Reads the <code>text</code> property of the UI element 1534 1535 1536 1537 </div> 1538 1539 </td></tr> 1540 1541 1542 1543 <tr class=" api apilevel-" > 1544 <td class="jd-typecol"><nobr> 1545 1546 1547 1548 1549 1550 Rect</nobr> 1551 </td> 1552 <td class="jd-linkcol" width="100%"><nobr> 1553 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#getVisibleBounds()">getVisibleBounds</a></span>()</nobr> 1554 1555 <div class="jd-descrdiv"> 1556 Returns the visible bounds of the view. 1557 1558 1559 1560 </div> 1561 1562 </td></tr> 1563 1564 1565 1566 <tr class="alt-color api apilevel-" > 1567 <td class="jd-typecol"><nobr> 1568 1569 1570 1571 1572 1573 boolean</nobr> 1574 </td> 1575 <td class="jd-linkcol" width="100%"><nobr> 1576 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isCheckable()">isCheckable</a></span>()</nobr> 1577 1578 <div class="jd-descrdiv"> 1579 Checks if the UI element's <code>checkable</code> property is currently true. 1580 1581 1582 1583 </div> 1584 1585 </td></tr> 1586 1587 1588 1589 <tr class=" api apilevel-" > 1590 <td class="jd-typecol"><nobr> 1591 1592 1593 1594 1595 1596 boolean</nobr> 1597 </td> 1598 <td class="jd-linkcol" width="100%"><nobr> 1599 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isChecked()">isChecked</a></span>()</nobr> 1600 1601 <div class="jd-descrdiv"> 1602 Check if the UI element's <code>checked</code> property is currently true 1603 1604 1605 1606 </div> 1607 1608 </td></tr> 1609 1610 1611 1612 <tr class="alt-color api apilevel-" > 1613 <td class="jd-typecol"><nobr> 1614 1615 1616 1617 1618 1619 boolean</nobr> 1620 </td> 1621 <td class="jd-linkcol" width="100%"><nobr> 1622 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isClickable()">isClickable</a></span>()</nobr> 1623 1624 <div class="jd-descrdiv"> 1625 Checks if the UI element's <code>clickable</code> property is currently true. 1626 1627 1628 1629 </div> 1630 1631 </td></tr> 1632 1633 1634 1635 <tr class=" api apilevel-" > 1636 <td class="jd-typecol"><nobr> 1637 1638 1639 1640 1641 1642 boolean</nobr> 1643 </td> 1644 <td class="jd-linkcol" width="100%"><nobr> 1645 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isEnabled()">isEnabled</a></span>()</nobr> 1646 1647 <div class="jd-descrdiv"> 1648 Checks if the UI element's <code>enabled</code> property is currently true. 1649 1650 1651 1652 </div> 1653 1654 </td></tr> 1655 1656 1657 1658 <tr class="alt-color api apilevel-" > 1659 <td class="jd-typecol"><nobr> 1660 1661 1662 1663 1664 1665 boolean</nobr> 1666 </td> 1667 <td class="jd-linkcol" width="100%"><nobr> 1668 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isFocusable()">isFocusable</a></span>()</nobr> 1669 1670 <div class="jd-descrdiv"> 1671 Check if the UI element's <code>focusable</code> property is currently true. 1672 1673 1674 1675 </div> 1676 1677 </td></tr> 1678 1679 1680 1681 <tr class=" api apilevel-" > 1682 <td class="jd-typecol"><nobr> 1683 1684 1685 1686 1687 1688 boolean</nobr> 1689 </td> 1690 <td class="jd-linkcol" width="100%"><nobr> 1691 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isFocused()">isFocused</a></span>()</nobr> 1692 1693 <div class="jd-descrdiv"> 1694 Check if the UI element's <code>focused</code> property is currently true 1695 1696 1697 1698 </div> 1699 1700 </td></tr> 1701 1702 1703 1704 <tr class="alt-color api apilevel-" > 1705 <td class="jd-typecol"><nobr> 1706 1707 1708 1709 1710 1711 boolean</nobr> 1712 </td> 1713 <td class="jd-linkcol" width="100%"><nobr> 1714 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isLongClickable()">isLongClickable</a></span>()</nobr> 1715 1716 <div class="jd-descrdiv"> 1717 Check if the view's <code>long-clickable</code> property is currently true 1718 1719 1720 1721 </div> 1722 1723 </td></tr> 1724 1725 1726 1727 <tr class=" api apilevel-" > 1728 <td class="jd-typecol"><nobr> 1729 1730 1731 1732 1733 1734 boolean</nobr> 1735 </td> 1736 <td class="jd-linkcol" width="100%"><nobr> 1737 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isScrollable()">isScrollable</a></span>()</nobr> 1738 1739 <div class="jd-descrdiv"> 1740 Check if the view's <code>scrollable</code> property is currently true 1741 1742 1743 1744 </div> 1745 1746 </td></tr> 1747 1748 1749 1750 <tr class="alt-color api apilevel-" > 1751 <td class="jd-typecol"><nobr> 1752 1753 1754 1755 1756 1757 boolean</nobr> 1758 </td> 1759 <td class="jd-linkcol" width="100%"><nobr> 1760 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#isSelected()">isSelected</a></span>()</nobr> 1761 1762 <div class="jd-descrdiv"> 1763 Checks if the UI element's <code>selected</code> property is currently true. 1764 1765 1766 1767 </div> 1768 1769 </td></tr> 1770 1771 1772 1773 <tr class=" api apilevel-" > 1774 <td class="jd-typecol"><nobr> 1775 1776 1777 1778 1779 1780 boolean</nobr> 1781 </td> 1782 <td class="jd-linkcol" width="100%"><nobr> 1783 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#longClick()">longClick</a></span>()</nobr> 1784 1785 <div class="jd-descrdiv"> 1786 Long clicks the center of the visible bounds of the UI element 1787 1788 1789 1790 </div> 1791 1792 </td></tr> 1793 1794 1795 1796 <tr class="alt-color api apilevel-" > 1797 <td class="jd-typecol"><nobr> 1798 1799 1800 1801 1802 1803 boolean</nobr> 1804 </td> 1805 <td class="jd-linkcol" width="100%"><nobr> 1806 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#longClickBottomRight()">longClickBottomRight</a></span>()</nobr> 1807 1808 <div class="jd-descrdiv"> 1809 Long clicks bottom and right corner of the UI element 1810 1811 1812 1813 </div> 1814 1815 </td></tr> 1816 1817 1818 1819 <tr class=" api apilevel-" > 1820 <td class="jd-typecol"><nobr> 1821 1822 1823 1824 1825 1826 boolean</nobr> 1827 </td> 1828 <td class="jd-linkcol" width="100%"><nobr> 1829 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#longClickTopLeft()">longClickTopLeft</a></span>()</nobr> 1830 1831 <div class="jd-descrdiv"> 1832 Long clicks on the top and left corner of the UI element 1833 1834 1835 1836 </div> 1837 1838 </td></tr> 1839 1840 1841 1842 <tr class="alt-color api apilevel-" > 1843 <td class="jd-typecol"><nobr> 1844 1845 1846 1847 1848 1849 boolean</nobr> 1850 </td> 1851 <td class="jd-linkcol" width="100%"><nobr> 1852 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)">performMultiPointerGesture</a></span>(PointerCoords... touches)</nobr> 1853 1854 <div class="jd-descrdiv"> 1855 Performs a multi-touch gesture. 1856 1857 1858 1859 </div> 1860 1861 </td></tr> 1862 1863 1864 1865 <tr class=" api apilevel-" > 1866 <td class="jd-typecol"><nobr> 1867 1868 1869 1870 1871 1872 boolean</nobr> 1873 </td> 1874 <td class="jd-linkcol" width="100%"><nobr> 1875 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int)">performTwoPointerGesture</a></span>(Point startPoint1, Point startPoint2, Point endPoint1, Point endPoint2, int steps)</nobr> 1876 1877 <div class="jd-descrdiv"> 1878 Generates a two-pointer gesture with arbitrary starting and ending points. 1879 1880 1881 1882 </div> 1883 1884 </td></tr> 1885 1886 1887 1888 <tr class="alt-color api apilevel-" > 1889 <td class="jd-typecol"><nobr> 1890 1891 1892 1893 1894 1895 boolean</nobr> 1896 </td> 1897 <td class="jd-linkcol" width="100%"><nobr> 1898 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#pinchIn(int, int)">pinchIn</a></span>(int percent, int steps)</nobr> 1899 1900 <div class="jd-descrdiv"> 1901 Performs a two-pointer gesture, where each pointer moves diagonally 1902 toward the other, from the edges to the center of this UiObject . 1903 1904 1905 1906 </div> 1907 1908 </td></tr> 1909 1910 1911 1912 <tr class=" api apilevel-" > 1913 <td class="jd-typecol"><nobr> 1914 1915 1916 1917 1918 1919 boolean</nobr> 1920 </td> 1921 <td class="jd-linkcol" width="100%"><nobr> 1922 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#pinchOut(int, int)">pinchOut</a></span>(int percent, int steps)</nobr> 1923 1924 <div class="jd-descrdiv"> 1925 Performs a two-pointer gesture, where each pointer moves diagonally 1926 opposite across the other, from the center out towards the edges of the 1927 this UiObject. 1928 1929 1930 1931 </div> 1932 1933 </td></tr> 1934 1935 1936 1937 <tr class="alt-color api apilevel-" > 1938 <td class="jd-typecol"><nobr> 1939 1940 1941 1942 1943 1944 boolean</nobr> 1945 </td> 1946 <td class="jd-linkcol" width="100%"><nobr> 1947 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#setText(java.lang.String)">setText</a></span>(String text)</nobr> 1948 1949 <div class="jd-descrdiv"> 1950 Sets the text in an editable field, after clearing the field's content. 1951 1952 1953 1954 </div> 1955 1956 </td></tr> 1957 1958 1959 1960 <tr class=" api apilevel-" > 1961 <td class="jd-typecol"><nobr> 1962 1963 1964 1965 1966 1967 boolean</nobr> 1968 </td> 1969 <td class="jd-linkcol" width="100%"><nobr> 1970 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#swipeDown(int)">swipeDown</a></span>(int steps)</nobr> 1971 1972 <div class="jd-descrdiv"> 1973 Performs the swipe down action on the UiObject. 1974 1975 1976 1977 </div> 1978 1979 </td></tr> 1980 1981 1982 1983 <tr class="alt-color api apilevel-" > 1984 <td class="jd-typecol"><nobr> 1985 1986 1987 1988 1989 1990 boolean</nobr> 1991 </td> 1992 <td class="jd-linkcol" width="100%"><nobr> 1993 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#swipeLeft(int)">swipeLeft</a></span>(int steps)</nobr> 1994 1995 <div class="jd-descrdiv"> 1996 Performs the swipe left action on the UiObject. 1997 1998 1999 2000 </div> 2001 2002 </td></tr> 2003 2004 2005 2006 <tr class=" api apilevel-" > 2007 <td class="jd-typecol"><nobr> 2008 2009 2010 2011 2012 2013 boolean</nobr> 2014 </td> 2015 <td class="jd-linkcol" width="100%"><nobr> 2016 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#swipeRight(int)">swipeRight</a></span>(int steps)</nobr> 2017 2018 <div class="jd-descrdiv"> 2019 Performs the swipe right action on the UiObject. 2020 2021 2022 2023 </div> 2024 2025 </td></tr> 2026 2027 2028 2029 <tr class="alt-color api apilevel-" > 2030 <td class="jd-typecol"><nobr> 2031 2032 2033 2034 2035 2036 boolean</nobr> 2037 </td> 2038 <td class="jd-linkcol" width="100%"><nobr> 2039 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#swipeUp(int)">swipeUp</a></span>(int steps)</nobr> 2040 2041 <div class="jd-descrdiv"> 2042 Performs the swipe up action on the UiObject. 2043 2044 2045 2046 </div> 2047 2048 </td></tr> 2049 2050 2051 2052 <tr class=" api apilevel-" > 2053 <td class="jd-typecol"><nobr> 2054 2055 2056 2057 2058 2059 boolean</nobr> 2060 </td> 2061 <td class="jd-linkcol" width="100%"><nobr> 2062 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#waitForExists(long)">waitForExists</a></span>(long timeout)</nobr> 2063 2064 <div class="jd-descrdiv"> 2065 Waits a specified length of time for a view to become visible. 2066 2067 2068 2069 </div> 2070 2071 </td></tr> 2072 2073 2074 2075 <tr class="alt-color api apilevel-" > 2076 <td class="jd-typecol"><nobr> 2077 2078 2079 2080 2081 2082 boolean</nobr> 2083 </td> 2084 <td class="jd-linkcol" width="100%"><nobr> 2085 <span class="sympad"><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)</nobr> 2086 2087 <div class="jd-descrdiv"> 2088 Waits a specified length of time for a view to become undetectable. 2089 2090 2091 2092 </div> 2093 2094 </td></tr> 2095 2096 2097</table> 2098 </div> 2099</div> 2100</td></tr> 2101 2102 2103 2104<tr class="api apilevel-" > 2105<td colspan="12"> 2106 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 2107 ><img id="inherited-methods-java.lang.Object-trigger" 2108 src="../../../../../assets/images/triangle-closed.png" 2109 class="jd-expando-trigger-img" /></a> 2110From class 2111 2112 java.lang.Object 2113 2114<div id="inherited-methods-java.lang.Object"> 2115 <div id="inherited-methods-java.lang.Object-list" 2116 class="jd-inheritedlinks"> 2117 </div> 2118 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 2119 <table class="jd-sumtable-expando"> 2120 2121 2122 2123 2124 <tr class="alt-color api apilevel-" > 2125 <td class="jd-typecol"><nobr> 2126 2127 2128 2129 2130 2131 Object</nobr> 2132 </td> 2133 <td class="jd-linkcol" width="100%"><nobr> 2134 <span class="sympad">clone</span>()</nobr> 2135 2136 </td></tr> 2137 2138 2139 2140 <tr class=" api apilevel-" > 2141 <td class="jd-typecol"><nobr> 2142 2143 2144 2145 2146 2147 boolean</nobr> 2148 </td> 2149 <td class="jd-linkcol" width="100%"><nobr> 2150 <span class="sympad">equals</span>(Object arg0)</nobr> 2151 2152 </td></tr> 2153 2154 2155 2156 <tr class="alt-color api apilevel-" > 2157 <td class="jd-typecol"><nobr> 2158 2159 2160 2161 2162 2163 void</nobr> 2164 </td> 2165 <td class="jd-linkcol" width="100%"><nobr> 2166 <span class="sympad">finalize</span>()</nobr> 2167 2168 </td></tr> 2169 2170 2171 2172 <tr class=" api apilevel-" > 2173 <td class="jd-typecol"><nobr> 2174 2175 2176 final 2177 2178 2179 Class<?></nobr> 2180 </td> 2181 <td class="jd-linkcol" width="100%"><nobr> 2182 <span class="sympad">getClass</span>()</nobr> 2183 2184 </td></tr> 2185 2186 2187 2188 <tr class="alt-color api apilevel-" > 2189 <td class="jd-typecol"><nobr> 2190 2191 2192 2193 2194 2195 int</nobr> 2196 </td> 2197 <td class="jd-linkcol" width="100%"><nobr> 2198 <span class="sympad">hashCode</span>()</nobr> 2199 2200 </td></tr> 2201 2202 2203 2204 <tr class=" api apilevel-" > 2205 <td class="jd-typecol"><nobr> 2206 2207 2208 final 2209 2210 2211 void</nobr> 2212 </td> 2213 <td class="jd-linkcol" width="100%"><nobr> 2214 <span class="sympad">notify</span>()</nobr> 2215 2216 </td></tr> 2217 2218 2219 2220 <tr class="alt-color api apilevel-" > 2221 <td class="jd-typecol"><nobr> 2222 2223 2224 final 2225 2226 2227 void</nobr> 2228 </td> 2229 <td class="jd-linkcol" width="100%"><nobr> 2230 <span class="sympad">notifyAll</span>()</nobr> 2231 2232 </td></tr> 2233 2234 2235 2236 <tr class=" api apilevel-" > 2237 <td class="jd-typecol"><nobr> 2238 2239 2240 2241 2242 2243 String</nobr> 2244 </td> 2245 <td class="jd-linkcol" width="100%"><nobr> 2246 <span class="sympad">toString</span>()</nobr> 2247 2248 </td></tr> 2249 2250 2251 2252 <tr class="alt-color api apilevel-" > 2253 <td class="jd-typecol"><nobr> 2254 2255 2256 final 2257 2258 2259 void</nobr> 2260 </td> 2261 <td class="jd-linkcol" width="100%"><nobr> 2262 <span class="sympad">wait</span>()</nobr> 2263 2264 </td></tr> 2265 2266 2267 2268 <tr class=" api apilevel-" > 2269 <td class="jd-typecol"><nobr> 2270 2271 2272 final 2273 2274 2275 void</nobr> 2276 </td> 2277 <td class="jd-linkcol" width="100%"><nobr> 2278 <span class="sympad">wait</span>(long arg0, int arg1)</nobr> 2279 2280 </td></tr> 2281 2282 2283 2284 <tr class="alt-color api apilevel-" > 2285 <td class="jd-typecol"><nobr> 2286 2287 2288 final 2289 2290 2291 void</nobr> 2292 </td> 2293 <td class="jd-linkcol" width="100%"><nobr> 2294 <span class="sympad">wait</span>(long arg0)</nobr> 2295 2296 </td></tr> 2297 2298 2299</table> 2300 </div> 2301</div> 2302</td></tr> 2303 2304 2305</table> 2306 2307 2308</div><!-- jd-descr (summary) --> 2309 2310<!-- Details --> 2311 2312 2313 2314 2315 2316 2317 2318 2319<!-- XML Attributes --> 2320 2321 2322<!-- Enum Values --> 2323 2324 2325<!-- Constants --> 2326 2327 2328<!-- Fields --> 2329 2330 2331<!-- Public ctors --> 2332 2333 2334<!-- ========= CONSTRUCTOR DETAIL ======== --> 2335<h2>Public Constructors</h2> 2336 2337 2338 2339<A NAME="UiCollection(android.support.test.uiautomator.UiSelector)"></A> 2340 2341<div class="jd-details api apilevel-"> 2342 <h4 class="jd-details-title"> 2343 <span class="normal"> 2344 public 2345 2346 2347 2348 2349 2350 </span> 2351 <span class="sympad">UiCollection</span> 2352 <span class="normal">(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> selector)</span> 2353 </h4> 2354 <div class="api-level"> 2355 <div></div> 2356 2357 2358 2359 </div> 2360 <div class="jd-details-descr"> 2361 2362 2363 2364 2365 <div class="jd-tagdata jd-tagdescr"><p>Constructs an instance as described by the selector</p></div> 2366 2367 </div> 2368</div> 2369 2370 2371 2372 2373 2374<!-- ========= CONSTRUCTOR DETAIL ======== --> 2375<!-- Protected ctors --> 2376 2377 2378 2379<!-- ========= METHOD DETAIL ======== --> 2380<!-- Public methdos --> 2381 2382<h2>Public Methods</h2> 2383 2384 2385 2386<A NAME="getChildByDescription(android.support.test.uiautomator.UiSelector, java.lang.String)"></A> 2387 2388<div class="jd-details api apilevel-"> 2389 <h4 class="jd-details-title"> 2390 <span class="normal"> 2391 public 2392 2393 2394 2395 2396 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a> 2397 </span> 2398 <span class="sympad">getChildByDescription</span> 2399 <span class="normal">(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern, String text)</span> 2400 </h4> 2401 <div class="api-level"> 2402 <div></div> 2403 2404 2405 2406 </div> 2407 <div class="jd-details-descr"> 2408 2409 2410 2411 2412 <div class="jd-tagdata jd-tagdescr"><p>Searches for child UI element within the constraints of this UiCollection <code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> 2413 selector. 2414 2415 It looks for any child matching the <code>childPattern</code> argument that has 2416 a child UI element anywhere within its sub hierarchy that has content-description text. 2417 The returned UiObject will point at the <code>childPattern</code> instance that matched the 2418 search and not at the identifying child element that matched the content description.</p></p></div> 2419 <div class="jd-tagdata"> 2420 <h5 class="jd-tagtitle">Parameters</h5> 2421 <table class="jd-tagtable"> 2422 <tr> 2423 <th>childPattern</td> 2424 <td><code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td> 2425 </tr> 2426 <tr> 2427 <th>text</td> 2428 <td>String of the identifying child contents of of the <code>childPattern</code></td> 2429 </tr> 2430 </table> 2431 </div> 2432 <div class="jd-tagdata"> 2433 <h5 class="jd-tagtitle">Returns</h5> 2434 <ul class="nolist"><li><code><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code></li></ul> 2435 </div> 2436 <div class="jd-tagdata"> 2437 <h5 class="jd-tagtitle">Throws</h5> 2438 <table class="jd-tagtable"> 2439 <tr> 2440 <th></td> 2441 <td>UiObjectNotFoundException</td> 2442 </tr> 2443 <tr> 2444 <th><a href="../../../../../reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2445 <td></td> 2446 </tr> 2447 </table> 2448 </div> 2449 2450 </div> 2451</div> 2452 2453 2454<A NAME="getChildByInstance(android.support.test.uiautomator.UiSelector, int)"></A> 2455 2456<div class="jd-details api apilevel-"> 2457 <h4 class="jd-details-title"> 2458 <span class="normal"> 2459 public 2460 2461 2462 2463 2464 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a> 2465 </span> 2466 <span class="sympad">getChildByInstance</span> 2467 <span class="normal">(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern, int instance)</span> 2468 </h4> 2469 <div class="api-level"> 2470 <div></div> 2471 2472 2473 2474 </div> 2475 <div class="jd-details-descr"> 2476 2477 2478 2479 2480 <div class="jd-tagdata jd-tagdescr"><p>Searches for child UI element within the constraints of this UiCollection <code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> 2481 selector. 2482 2483 It looks for any child matching the <code>childPattern</code> argument that has 2484 a child UI element anywhere within its sub hierarchy that is at the <code>instance</code> 2485 specified. The operation is performed only on the visible items and no scrolling is performed 2486 in this case.</p></div> 2487 <div class="jd-tagdata"> 2488 <h5 class="jd-tagtitle">Parameters</h5> 2489 <table class="jd-tagtable"> 2490 <tr> 2491 <th>childPattern</td> 2492 <td><code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td> 2493 </tr> 2494 <tr> 2495 <th>instance</td> 2496 <td>int the desired matched instance of this <code>childPattern</code></td> 2497 </tr> 2498 </table> 2499 </div> 2500 <div class="jd-tagdata"> 2501 <h5 class="jd-tagtitle">Returns</h5> 2502 <ul class="nolist"><li><code><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code></li></ul> 2503 </div> 2504 <div class="jd-tagdata"> 2505 <h5 class="jd-tagtitle">Throws</h5> 2506 <table class="jd-tagtable"> 2507 <tr> 2508 <th><a href="../../../../../reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2509 <td></td> 2510 </tr> 2511 </table> 2512 </div> 2513 2514 </div> 2515</div> 2516 2517 2518<A NAME="getChildByText(android.support.test.uiautomator.UiSelector, java.lang.String)"></A> 2519 2520<div class="jd-details api apilevel-"> 2521 <h4 class="jd-details-title"> 2522 <span class="normal"> 2523 public 2524 2525 2526 2527 2528 <a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a> 2529 </span> 2530 <span class="sympad">getChildByText</span> 2531 <span class="normal">(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern, String text)</span> 2532 </h4> 2533 <div class="api-level"> 2534 <div></div> 2535 2536 2537 2538 </div> 2539 <div class="jd-details-descr"> 2540 2541 2542 2543 2544 <div class="jd-tagdata jd-tagdescr"><p>Searches for child UI element within the constraints of this UiCollection <code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> 2545 selector. 2546 2547 It looks for any child matching the <code>childPattern</code> argument that has 2548 a child UI element anywhere within its sub hierarchy that has text attribute = 2549 <code>text</code>. The returned UiObject will point at the <code>childPattern</code> 2550 instance that matched the search and not at the identifying child element that matched the 2551 text attribute.</p></p></div> 2552 <div class="jd-tagdata"> 2553 <h5 class="jd-tagtitle">Parameters</h5> 2554 <table class="jd-tagtable"> 2555 <tr> 2556 <th>childPattern</td> 2557 <td><code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> selector of the child pattern to match and return</td> 2558 </tr> 2559 <tr> 2560 <th>text</td> 2561 <td>String of the identifying child contents of of the <code>childPattern</code></td> 2562 </tr> 2563 </table> 2564 </div> 2565 <div class="jd-tagdata"> 2566 <h5 class="jd-tagtitle">Returns</h5> 2567 <ul class="nolist"><li><code><a href="../../../../../reference/android/support/test/uiautomator/UiObject.html">UiObject</a></code> pointing at and instance of <code>childPattern</code></li></ul> 2568 </div> 2569 <div class="jd-tagdata"> 2570 <h5 class="jd-tagtitle">Throws</h5> 2571 <table class="jd-tagtable"> 2572 <tr> 2573 <th></td> 2574 <td>UiObjectNotFoundException</td> 2575 </tr> 2576 <tr> 2577 <th><a href="../../../../../reference/android/support/test/uiautomator/UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2578 <td></td> 2579 </tr> 2580 </table> 2581 </div> 2582 2583 </div> 2584</div> 2585 2586 2587<A NAME="getChildCount(android.support.test.uiautomator.UiSelector)"></A> 2588 2589<div class="jd-details api apilevel-"> 2590 <h4 class="jd-details-title"> 2591 <span class="normal"> 2592 public 2593 2594 2595 2596 2597 int 2598 </span> 2599 <span class="sympad">getChildCount</span> 2600 <span class="normal">(<a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a> childPattern)</span> 2601 </h4> 2602 <div class="api-level"> 2603 <div></div> 2604 2605 2606 2607 </div> 2608 <div class="jd-details-descr"> 2609 2610 2611 2612 2613 <div class="jd-tagdata jd-tagdescr"><p>Counts child UI element instances matching the <code>childPattern</code> 2614 argument. The method returns the number of matching UI elements that are 2615 currently visible. The count does not include items of a scrollable list 2616 that are off-screen.</p></div> 2617 <div class="jd-tagdata"> 2618 <h5 class="jd-tagtitle">Parameters</h5> 2619 <table class="jd-tagtable"> 2620 <tr> 2621 <th>childPattern</td> 2622 <td>a <code><a href="../../../../../reference/android/support/test/uiautomator/UiSelector.html">UiSelector</a></code> that represents the matching child UI 2623 elements to count</td> 2624 </tr> 2625 </table> 2626 </div> 2627 <div class="jd-tagdata"> 2628 <h5 class="jd-tagtitle">Returns</h5> 2629 <ul class="nolist"><li>the number of matched childPattern under the current <code><a href="../../../../../reference/android/support/test/uiautomator/UiCollection.html">UiCollection</a></code></li></ul> 2630 </div> 2631 2632 </div> 2633</div> 2634 2635 2636 2637 2638 2639<!-- ========= METHOD DETAIL ======== --> 2640 2641 2642 2643<!-- ========= END OF CLASS DATA ========= --> 2644<A NAME="navbar_top"></A> 2645</div> <!-- jd-content --> 2646 2647<div class="wrap"> 2648 <div class="dac-footer"> 2649 <div class="cols dac-footer-main"> 2650 <div class="col-1of2"> 2651 <a class="dac-footer-getnews" data-modal-toggle="newsletter" href="javascript:;">Get news & tips <span 2652 class="dac-fab dac-primary"><i class="dac-sprite dac-mail"></i></span></a> 2653 </div> 2654 <div class="col-1of2 dac-footer-reachout"> 2655 <div class="dac-footer-contact"> 2656 <a class="dac-footer-contact-link" href="http://android-developers.blogspot.com/">Blog</a> 2657 <a class="dac-footer-contact-link" href="/support.html">Support</a> 2658 </div> 2659 <div class="dac-footer-social"> 2660 <a class="dac-fab dac-footer-social-link" href="https://www.youtube.com/user/androiddevelopers"><i class="dac-sprite dac-youtube"></i></a> 2661 <a class="dac-fab dac-footer-social-link" href="https://plus.google.com/+AndroidDevelopers"><i class="dac-sprite dac-gplus"></i></a> 2662 <a class="dac-fab dac-footer-social-link" href="https://twitter.com/AndroidDev"><i class="dac-sprite dac-twitter"></i></a> 2663 </div> 2664 </div> 2665 </div> 2666 2667 <hr class="dac-footer-separator"/> 2668 2669 2670 <p class="dac-footer-copyright"> 2671 2672 Except as noted, this content is licensed under <a 2673 href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. 2674 For details and restrictions, see the <a href="../../../../../license.html"> 2675 Content License</a>. 2676 </p> 2677 <p class="dac-footer-build"> 2678 2679 Android r — 2680<script src="../../../../../timestamp.js" type="text/javascript"></script> 2681<script>document.write(BUILD_TIMESTAMP)</script> 2682 2683 </p> 2684 2685 2686 <p class="dac-footer-links"> 2687 <a href="/about/index.html">About Android</a> 2688 <a href="/auto/index.html">Auto</a> 2689 <a href="/tv/index.html">TV</a> 2690 <a href="/wear/index.html">Wear</a> 2691 <a href="/legal.html">Legal</a> 2692 2693 <span id="language" class="locales"> 2694 <select name="language" onchange="changeLangPref(this.value, true)"> 2695 <option value="en" selected="selected">English</option> 2696 <option value="es">Español</option> 2697 <option value="ja">日本語</option> 2698 <option value="ko">한국어</option> 2699 <option value="ru">Русский</option> 2700 <option value="zh-cn">中文(简体)</option> 2701 <option value="zh-tw">中文(繁體)</option> 2702 </select> 2703 </span> 2704 </p> 2705 </div> 2706</div> <!-- end footer --> 2707 2708<div data-modal="newsletter" data-newsletter data-swap class="dac-modal newsletter"> 2709 <div class="dac-modal-container"> 2710 <div class="dac-modal-window"> 2711 <header class="dac-modal-header"> 2712 <button class="dac-modal-header-close" data-modal-toggle><i class="dac-sprite dac-close"></i></button> 2713 <div class="dac-swap" data-swap-container> 2714 <section class="dac-swap-section dac-active dac-down"> 2715 <h2 class="norule dac-modal-header-title">Get the latest Android developer news and tips that will help you find success on Google Play.</h2> 2716 <p class="dac-modal-header-subtitle">* Required Fields</p> 2717 </section> 2718 <section class="dac-swap-section dac-up"> 2719 <h2 class="norule dac-modal-header-title">Hooray!</h2> 2720 </section> 2721 </div> 2722 </header> 2723 <div class="dac-swap" data-swap-container> 2724 <section class="dac-swap-section dac-active dac-left"> 2725 <form action="https://docs.google.com/forms/d/1QgnkzbEJIDu9lMEea0mxqWrXUJu0oBCLD7ar23V0Yys/formResponse" class="dac-form" method="post" target="dac-newsletter-iframe"> 2726 <section class="dac-modal-content"> 2727 <fieldset class="dac-form-fieldset"> 2728 <div class="cols"> 2729 <div class="col-1of2 newsletter-leftCol"> 2730 <div class="dac-form-input-group"> 2731 <label for="newsletter-full-name" class="dac-form-floatlabel">Full name</label> 2732 <input type="text" class="dac-form-input" name="entry.1357890476" id="newsletter-full-name" required> 2733 <span class="dac-form-required">*</span> 2734 </div> 2735 <div class="dac-form-input-group"> 2736 <label for="newsletter-email" class="dac-form-floatlabel">Email address</label> 2737 <input type="email" class="dac-form-input" name="entry.472100832" id="newsletter-email" required> 2738 <span class="dac-form-required">*</span> 2739 </div> 2740 </div> 2741 <div class="col-1of2 newsletter-rightCol"> 2742 <div class="dac-form-input-group"> 2743 <label for="newsletter-company" class="dac-form-floatlabel">Company / developer name</label> 2744 <input type="text" class="dac-form-input" name="entry.1664780309" id="newsletter-company"> 2745 </div> 2746 <div class="dac-form-input-group"> 2747 <label for="newsletter-play-store" class="dac-form-floatlabel">One of your Play Store app URLs</label> 2748 <input type="url" class="dac-form-input" name="entry.47013838" id="newsletter-play-store" required> 2749 <span class="dac-form-required">*</span> 2750 </div> 2751 </div> 2752 </div> 2753 </fieldset> 2754 <fieldset class="dac-form-fieldset"> 2755 <div class="cols"> 2756 <div class="col-1of2 newsletter-leftCol"> 2757 <legend class="dac-form-legend">Which best describes your business:<span class="dac-form-required">*</span> 2758 </legend> 2759 <div class="dac-form-radio-group"> 2760 <input type="radio" value="Apps" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-app" required> 2761 <label for="newsletter-business-type-app" class="dac-form-radio-button"></label> 2762 <label for="newsletter-business-type-app" class="dac-form-label">Apps</label> 2763 </div> 2764 <div class="dac-form-radio-group"> 2765 <input type="radio" value="Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-games" required> 2766 <label for="newsletter-business-type-games" class="dac-form-radio-button"></label> 2767 <label for="newsletter-business-type-games" class="dac-form-label">Games</label> 2768 </div> 2769 <div class="dac-form-radio-group"> 2770 <input type="radio" value="Apps and Games" class="dac-form-radio" name="entry.1796324055" id="newsletter-business-type-appsgames" required> 2771 <label for="newsletter-business-type-appsgames" class="dac-form-radio-button"></label> 2772 <label for="newsletter-business-type-appsgames" class="dac-form-label">Apps & Games</label> 2773 </div> 2774 </div> 2775 <div class="col-1of2 newsletter-rightCol newsletter-checkboxes"> 2776 <div class="dac-form-radio-group"> 2777 <div class="dac-media"> 2778 <div class="dac-media-figure"> 2779 <input type="checkbox" class="dac-form-checkbox" name="entry.732309842" id="newsletter-add" required value="Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities."> 2780 <label for="newsletter-add" class="dac-form-checkbox-button"></label> 2781 </div> 2782 <div class="dac-media-body"> 2783 <label for="newsletter-add" class="dac-form-label dac-form-aside">Add me to the mailing list for the monthly newsletter and occasional emails about development and Google Play opportunities.<span class="dac-form-required">*</span></label> 2784 </div> 2785 </div> 2786 </div> 2787 <div class="dac-form-radio-group"> 2788 <div class="dac-media"> 2789 <div class="dac-media-figure"> 2790 <input type="checkbox" class="dac-form-checkbox" name="entry.2045036090" id="newsletter-terms" required value="I acknowledge that the information provided in this form will be subject to Google's privacy policy (https://www.google.com/policies/privacy/)."> 2791 <label for="newsletter-terms" class="dac-form-checkbox-button"></label> 2792 </div> 2793 <div class="dac-media-body"> 2794 <label for="newsletter-terms" class="dac-form-label dac-form-aside">I acknowledge that the information provided in this form will be subject to <a href="https://www.google.com/policies/privacy/">Google's privacy policy</a>.<span class="dac-form-required">*</span></label> 2795 </div> 2796 </div> 2797 </div> 2798 </div> 2799 </div> 2800 </fieldset> 2801 </section> 2802 <footer class="dac-modal-footer"> 2803 <div class="cols"> 2804 <div class="col-2of5"> 2805 </div> 2806 </div> 2807 <button type="submit" value="Submit" class="dac-fab dac-primary dac-large dac-modal-action"><i class="dac-sprite dac-arrow-right"></i></button> 2808 </footer> 2809 </form> 2810 </section> 2811 <section class="dac-swap-section dac-right"> 2812 <div class="dac-modal-content"> 2813 <p class="newsletter-success-message"> 2814 You have successfully signed up for the latest Android developer news and tips. 2815 </p> 2816 </div> 2817 </section> 2818 </div> 2819 </div> 2820 </div> 2821</div> <!-- end footer --> 2822 2823</div><!-- end doc-content --> 2824 2825</div> <!-- end .cols --> 2826</div> <!-- end body-content --> 2827 2828 2829 2830 2831 2832 2833</body> 2834</html> 2835