1 page.title=UiObject 2 parent.title=uiautomator 3 parent.link=index.html 4 @jd:body 5 <style> 6 h4.jd-details-title {background-color: #DEE8F1;} 7 </style> 8 <p>A <code><a href="#">UiObject</a></code> is a representation of a view. It is 9 not in any way directly bound to a view as an object reference. A <code><a href="#">UiObject</a></code> 10 contains information to help it locate a matching view at runtime based on the 11 <code><a href="#UiSelector.html">UiSelector</a></code> properties specified in 12 its constructor. Once you create an instance of a UiObject, it can be reused for 13 different views that match the selector criteria.</p> 14 15 <h2>Summary</h2> 16 17 18 19 20 21 22 23 24 25 26 27 28 29 <!-- =========== ENUM CONSTANT SUMMARY =========== --> 30 <table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> 31 32 33 34 <tr class="api" > 35 <td class="jd-typecol">int</td> 36 <td class="jd-linkcol"><a href="#FINGER_TOUCH_HALF_WIDTH">FINGER_TOUCH_HALF_WIDTH</a></td> 37 <td class="jd-descrcol" width="100%"></td> 38 </tr> 39 40 41 <tr class="api" > 42 <td class="jd-typecol">int</td> 43 <td class="jd-linkcol"><a href="#SWIPE_MARGIN_LIMIT">SWIPE_MARGIN_LIMIT</a></td> 44 <td class="jd-descrcol" width="100%"></td> 45 </tr> 46 47 48 <tr class="api" > 49 <td class="jd-typecol">long</td> 50 <td class="jd-linkcol"><a href="#WAIT_FOR_EVENT_TMEOUT">WAIT_FOR_EVENT_TMEOUT</a></td> 51 <td class="jd-descrcol" width="100%"><em> 52 This constant is deprecated. 53 use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code> 54 </em></td> 55 </tr> 56 57 58 <tr class="api" > 59 <td class="jd-typecol">long</td> 60 <td class="jd-linkcol"><a href="#WAIT_FOR_SELECTOR_POLL">WAIT_FOR_SELECTOR_POLL</a></td> 61 <td class="jd-descrcol" width="100%"></td> 62 </tr> 63 64 65 <tr class="api" > 66 <td class="jd-typecol">long</td> 67 <td class="jd-linkcol"><a href="#WAIT_FOR_SELECTOR_TIMEOUT">WAIT_FOR_SELECTOR_TIMEOUT</a></td> 68 <td class="jd-descrcol" width="100%"><em> 69 This constant is deprecated. 70 use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code> 71 </em></td> 72 </tr> 73 74 75 <tr class="api" > 76 <td class="jd-typecol">long</td> 77 <td class="jd-linkcol"><a href="#WAIT_FOR_WINDOW_TMEOUT">WAIT_FOR_WINDOW_TMEOUT</a></td> 78 <td class="jd-descrcol" width="100%"></td> 79 </tr> 80 81 82 83 </table> 84 85 86 87 88 89 90 91 92 93 94 95 96 <!-- ======== CONSTRUCTOR SUMMARY ======== --> 97 <table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr> 98 99 100 101 102 <tr class="api" > 103 <td class="jd-typecol"><nobr> 104 105 106 107 108 109 </nobr> 110 </td> 111 <td class="jd-linkcol" width="100%"><nobr> 112 <span class="sympad"><a href="#UiObject(com.android.uiautomator.core.UiSelector)">UiObject</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr> 113 114 <div class="jd-descrdiv">Constructs a UiObject to represent a view that matches the specified 115 selector criteria.</div> 116 117 </td></tr> 118 119 120 121 </table> 122 123 124 125 126 127 128 <!-- ========== METHOD SUMMARY =========== --> 129 <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> 130 131 132 133 134 <tr class="api" > 135 <td class="jd-typecol"><nobr> 136 137 138 139 140 141 void</nobr> 142 </td> 143 <td class="jd-linkcol" width="100%"><nobr> 144 <span class="sympad"><a href="#clearTextField()">clearTextField</a></span>()</nobr> 145 146 <div class="jd-descrdiv">Clears the existing text contents in an editable field.</div> 147 148 </td></tr> 149 150 151 152 <tr class="api" > 153 <td class="jd-typecol"><nobr> 154 155 156 157 158 159 boolean</nobr> 160 </td> 161 <td class="jd-linkcol" width="100%"><nobr> 162 <span class="sympad"><a href="#click()">click</a></span>()</nobr> 163 164 <div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented 165 by this UiObject.</div> 166 167 </td></tr> 168 169 170 171 <tr class="api" > 172 <td class="jd-typecol"><nobr> 173 174 175 176 177 178 boolean</nobr> 179 </td> 180 <td class="jd-linkcol" width="100%"><nobr> 181 <span class="sympad"><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)</nobr> 182 183 <div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented 184 by this UiObject and waits for window transitions.</div> 185 186 </td></tr> 187 188 189 190 <tr class="api" > 191 <td class="jd-typecol"><nobr> 192 193 194 195 196 197 boolean</nobr> 198 </td> 199 <td class="jd-linkcol" width="100%"><nobr> 200 <span class="sympad"><a href="#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()</nobr> 201 202 <div class="jd-descrdiv">Waits for window transitions that would typically take longer than the 203 usual default timeouts.</div> 204 205 </td></tr> 206 207 208 209 <tr class="api" > 210 <td class="jd-typecol"><nobr> 211 212 213 214 215 216 boolean</nobr> 217 </td> 218 <td class="jd-linkcol" width="100%"><nobr> 219 <span class="sympad"><a href="#clickBottomRight()">clickBottomRight</a></span>()</nobr> 220 221 <div class="jd-descrdiv">Clicks the bottom and right corner of the UI element</div> 222 223 </td></tr> 224 225 226 227 <tr class="api" > 228 <td class="jd-typecol"><nobr> 229 230 231 232 233 234 boolean</nobr> 235 </td> 236 <td class="jd-linkcol" width="100%"><nobr> 237 <span class="sympad"><a href="#clickTopLeft()">clickTopLeft</a></span>()</nobr> 238 239 <div class="jd-descrdiv">Clicks the top and left corner of the UI element</div> 240 241 </td></tr> 242 243 244 245 <tr class="api" > 246 <td class="jd-typecol"><nobr> 247 248 249 250 251 252 boolean</nobr> 253 </td> 254 <td class="jd-linkcol" width="100%"><nobr> 255 <span class="sympad"><a href="#dragTo(com.android.uiautomator.core.UiObject, int)">dragTo</a></span>(<a href="#">UiObject</a> destObj, int steps)</nobr> 256 257 <div class="jd-descrdiv">Drags this object to a destination UiObject.</div> 258 259 </td></tr> 260 261 262 263 <tr class="api" > 264 <td class="jd-typecol"><nobr> 265 266 267 268 269 270 boolean</nobr> 271 </td> 272 <td class="jd-linkcol" width="100%"><nobr> 273 <span class="sympad"><a href="#dragTo(int, int, int)">dragTo</a></span>(int destX, int destY, int steps)</nobr> 274 275 <div class="jd-descrdiv">Drags this object to arbitrary coordinates.</div> 276 277 </td></tr> 278 279 280 281 <tr class="api" > 282 <td class="jd-typecol"><nobr> 283 284 285 286 287 288 boolean</nobr> 289 </td> 290 <td class="jd-linkcol" width="100%"><nobr> 291 <span class="sympad"><a href="#exists()">exists</a></span>()</nobr> 292 293 <div class="jd-descrdiv">Check if view exists.</div> 294 295 </td></tr> 296 297 298 299 <tr class="api" > 300 <td class="jd-typecol"><nobr> 301 302 303 304 305 306 Rect</nobr> 307 </td> 308 <td class="jd-linkcol" width="100%"><nobr> 309 <span class="sympad"><a href="#getBounds()">getBounds</a></span>()</nobr> 310 311 <div class="jd-descrdiv">Returns the view's <code>bounds</code> property.</div> 312 313 </td></tr> 314 315 316 317 <tr class="api" > 318 <td class="jd-typecol"><nobr> 319 320 321 322 323 324 <a href="#">UiObject</a></nobr> 325 </td> 326 <td class="jd-linkcol" width="100%"><nobr> 327 <span class="sympad"><a href="#getChild(com.android.uiautomator.core.UiSelector)">getChild</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr> 328 329 <div class="jd-descrdiv">Creates a new UiObject for a child view that is under the present UiObject.</div> 330 331 </td></tr> 332 333 334 335 <tr class="api" > 336 <td class="jd-typecol"><nobr> 337 338 339 340 341 342 int</nobr> 343 </td> 344 <td class="jd-linkcol" width="100%"><nobr> 345 <span class="sympad"><a href="#getChildCount()">getChildCount</a></span>()</nobr> 346 347 <div class="jd-descrdiv">Counts the child views immediately under the present UiObject.</div> 348 349 </td></tr> 350 351 352 353 <tr class="api" > 354 <td class="jd-typecol"><nobr> 355 356 357 358 359 360 String</nobr> 361 </td> 362 <td class="jd-linkcol" width="100%"><nobr> 363 <span class="sympad"><a href="#getClassName()">getClassName</a></span>()</nobr> 364 365 <div class="jd-descrdiv">Retrieves the <code>className</code> property of the UI element.</div> 366 367 </td></tr> 368 369 370 371 <tr class="api" > 372 <td class="jd-typecol"><nobr> 373 374 375 376 377 378 String</nobr> 379 </td> 380 <td class="jd-linkcol" width="100%"><nobr> 381 <span class="sympad"><a href="#getContentDescription()">getContentDescription</a></span>()</nobr> 382 383 <div class="jd-descrdiv">Reads the <code>content_desc</code> property of the UI element</div> 384 385 </td></tr> 386 387 388 389 <tr class="api" > 390 <td class="jd-typecol"><nobr> 391 392 393 394 395 396 <a href="#">UiObject</a></nobr> 397 </td> 398 <td class="jd-linkcol" width="100%"><nobr> 399 <span class="sympad"><a href="#getFromParent(com.android.uiautomator.core.UiSelector)">getFromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr> 400 401 <div class="jd-descrdiv">Creates a new UiObject for a sibling view or a child of the sibling view, 402 relative to the present UiObject.</div> 403 404 </td></tr> 405 406 407 408 <tr class="api" > 409 <td class="jd-typecol"><nobr> 410 411 412 413 414 415 String</nobr> 416 </td> 417 <td class="jd-linkcol" width="100%"><nobr> 418 <span class="sympad"><a href="#getPackageName()">getPackageName</a></span>()</nobr> 419 420 <div class="jd-descrdiv">Reads the view's <code>package</code> property</div> 421 422 </td></tr> 423 424 425 426 <tr class="api" > 427 <td class="jd-typecol"><nobr> 428 429 430 final 431 432 433 <a href="UiSelector.html">UiSelector</a></nobr> 434 </td> 435 <td class="jd-linkcol" width="100%"><nobr> 436 <span class="sympad"><a href="#getSelector()">getSelector</a></span>()</nobr> 437 438 <div class="jd-descrdiv">Debugging helper.</div> 439 440 </td></tr> 441 442 443 444 <tr class="api" > 445 <td class="jd-typecol"><nobr> 446 447 448 449 450 451 String</nobr> 452 </td> 453 <td class="jd-linkcol" width="100%"><nobr> 454 <span class="sympad"><a href="#getText()">getText</a></span>()</nobr> 455 456 <div class="jd-descrdiv">Reads the <code>text</code> property of the UI element</div> 457 458 </td></tr> 459 460 461 462 <tr class="api" > 463 <td class="jd-typecol"><nobr> 464 465 466 467 468 469 Rect</nobr> 470 </td> 471 <td class="jd-linkcol" width="100%"><nobr> 472 <span class="sympad"><a href="#getVisibleBounds()">getVisibleBounds</a></span>()</nobr> 473 474 <div class="jd-descrdiv">Returns the visible bounds of the view.</div> 475 476 </td></tr> 477 478 479 480 <tr class="api" > 481 <td class="jd-typecol"><nobr> 482 483 484 485 486 487 boolean</nobr> 488 </td> 489 <td class="jd-linkcol" width="100%"><nobr> 490 <span class="sympad"><a href="#isCheckable()">isCheckable</a></span>()</nobr> 491 492 <div class="jd-descrdiv">Checks if the UI element's <code>checkable</code> property is currently true.</div> 493 494 </td></tr> 495 496 497 498 <tr class="api" > 499 <td class="jd-typecol"><nobr> 500 501 502 503 504 505 boolean</nobr> 506 </td> 507 <td class="jd-linkcol" width="100%"><nobr> 508 <span class="sympad"><a href="#isChecked()">isChecked</a></span>()</nobr> 509 510 <div class="jd-descrdiv">Check if the UI element's <code>checked</code> property is currently true</div> 511 512 </td></tr> 513 514 515 516 <tr class="api" > 517 <td class="jd-typecol"><nobr> 518 519 520 521 522 523 boolean</nobr> 524 </td> 525 <td class="jd-linkcol" width="100%"><nobr> 526 <span class="sympad"><a href="#isClickable()">isClickable</a></span>()</nobr> 527 528 <div class="jd-descrdiv">Checks if the UI element's <code>clickable</code> property is currently true.</div> 529 530 </td></tr> 531 532 533 534 <tr class="api" > 535 <td class="jd-typecol"><nobr> 536 537 538 539 540 541 boolean</nobr> 542 </td> 543 <td class="jd-linkcol" width="100%"><nobr> 544 <span class="sympad"><a href="#isEnabled()">isEnabled</a></span>()</nobr> 545 546 <div class="jd-descrdiv">Checks if the UI element's <code>enabled</code> property is currently true.</div> 547 548 </td></tr> 549 550 551 552 <tr class="api" > 553 <td class="jd-typecol"><nobr> 554 555 556 557 558 559 boolean</nobr> 560 </td> 561 <td class="jd-linkcol" width="100%"><nobr> 562 <span class="sympad"><a href="#isFocusable()">isFocusable</a></span>()</nobr> 563 564 <div class="jd-descrdiv">Check if the UI element's <code>focusable</code> property is currently true.</div> 565 566 </td></tr> 567 568 569 570 <tr class="api" > 571 <td class="jd-typecol"><nobr> 572 573 574 575 576 577 boolean</nobr> 578 </td> 579 <td class="jd-linkcol" width="100%"><nobr> 580 <span class="sympad"><a href="#isFocused()">isFocused</a></span>()</nobr> 581 582 <div class="jd-descrdiv">Check if the UI element's <code>focused</code> property is currently true</div> 583 584 </td></tr> 585 586 587 588 <tr class="api" > 589 <td class="jd-typecol"><nobr> 590 591 592 593 594 595 boolean</nobr> 596 </td> 597 <td class="jd-linkcol" width="100%"><nobr> 598 <span class="sympad"><a href="#isLongClickable()">isLongClickable</a></span>()</nobr> 599 600 <div class="jd-descrdiv">Check if the view's <code>long-clickable</code> property is currently true</div> 601 602 </td></tr> 603 604 605 606 <tr class="api" > 607 <td class="jd-typecol"><nobr> 608 609 610 611 612 613 boolean</nobr> 614 </td> 615 <td class="jd-linkcol" width="100%"><nobr> 616 <span class="sympad"><a href="#isScrollable()">isScrollable</a></span>()</nobr> 617 618 <div class="jd-descrdiv">Check if the view's <code>scrollable</code> property is currently true</div> 619 620 </td></tr> 621 622 623 624 <tr class="api" > 625 <td class="jd-typecol"><nobr> 626 627 628 629 630 631 boolean</nobr> 632 </td> 633 <td class="jd-linkcol" width="100%"><nobr> 634 <span class="sympad"><a href="#isSelected()">isSelected</a></span>()</nobr> 635 636 <div class="jd-descrdiv">Checks if the UI element's <code>selected</code> property is currently true.</div> 637 638 </td></tr> 639 640 641 642 <tr class="api" > 643 <td class="jd-typecol"><nobr> 644 645 646 647 648 649 boolean</nobr> 650 </td> 651 <td class="jd-linkcol" width="100%"><nobr> 652 <span class="sympad"><a href="#longClick()">longClick</a></span>()</nobr> 653 654 <div class="jd-descrdiv">Long clicks the center of the visible bounds of the UI element</div> 655 656 </td></tr> 657 658 659 660 <tr class="api" > 661 <td class="jd-typecol"><nobr> 662 663 664 665 666 667 boolean</nobr> 668 </td> 669 <td class="jd-linkcol" width="100%"><nobr> 670 <span class="sympad"><a href="#longClickBottomRight()">longClickBottomRight</a></span>()</nobr> 671 672 <div class="jd-descrdiv">Long clicks bottom and right corner of the UI element</div> 673 674 </td></tr> 675 676 677 678 <tr class="api" > 679 <td class="jd-typecol"><nobr> 680 681 682 683 684 685 boolean</nobr> 686 </td> 687 <td class="jd-linkcol" width="100%"><nobr> 688 <span class="sympad"><a href="#longClickTopLeft()">longClickTopLeft</a></span>()</nobr> 689 690 <div class="jd-descrdiv">Long clicks on the top and left corner of the UI element</div> 691 692 </td></tr> 693 694 695 696 <tr class="api" > 697 <td class="jd-typecol"><nobr> 698 699 700 701 702 703 boolean</nobr> 704 </td> 705 <td class="jd-linkcol" width="100%"><nobr> 706 <span class="sympad"><a href="#performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)">performMultiPointerGesture</a></span>(PointerCoords... touches)</nobr> 707 708 <div class="jd-descrdiv">Performs a multi-touch gesture.</div> 709 710 </td></tr> 711 712 713 714 <tr class="api" > 715 <td class="jd-typecol"><nobr> 716 717 718 719 720 721 boolean</nobr> 722 </td> 723 <td class="jd-linkcol" width="100%"><nobr> 724 <span class="sympad"><a href="#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> 725 726 <div class="jd-descrdiv">Generates a two-pointer gesture with arbitrary starting and ending points.</div> 727 728 </td></tr> 729 730 731 732 <tr class="api" > 733 <td class="jd-typecol"><nobr> 734 735 736 737 738 739 boolean</nobr> 740 </td> 741 <td class="jd-linkcol" width="100%"><nobr> 742 <span class="sympad"><a href="#pinchIn(int, int)">pinchIn</a></span>(int percent, int steps)</nobr> 743 744 <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally 745 toward the other, from the edges to the center of this UiObject .</div> 746 747 </td></tr> 748 749 750 751 <tr class="api" > 752 <td class="jd-typecol"><nobr> 753 754 755 756 757 758 boolean</nobr> 759 </td> 760 <td class="jd-linkcol" width="100%"><nobr> 761 <span class="sympad"><a href="#pinchOut(int, int)">pinchOut</a></span>(int percent, int steps)</nobr> 762 763 <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally 764 opposite across the other, from the center out towards the edges of the 765 this UiObject.</div> 766 767 </td></tr> 768 769 770 771 <tr class="api" > 772 <td class="jd-typecol"><nobr> 773 774 775 776 777 778 boolean</nobr> 779 </td> 780 <td class="jd-linkcol" width="100%"><nobr> 781 <span class="sympad"><a href="#setText(java.lang.String)">setText</a></span>(String text)</nobr> 782 783 <div class="jd-descrdiv">Sets the text in an editable field, after clearing the field's content.</div> 784 785 </td></tr> 786 787 788 789 <tr class="api" > 790 <td class="jd-typecol"><nobr> 791 792 793 794 795 796 boolean</nobr> 797 </td> 798 <td class="jd-linkcol" width="100%"><nobr> 799 <span class="sympad"><a href="#swipeDown(int)">swipeDown</a></span>(int steps)</nobr> 800 801 <div class="jd-descrdiv">Performs the swipe down action on the UiObject.</div> 802 803 </td></tr> 804 805 806 807 <tr class="api" > 808 <td class="jd-typecol"><nobr> 809 810 811 812 813 814 boolean</nobr> 815 </td> 816 <td class="jd-linkcol" width="100%"><nobr> 817 <span class="sympad"><a href="#swipeLeft(int)">swipeLeft</a></span>(int steps)</nobr> 818 819 <div class="jd-descrdiv">Performs the swipe left action on the UiObject.</div> 820 821 </td></tr> 822 823 824 825 <tr class="api" > 826 <td class="jd-typecol"><nobr> 827 828 829 830 831 832 boolean</nobr> 833 </td> 834 <td class="jd-linkcol" width="100%"><nobr> 835 <span class="sympad"><a href="#swipeRight(int)">swipeRight</a></span>(int steps)</nobr> 836 837 <div class="jd-descrdiv">Performs the swipe right action on the UiObject.</div> 838 839 </td></tr> 840 841 842 843 <tr class="api" > 844 <td class="jd-typecol"><nobr> 845 846 847 848 849 850 boolean</nobr> 851 </td> 852 <td class="jd-linkcol" width="100%"><nobr> 853 <span class="sympad"><a href="#swipeUp(int)">swipeUp</a></span>(int steps)</nobr> 854 855 <div class="jd-descrdiv">Performs the swipe up action on the UiObject.</div> 856 857 </td></tr> 858 859 860 861 <tr class="api" > 862 <td class="jd-typecol"><nobr> 863 864 865 866 867 868 boolean</nobr> 869 </td> 870 <td class="jd-linkcol" width="100%"><nobr> 871 <span class="sympad"><a href="#waitForExists(long)">waitForExists</a></span>(long timeout)</nobr> 872 873 <div class="jd-descrdiv">Waits a specified length of time for a view to become visible.</div> 874 875 </td></tr> 876 877 878 879 <tr class="api" > 880 <td class="jd-typecol"><nobr> 881 882 883 884 885 886 boolean</nobr> 887 </td> 888 <td class="jd-linkcol" width="100%"><nobr> 889 <span class="sympad"><a href="#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)</nobr> 890 891 <div class="jd-descrdiv">Waits a specified length of time for a view to become undetectable.</div> 892 893 </td></tr> 894 895 896 897 </table> 898 899 900 901 902 <!-- ========== METHOD SUMMARY =========== --> 903 <table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr> 904 905 906 907 908 <tr class="api" > 909 <td class="jd-typecol"><nobr> 910 911 912 913 914 915 AccessibilityNodeInfo</nobr> 916 </td> 917 <td class="jd-linkcol" width="100%"><nobr> 918 <span class="sympad"><a href="#findAccessibilityNodeInfo(long)">findAccessibilityNodeInfo</a></span>(long timeout)</nobr> 919 920 <div class="jd-descrdiv">Finds a matching UI element in the accessibility hierarchy, by 921 using the selector for this UiObject.</div> 922 923 </td></tr> 924 925 926 927 </table> 928 929 930 931 932 933 <!-- ========== METHOD SUMMARY =========== --> 934 <table id="inhmethods" class="jd-sumtable"><tr><th> 935 <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> 936 <div style="clear:left;">Inherited Methods</div></th></tr> 937 938 939 <tr class="api" > 940 <td colspan="12"> 941 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 942 ><img id="inherited-methods-java.lang.Object-trigger" 943 src="../../../../../assets/images/triangle-closed.png" 944 class="jd-expando-trigger-img" /></a> 945 From class 946 947 java.lang.Object 948 949 <div id="inherited-methods-java.lang.Object"> 950 <div id="inherited-methods-java.lang.Object-list" 951 class="jd-inheritedlinks"> 952 </div> 953 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 954 <table class="jd-sumtable-expando"> 955 956 957 958 959 <tr class="api" > 960 <td class="jd-typecol"><nobr> 961 962 963 964 965 966 Object</nobr> 967 </td> 968 <td class="jd-linkcol" width="100%"><nobr> 969 <span class="sympad">clone</span>()</nobr> 970 971 </td></tr> 972 973 974 975 <tr class="api" > 976 <td class="jd-typecol"><nobr> 977 978 979 980 981 982 boolean</nobr> 983 </td> 984 <td class="jd-linkcol" width="100%"><nobr> 985 <span class="sympad">equals</span>(Object arg0)</nobr> 986 987 </td></tr> 988 989 990 991 <tr class="api" > 992 <td class="jd-typecol"><nobr> 993 994 995 996 997 998 void</nobr> 999 </td> 1000 <td class="jd-linkcol" width="100%"><nobr> 1001 <span class="sympad">finalize</span>()</nobr> 1002 1003 </td></tr> 1004 1005 1006 1007 <tr class="api" > 1008 <td class="jd-typecol"><nobr> 1009 1010 1011 final 1012 1013 1014 Class<?></nobr> 1015 </td> 1016 <td class="jd-linkcol" width="100%"><nobr> 1017 <span class="sympad">getClass</span>()</nobr> 1018 1019 </td></tr> 1020 1021 1022 1023 <tr class="api" > 1024 <td class="jd-typecol"><nobr> 1025 1026 1027 1028 1029 1030 int</nobr> 1031 </td> 1032 <td class="jd-linkcol" width="100%"><nobr> 1033 <span class="sympad">hashCode</span>()</nobr> 1034 1035 </td></tr> 1036 1037 1038 1039 <tr class="api" > 1040 <td class="jd-typecol"><nobr> 1041 1042 1043 final 1044 1045 1046 void</nobr> 1047 </td> 1048 <td class="jd-linkcol" width="100%"><nobr> 1049 <span class="sympad">notify</span>()</nobr> 1050 1051 </td></tr> 1052 1053 1054 1055 <tr class="api" > 1056 <td class="jd-typecol"><nobr> 1057 1058 1059 final 1060 1061 1062 void</nobr> 1063 </td> 1064 <td class="jd-linkcol" width="100%"><nobr> 1065 <span class="sympad">notifyAll</span>()</nobr> 1066 1067 </td></tr> 1068 1069 1070 1071 <tr class="api" > 1072 <td class="jd-typecol"><nobr> 1073 1074 1075 1076 1077 1078 String</nobr> 1079 </td> 1080 <td class="jd-linkcol" width="100%"><nobr> 1081 <span class="sympad">toString</span>()</nobr> 1082 1083 </td></tr> 1084 1085 1086 1087 <tr class="api" > 1088 <td class="jd-typecol"><nobr> 1089 1090 1091 final 1092 1093 1094 void</nobr> 1095 </td> 1096 <td class="jd-linkcol" width="100%"><nobr> 1097 <span class="sympad">wait</span>()</nobr> 1098 1099 </td></tr> 1100 1101 1102 1103 <tr class="api" > 1104 <td class="jd-typecol"><nobr> 1105 1106 1107 final 1108 1109 1110 void</nobr> 1111 </td> 1112 <td class="jd-linkcol" width="100%"><nobr> 1113 <span class="sympad">wait</span>(long arg0, int arg1)</nobr> 1114 1115 </td></tr> 1116 1117 1118 1119 <tr class="api" > 1120 <td class="jd-typecol"><nobr> 1121 1122 1123 final 1124 1125 1126 void</nobr> 1127 </td> 1128 <td class="jd-linkcol" width="100%"><nobr> 1129 <span class="sympad">wait</span>(long arg0)</nobr> 1130 1131 </td></tr> 1132 1133 1134 </table> 1135 </div> 1136 </div> 1137 </td></tr> 1138 1139 1140 </table> 1141 1142 1143 </div><!-- jd-descr (summary) --> 1144 1145 <!-- Details --> 1146 1147 1148 1149 1150 1151 1152 1153 1154 <!-- XML Attributes --> 1155 1156 1157 <!-- Enum Values --> 1158 1159 1160 <!-- Constants --> 1161 1162 1163 <!-- ========= ENUM CONSTANTS DETAIL ======== --> 1164 <h2>Constants</h2> 1165 1166 1167 1168 1169 <A NAME="FINGER_TOUCH_HALF_WIDTH"></A> 1170 1171 <div class="jd-details api"> 1172 <h4 class="jd-details-title"> 1173 <span class="normal"> 1174 protected 1175 static 1176 final 1177 int 1178 </span> 1179 FINGER_TOUCH_HALF_WIDTH 1180 </h4> 1181 <div class="api-level"> 1182 1183 1184 1185 1186 </div> 1187 <div class="jd-details-descr"> 1188 1189 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1190 1191 1192 <div class="jd-tagdata"> 1193 <span class="jd-tagtitle">Constant Value: </span> 1194 <span> 1195 1196 20 1197 (0x00000014) 1198 1199 </span> 1200 </div> 1201 1202 </div> 1203 </div> 1204 1205 1206 1207 <A NAME="SWIPE_MARGIN_LIMIT"></A> 1208 1209 <div class="jd-details api"> 1210 <h4 class="jd-details-title"> 1211 <span class="normal"> 1212 protected 1213 static 1214 final 1215 int 1216 </span> 1217 SWIPE_MARGIN_LIMIT 1218 </h4> 1219 <div class="api-level"> 1220 1221 1222 1223 1224 </div> 1225 <div class="jd-details-descr"> 1226 1227 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1228 1229 1230 <div class="jd-tagdata"> 1231 <span class="jd-tagtitle">Constant Value: </span> 1232 <span> 1233 1234 5 1235 (0x00000005) 1236 1237 </span> 1238 </div> 1239 1240 </div> 1241 </div> 1242 1243 1244 1245 <A NAME="WAIT_FOR_EVENT_TMEOUT"></A> 1246 1247 <div class="jd-details api"> 1248 <h4 class="jd-details-title"> 1249 <span class="normal"> 1250 protected 1251 static 1252 final 1253 long 1254 </span> 1255 WAIT_FOR_EVENT_TMEOUT 1256 </h4> 1257 <div class="api-level"> 1258 1259 1260 1261 1262 </div> 1263 <div class="jd-details-descr"> 1264 <p> 1265 <p class="caution"><strong> 1266 This constant is deprecated.</strong><br/> 1267 use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code> 1268 1269 </p> 1270 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1271 1272 1273 <div class="jd-tagdata"> 1274 <span class="jd-tagtitle">Constant Value: </span> 1275 <span> 1276 1277 3000 1278 (0x0000000000000bb8) 1279 1280 </span> 1281 </div> 1282 1283 </div> 1284 </div> 1285 1286 1287 1288 <A NAME="WAIT_FOR_SELECTOR_POLL"></A> 1289 1290 <div class="jd-details api"> 1291 <h4 class="jd-details-title"> 1292 <span class="normal"> 1293 protected 1294 static 1295 final 1296 long 1297 </span> 1298 WAIT_FOR_SELECTOR_POLL 1299 </h4> 1300 <div class="api-level"> 1301 1302 1303 1304 1305 </div> 1306 <div class="jd-details-descr"> 1307 1308 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1309 1310 1311 <div class="jd-tagdata"> 1312 <span class="jd-tagtitle">Constant Value: </span> 1313 <span> 1314 1315 1000 1316 (0x00000000000003e8) 1317 1318 </span> 1319 </div> 1320 1321 </div> 1322 </div> 1323 1324 1325 1326 <A NAME="WAIT_FOR_SELECTOR_TIMEOUT"></A> 1327 1328 <div class="jd-details api"> 1329 <h4 class="jd-details-title"> 1330 <span class="normal"> 1331 protected 1332 static 1333 final 1334 long 1335 </span> 1336 WAIT_FOR_SELECTOR_TIMEOUT 1337 </h4> 1338 <div class="api-level"> 1339 1340 1341 1342 1343 </div> 1344 <div class="jd-details-descr"> 1345 <p> 1346 <p class="caution"><strong> 1347 This constant is deprecated.</strong><br/> 1348 use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code> 1349 1350 </p> 1351 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1352 1353 1354 <div class="jd-tagdata"> 1355 <span class="jd-tagtitle">Constant Value: </span> 1356 <span> 1357 1358 10000 1359 (0x0000000000002710) 1360 1361 </span> 1362 </div> 1363 1364 </div> 1365 </div> 1366 1367 1368 1369 <A NAME="WAIT_FOR_WINDOW_TMEOUT"></A> 1370 1371 <div class="jd-details api"> 1372 <h4 class="jd-details-title"> 1373 <span class="normal"> 1374 protected 1375 static 1376 final 1377 long 1378 </span> 1379 WAIT_FOR_WINDOW_TMEOUT 1380 </h4> 1381 <div class="api-level"> 1382 1383 1384 1385 1386 </div> 1387 <div class="jd-details-descr"> 1388 1389 <div class="jd-tagdata jd-tagdescr"><p></p></div> 1390 1391 1392 <div class="jd-tagdata"> 1393 <span class="jd-tagtitle">Constant Value: </span> 1394 <span> 1395 1396 5500 1397 (0x000000000000157c) 1398 1399 </span> 1400 </div> 1401 1402 </div> 1403 </div> 1404 1405 1406 1407 1408 <!-- Fields --> 1409 1410 1411 <!-- Public ctors --> 1412 1413 1414 <!-- ========= CONSTRUCTOR DETAIL ======== --> 1415 <h2>Public Constructors</h2> 1416 1417 1418 1419 <A NAME="UiObject(com.android.uiautomator.core.UiSelector)"></A> 1420 1421 <div class="jd-details api"> 1422 <h4 class="jd-details-title"> 1423 <span class="normal"> 1424 public 1425 1426 1427 1428 1429 1430 </span> 1431 <span class="sympad">UiObject</span> 1432 <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span> 1433 </h4> 1434 <div class="api-level"> 1435 <div></div> 1436 1437 1438 1439 </div> 1440 <div class="jd-details-descr"> 1441 1442 <div class="jd-tagdata jd-tagdescr"><p>Constructs a UiObject to represent a view that matches the specified 1443 selector criteria.</p></div> 1444 1445 </div> 1446 </div> 1447 1448 1449 1450 1451 1452 <!-- ========= CONSTRUCTOR DETAIL ======== --> 1453 <!-- Protected ctors --> 1454 1455 1456 1457 <!-- ========= METHOD DETAIL ======== --> 1458 <!-- Public methdos --> 1459 1460 <h2>Public Methods</h2> 1461 1462 1463 1464 <A NAME="clearTextField()"></A> 1465 1466 <div class="jd-details api"> 1467 <h4 class="jd-details-title"> 1468 <span class="normal"> 1469 public 1470 1471 1472 1473 1474 void 1475 </span> 1476 <span class="sympad">clearTextField</span> 1477 <span class="normal">()</span> 1478 </h4> 1479 <div class="api-level"> 1480 <div></div> 1481 1482 1483 1484 </div> 1485 <div class="jd-details-descr"> 1486 1487 <div class="jd-tagdata jd-tagdescr"><p>Clears the existing text contents in an editable field. 1488 1489 The <code><a href="UiSelector.html">UiSelector</a></code> of this object must reference a UI element that is editable. 1490 1491 When you call this method, the method first sets focus at the start edge of the field. 1492 The method then simulates a long-press to select the existing text, and deletes the 1493 selected text. 1494 1495 If a "Select-All" option is displayed, the method will automatically attempt to use it 1496 to ensure full text selection. 1497 1498 Note that it is possible that not all the text in the field is selected; for example, 1499 if the text contains separators such as spaces, slashes, at symbol etc. 1500 Also, not all editable fields support the long-press functionality.</p></div> 1501 <div class="jd-tagdata"> 1502 <h5 class="jd-tagtitle">Throws</h5> 1503 <table class="jd-tagtable"> 1504 1505 <tr> 1506 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1507 <td></td> 1508 </tr> 1509 </table> 1510 </div> 1511 1512 </div> 1513 </div> 1514 1515 1516 <A NAME="click()"></A> 1517 1518 <div class="jd-details api"> 1519 <h4 class="jd-details-title"> 1520 <span class="normal"> 1521 public 1522 1523 1524 1525 1526 boolean 1527 </span> 1528 <span class="sympad">click</span> 1529 <span class="normal">()</span> 1530 </h4> 1531 <div class="api-level"> 1532 <div></div> 1533 1534 1535 1536 </div> 1537 <div class="jd-details-descr"> 1538 1539 <div class="jd-tagdata jd-tagdescr"><p>Performs a click at the center of the visible bounds of the UI element represented 1540 by this UiObject.</p></div> 1541 <div class="jd-tagdata"> 1542 <h5 class="jd-tagtitle">Returns</h5> 1543 <ul class="nolist"><li>true id successful else false</li></ul> 1544 </div> 1545 <div class="jd-tagdata"> 1546 <h5 class="jd-tagtitle">Throws</h5> 1547 <table class="jd-tagtable"> 1548 1549 <tr> 1550 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1551 <td></td> 1552 </tr> 1553 </table> 1554 </div> 1555 1556 </div> 1557 </div> 1558 1559 1560 <A NAME="clickAndWaitForNewWindow(long)"></A> 1561 1562 <div class="jd-details api"> 1563 <h4 class="jd-details-title"> 1564 <span class="normal"> 1565 public 1566 1567 1568 1569 1570 boolean 1571 </span> 1572 <span class="sympad">clickAndWaitForNewWindow</span> 1573 <span class="normal">(long timeout)</span> 1574 </h4> 1575 <div class="api-level"> 1576 <div></div> 1577 1578 1579 1580 </div> 1581 <div class="jd-details-descr"> 1582 1583 <div class="jd-tagdata jd-tagdescr"><p>Performs a click at the center of the visible bounds of the UI element represented 1584 by this UiObject and waits for window transitions. 1585 1586 This method differ from <code><a href="#click()">click()</a></code> only in that this method waits for a 1587 a new window transition as a result of the click. Some examples of a window transition: 1588 <li>launching a new activity</li> 1589 <li>bringing up a pop-up menu</li> 1590 <li>bringing up a dialog</li></p></div> 1591 <div class="jd-tagdata"> 1592 <h5 class="jd-tagtitle">Parameters</h5> 1593 <table class="jd-tagtable"> 1594 <tr> 1595 <th>timeout</td> 1596 <td>timeout before giving up on waiting for a new window</td> 1597 </tr> 1598 </table> 1599 </div> 1600 <div class="jd-tagdata"> 1601 <h5 class="jd-tagtitle">Returns</h5> 1602 <ul class="nolist"><li>true if the event was triggered, else false</li></ul> 1603 </div> 1604 <div class="jd-tagdata"> 1605 <h5 class="jd-tagtitle">Throws</h5> 1606 <table class="jd-tagtable"> 1607 1608 <tr> 1609 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1610 <td></td> 1611 </tr> 1612 </table> 1613 </div> 1614 1615 </div> 1616 </div> 1617 1618 1619 <A NAME="clickAndWaitForNewWindow()"></A> 1620 1621 <div class="jd-details api"> 1622 <h4 class="jd-details-title"> 1623 <span class="normal"> 1624 public 1625 1626 1627 1628 1629 boolean 1630 </span> 1631 <span class="sympad">clickAndWaitForNewWindow</span> 1632 <span class="normal">()</span> 1633 </h4> 1634 <div class="api-level"> 1635 <div></div> 1636 1637 1638 1639 </div> 1640 <div class="jd-details-descr"> 1641 1642 <div class="jd-tagdata jd-tagdescr"><p>Waits for window transitions that would typically take longer than the 1643 usual default timeouts. 1644 See <code><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow(long)</a></code></p></div> 1645 <div class="jd-tagdata"> 1646 <h5 class="jd-tagtitle">Returns</h5> 1647 <ul class="nolist"><li>true if the event was triggered, else false</li></ul> 1648 </div> 1649 <div class="jd-tagdata"> 1650 <h5 class="jd-tagtitle">Throws</h5> 1651 <table class="jd-tagtable"> 1652 1653 <tr> 1654 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1655 <td></td> 1656 </tr> 1657 </table> 1658 </div> 1659 1660 </div> 1661 </div> 1662 1663 1664 <A NAME="clickBottomRight()"></A> 1665 1666 <div class="jd-details api"> 1667 <h4 class="jd-details-title"> 1668 <span class="normal"> 1669 public 1670 1671 1672 1673 1674 boolean 1675 </span> 1676 <span class="sympad">clickBottomRight</span> 1677 <span class="normal">()</span> 1678 </h4> 1679 <div class="api-level"> 1680 <div></div> 1681 1682 1683 1684 </div> 1685 <div class="jd-details-descr"> 1686 1687 <div class="jd-tagdata jd-tagdescr"><p>Clicks the bottom and right corner of the UI element</p></div> 1688 <div class="jd-tagdata"> 1689 <h5 class="jd-tagtitle">Returns</h5> 1690 <ul class="nolist"><li>true on success</li></ul> 1691 </div> 1692 <div class="jd-tagdata"> 1693 <h5 class="jd-tagtitle">Throws</h5> 1694 <table class="jd-tagtable"> 1695 1696 <tr> 1697 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1698 <td></td> 1699 </tr> 1700 </table> 1701 </div> 1702 1703 </div> 1704 </div> 1705 1706 1707 <A NAME="clickTopLeft()"></A> 1708 1709 <div class="jd-details api"> 1710 <h4 class="jd-details-title"> 1711 <span class="normal"> 1712 public 1713 1714 1715 1716 1717 boolean 1718 </span> 1719 <span class="sympad">clickTopLeft</span> 1720 <span class="normal">()</span> 1721 </h4> 1722 <div class="api-level"> 1723 <div></div> 1724 1725 1726 1727 </div> 1728 <div class="jd-details-descr"> 1729 1730 <div class="jd-tagdata jd-tagdescr"><p>Clicks the top and left corner of the UI element</p></div> 1731 <div class="jd-tagdata"> 1732 <h5 class="jd-tagtitle">Returns</h5> 1733 <ul class="nolist"><li>true on success</li></ul> 1734 </div> 1735 <div class="jd-tagdata"> 1736 <h5 class="jd-tagtitle">Throws</h5> 1737 <table class="jd-tagtable"> 1738 1739 <tr> 1740 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1741 <td></td> 1742 </tr> 1743 </table> 1744 </div> 1745 1746 </div> 1747 </div> 1748 1749 1750 <A NAME="dragTo(com.android.uiautomator.core.UiObject, int)"></A> 1751 1752 <div class="jd-details api"> 1753 <h4 class="jd-details-title"> 1754 <span class="normal"> 1755 public 1756 1757 1758 1759 1760 boolean 1761 </span> 1762 <span class="sympad">dragTo</span> 1763 <span class="normal">(<a href="#">UiObject</a> destObj, int steps)</span> 1764 </h4> 1765 <div class="jd-details-descr"> 1766 1767 <div class="jd-tagdata jd-tagdescr"><p>Drags this object to a destination UiObject. 1768 The number of steps specified in your input parameter can influence the 1769 drag speed, and varying speeds may impact the results. Consider 1770 evaluating different speeds when using this method in your tests.</p></div> 1771 <div class="jd-tagdata"> 1772 <h5 class="jd-tagtitle">Parameters</h5> 1773 <table class="jd-tagtable"> 1774 <tr> 1775 <th>destObj</td> 1776 <td>the destination UiObject.</td> 1777 </tr> 1778 <tr> 1779 <th>steps</td> 1780 <td>usually 40 steps. You can increase or decrease the steps to change the speed.</td> 1781 </tr> 1782 </table> 1783 </div> 1784 <div class="jd-tagdata"> 1785 <h5 class="jd-tagtitle">Returns</h5> 1786 <ul class="nolist"><li>true if successful</li></ul> 1787 </div> 1788 <div class="jd-tagdata"> 1789 <h5 class="jd-tagtitle">Throws</h5> 1790 <table class="jd-tagtable"> 1791 1792 <tr> 1793 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1794 <td></td> 1795 </tr> 1796 </table> 1797 </div> 1798 <div class="jd-tagdata"> 1799 <h5 class="jd-tagtitle">Since</h5> 1800 <ul class="nolist"><li>Android API Level 18</li></ul> 1801 </div> 1802 </div> 1803 </div> 1804 1805 1806 <A NAME="dragTo(int, int, int)"></A> 1807 1808 <div class="jd-details api"> 1809 <h4 class="jd-details-title"> 1810 <span class="normal"> 1811 public 1812 1813 1814 1815 1816 boolean 1817 </span> 1818 <span class="sympad">dragTo</span> 1819 <span class="normal">(int destX, int destY, int steps)</span> 1820 </h4> 1821 <div class="jd-details-descr"> 1822 1823 <div class="jd-tagdata jd-tagdescr"><p>Drags this object to arbitrary coordinates. 1824 The number of steps specified in your input parameter can influence the 1825 drag speed, and varying speeds may impact the results. Consider 1826 evaluating different speeds when using this method in your tests.</p></div> 1827 <div class="jd-tagdata"> 1828 <h5 class="jd-tagtitle">Parameters</h5> 1829 <table class="jd-tagtable"> 1830 <tr> 1831 <th>destX</td> 1832 <td>the X-axis coordinate.</td> 1833 </tr> 1834 <tr> 1835 <th>destY</td> 1836 <td>the Y-axis coordinate.</td> 1837 </tr> 1838 <tr> 1839 <th>steps</td> 1840 <td>usually 40 steps. You can increase or decrease the steps to change the speed.</td> 1841 </tr> 1842 </table> 1843 </div> 1844 <div class="jd-tagdata"> 1845 <h5 class="jd-tagtitle">Returns</h5> 1846 <ul class="nolist"><li>true if successful</li></ul> 1847 </div> 1848 <div class="jd-tagdata"> 1849 <h5 class="jd-tagtitle">Throws</h5> 1850 <table class="jd-tagtable"> 1851 1852 <tr> 1853 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1854 <td></td> 1855 </tr> 1856 </table> 1857 </div> 1858 <div class="jd-tagdata"> 1859 <h5 class="jd-tagtitle">Since</h5> 1860 <ul class="nolist"><li>Android API Level 18</li></ul> 1861 </div> 1862 </div> 1863 </div> 1864 1865 1866 <A NAME="exists()"></A> 1867 1868 <div class="jd-details api"> 1869 <h4 class="jd-details-title"> 1870 <span class="normal"> 1871 public 1872 1873 1874 1875 1876 boolean 1877 </span> 1878 <span class="sympad">exists</span> 1879 <span class="normal">()</span> 1880 </h4> 1881 <div class="api-level"> 1882 <div></div> 1883 1884 1885 1886 </div> 1887 <div class="jd-details-descr"> 1888 1889 <div class="jd-tagdata jd-tagdescr"><p>Check if view exists. 1890 1891 This methods performs a <code><a href="#waitForExists(long)">waitForExists(long)</a></code> with zero timeout. This 1892 basically returns immediately whether the view represented by this UiObject 1893 exists or not. If you need to wait longer for this view, then see 1894 <code><a href="#waitForExists(long)">waitForExists(long)</a></code>.</p></div> 1895 <div class="jd-tagdata"> 1896 <h5 class="jd-tagtitle">Returns</h5> 1897 <ul class="nolist"><li>true if the view represented by this UiObject does exist</li></ul> 1898 </div> 1899 1900 </div> 1901 </div> 1902 1903 1904 <A NAME="getBounds()"></A> 1905 1906 <div class="jd-details api"> 1907 <h4 class="jd-details-title"> 1908 <span class="normal"> 1909 public 1910 1911 1912 1913 1914 Rect 1915 </span> 1916 <span class="sympad">getBounds</span> 1917 <span class="normal">()</span> 1918 </h4> 1919 <div class="api-level"> 1920 <div></div> 1921 1922 1923 1924 </div> 1925 <div class="jd-details-descr"> 1926 1927 <div class="jd-tagdata jd-tagdescr"><p>Returns the view's <code>bounds</code> property. See <code><a href="#getVisibleBounds()">getVisibleBounds()</a></code></p></div> 1928 <div class="jd-tagdata"> 1929 <h5 class="jd-tagtitle">Returns</h5> 1930 <ul class="nolist"><li>Rect</li></ul> 1931 </div> 1932 <div class="jd-tagdata"> 1933 <h5 class="jd-tagtitle">Throws</h5> 1934 <table class="jd-tagtable"> 1935 1936 <tr> 1937 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1938 <td></td> 1939 </tr> 1940 </table> 1941 </div> 1942 1943 </div> 1944 </div> 1945 1946 1947 <A NAME="getChild(com.android.uiautomator.core.UiSelector)"></A> 1948 1949 <div class="jd-details api"> 1950 <h4 class="jd-details-title"> 1951 <span class="normal"> 1952 public 1953 1954 1955 1956 1957 <a href="#">UiObject</a> 1958 </span> 1959 <span class="sympad">getChild</span> 1960 <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span> 1961 </h4> 1962 <div class="api-level"> 1963 <div></div> 1964 1965 1966 1967 </div> 1968 <div class="jd-details-descr"> 1969 1970 <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject for a child view that is under the present UiObject.</p></div> 1971 <div class="jd-tagdata"> 1972 <h5 class="jd-tagtitle">Parameters</h5> 1973 <table class="jd-tagtable"> 1974 <tr> 1975 <th>selector</td> 1976 <td>for child view to match</td> 1977 </tr> 1978 </table> 1979 </div> 1980 <div class="jd-tagdata"> 1981 <h5 class="jd-tagtitle">Returns</h5> 1982 <ul class="nolist"><li>a new UiObject representing the child view</li></ul> 1983 </div> 1984 <div class="jd-tagdata"> 1985 <h5 class="jd-tagtitle">Throws</h5> 1986 <table class="jd-tagtable"> 1987 <tr> 1988 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 1989 <td></td> 1990 </tr> 1991 </table> 1992 </div> 1993 1994 </div> 1995 </div> 1996 1997 1998 <A NAME="getChildCount()"></A> 1999 2000 <div class="jd-details api"> 2001 <h4 class="jd-details-title"> 2002 <span class="normal"> 2003 public 2004 2005 2006 2007 2008 int 2009 </span> 2010 <span class="sympad">getChildCount</span> 2011 <span class="normal">()</span> 2012 </h4> 2013 <div class="api-level"> 2014 <div></div> 2015 2016 2017 2018 </div> 2019 <div class="jd-details-descr"> 2020 2021 <div class="jd-tagdata jd-tagdescr"><p>Counts the child views immediately under the present UiObject.</p></div> 2022 <div class="jd-tagdata"> 2023 <h5 class="jd-tagtitle">Returns</h5> 2024 <ul class="nolist"><li>the count of child views.</li></ul> 2025 </div> 2026 <div class="jd-tagdata"> 2027 <h5 class="jd-tagtitle">Throws</h5> 2028 <table class="jd-tagtable"> 2029 2030 <tr> 2031 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2032 <td></td> 2033 </tr> 2034 </table> 2035 </div> 2036 2037 </div> 2038 </div> 2039 2040 2041 <A NAME="getClassName()"></A> 2042 2043 <div class="jd-details api"> 2044 <h4 class="jd-details-title"> 2045 <span class="normal"> 2046 public 2047 2048 2049 2050 2051 String 2052 </span> 2053 <span class="sympad">getClassName</span> 2054 <span class="normal">()</span> 2055 </h4> 2056 <div class="jd-details-descr"> 2057 2058 <div class="jd-tagdata jd-tagdescr"><p>Retrieves the <code>className</code> property of the UI element.</p></div> 2059 <div class="jd-tagdata"> 2060 <h5 class="jd-tagtitle">Returns</h5> 2061 <ul class="nolist"><li>class name of the current node represented by this UiObject</li></ul> 2062 </div> 2063 <div class="jd-tagdata"> 2064 <h5 class="jd-tagtitle">Throws</h5> 2065 <table class="jd-tagtable"> 2066 <tr> 2067 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2068 <td>if no match was found</td> 2069 </tr> 2070 </table> 2071 </div> 2072 <div class="jd-tagdata"> 2073 <h5 class="jd-tagtitle">Since</h5> 2074 <ul class="nolist"><li>Android API Level 18</li></ul> 2075 </div> 2076 </div> 2077 </div> 2078 2079 2080 <A NAME="getContentDescription()"></A> 2081 2082 <div class="jd-details api"> 2083 <h4 class="jd-details-title"> 2084 <span class="normal"> 2085 public 2086 2087 2088 2089 2090 String 2091 </span> 2092 <span class="sympad">getContentDescription</span> 2093 <span class="normal">()</span> 2094 </h4> 2095 <div class="api-level"> 2096 <div></div> 2097 2098 2099 2100 </div> 2101 <div class="jd-details-descr"> 2102 2103 <div class="jd-tagdata jd-tagdescr"><p>Reads the <code>content_desc</code> property of the UI element</p></div> 2104 <div class="jd-tagdata"> 2105 <h5 class="jd-tagtitle">Returns</h5> 2106 <ul class="nolist"><li>value of node attribute "content_desc"</li></ul> 2107 </div> 2108 <div class="jd-tagdata"> 2109 <h5 class="jd-tagtitle">Throws</h5> 2110 <table class="jd-tagtable"> 2111 2112 <tr> 2113 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2114 <td></td> 2115 </tr> 2116 </table> 2117 </div> 2118 2119 </div> 2120 </div> 2121 2122 2123 <A NAME="getFromParent(com.android.uiautomator.core.UiSelector)"></A> 2124 2125 <div class="jd-details api"> 2126 <h4 class="jd-details-title"> 2127 <span class="normal"> 2128 public 2129 2130 2131 2132 2133 <a href="#">UiObject</a> 2134 </span> 2135 <span class="sympad">getFromParent</span> 2136 <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span> 2137 </h4> 2138 <div class="api-level"> 2139 <div></div> 2140 2141 2142 2143 </div> 2144 <div class="jd-details-descr"> 2145 2146 <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject for a sibling view or a child of the sibling view, 2147 relative to the present UiObject.</p></div> 2148 <div class="jd-tagdata"> 2149 <h5 class="jd-tagtitle">Parameters</h5> 2150 <table class="jd-tagtable"> 2151 <tr> 2152 <th>selector</td> 2153 <td>for a sibling view or children of the sibling view</td> 2154 </tr> 2155 </table> 2156 </div> 2157 <div class="jd-tagdata"> 2158 <h5 class="jd-tagtitle">Returns</h5> 2159 <ul class="nolist"><li>a new UiObject representing the matched view</li></ul> 2160 </div> 2161 <div class="jd-tagdata"> 2162 <h5 class="jd-tagtitle">Throws</h5> 2163 <table class="jd-tagtable"> 2164 2165 <tr> 2166 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2167 <td></td> 2168 </tr> 2169 </table> 2170 </div> 2171 2172 </div> 2173 </div> 2174 2175 2176 <A NAME="getPackageName()"></A> 2177 2178 <div class="jd-details api"> 2179 <h4 class="jd-details-title"> 2180 <span class="normal"> 2181 public 2182 2183 2184 2185 2186 String 2187 </span> 2188 <span class="sympad">getPackageName</span> 2189 <span class="normal">()</span> 2190 </h4> 2191 <div class="api-level"> 2192 <div></div> 2193 2194 2195 2196 </div> 2197 <div class="jd-details-descr"> 2198 2199 <div class="jd-tagdata jd-tagdescr"><p>Reads the view's <code>package</code> property</p></div> 2200 <div class="jd-tagdata"> 2201 <h5 class="jd-tagtitle">Returns</h5> 2202 <ul class="nolist"><li>true if it is else false</li></ul> 2203 </div> 2204 <div class="jd-tagdata"> 2205 <h5 class="jd-tagtitle">Throws</h5> 2206 <table class="jd-tagtable"> 2207 2208 <tr> 2209 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2210 <td></td> 2211 </tr> 2212 </table> 2213 </div> 2214 2215 </div> 2216 </div> 2217 2218 2219 <A NAME="getSelector()"></A> 2220 2221 <div class="jd-details api"> 2222 <h4 class="jd-details-title"> 2223 <span class="normal"> 2224 public 2225 2226 final 2227 2228 2229 <a href="UiSelector.html">UiSelector</a> 2230 </span> 2231 <span class="sympad">getSelector</span> 2232 <span class="normal">()</span> 2233 </h4> 2234 <div class="api-level"> 2235 <div></div> 2236 2237 2238 2239 </div> 2240 <div class="jd-details-descr"> 2241 2242 <div class="jd-tagdata jd-tagdescr"><p>Debugging helper. A test can dump the properties of a selector as a string 2243 to its logs if needed. <code>getSelector().toString();</code></p></div> 2244 <div class="jd-tagdata"> 2245 <h5 class="jd-tagtitle">Returns</h5> 2246 <ul class="nolist"><li><code><a href="UiSelector.html">UiSelector</a></code></li></ul> 2247 </div> 2248 2249 </div> 2250 </div> 2251 2252 2253 <A NAME="getText()"></A> 2254 2255 <div class="jd-details api"> 2256 <h4 class="jd-details-title"> 2257 <span class="normal"> 2258 public 2259 2260 2261 2262 2263 String 2264 </span> 2265 <span class="sympad">getText</span> 2266 <span class="normal">()</span> 2267 </h4> 2268 <div class="api-level"> 2269 <div></div> 2270 2271 2272 2273 </div> 2274 <div class="jd-details-descr"> 2275 2276 <div class="jd-tagdata jd-tagdescr"><p>Reads the <code>text</code> property of the UI element</p></div> 2277 <div class="jd-tagdata"> 2278 <h5 class="jd-tagtitle">Returns</h5> 2279 <ul class="nolist"><li>text value of the current node represented by this UiObject</li></ul> 2280 </div> 2281 <div class="jd-tagdata"> 2282 <h5 class="jd-tagtitle">Throws</h5> 2283 <table class="jd-tagtable"> 2284 <tr> 2285 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2286 <td>if no match could be found</td> 2287 </tr> 2288 </table> 2289 </div> 2290 2291 </div> 2292 </div> 2293 2294 2295 <A NAME="getVisibleBounds()"></A> 2296 2297 <div class="jd-details api"> 2298 <h4 class="jd-details-title"> 2299 <span class="normal"> 2300 public 2301 2302 2303 2304 2305 Rect 2306 </span> 2307 <span class="sympad">getVisibleBounds</span> 2308 <span class="normal">()</span> 2309 </h4> 2310 <div class="jd-details-descr"> 2311 2312 <div class="jd-tagdata jd-tagdescr"><p>Returns the visible bounds of the view. 2313 2314 If a portion of the view is visible, only the bounds of the visible portion are 2315 reported.</p></div> 2316 <div class="jd-tagdata"> 2317 <h5 class="jd-tagtitle">Returns</h5> 2318 <ul class="nolist"><li>Rect</li></ul> 2319 </div> 2320 <div class="jd-tagdata"> 2321 <h5 class="jd-tagtitle">Throws</h5> 2322 <table class="jd-tagtable"> 2323 2324 <tr> 2325 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2326 <td></td> 2327 </tr> 2328 </table> 2329 </div> 2330 <div class="jd-tagdata"> 2331 <h5 class="jd-tagtitle">See Also</h5> 2332 <ul class="nolist"><li><code><a href="#getBounds()">getBounds()</a></code></li> 2333 </ul> 2334 </div> 2335 <div class="jd-tagdata"> 2336 <h5 class="jd-tagtitle">Since</h5> 2337 <ul class="nolist"><li>Android API Level 17</li></ul> 2338 </div> 2339 </div> 2340 </div> 2341 2342 2343 <A NAME="isCheckable()"></A> 2344 2345 <div class="jd-details api"> 2346 <h4 class="jd-details-title"> 2347 <span class="normal"> 2348 public 2349 2350 2351 2352 2353 boolean 2354 </span> 2355 <span class="sympad">isCheckable</span> 2356 <span class="normal">()</span> 2357 </h4> 2358 <div class="api-level"> 2359 <div></div> 2360 2361 2362 2363 </div> 2364 <div class="jd-details-descr"> 2365 2366 <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>checkable</code> property is currently true.</p></div> 2367 <div class="jd-tagdata"> 2368 <h5 class="jd-tagtitle">Returns</h5> 2369 <ul class="nolist"><li>true if it is else false</li></ul> 2370 </div> 2371 <div class="jd-tagdata"> 2372 <h5 class="jd-tagtitle">Throws</h5> 2373 <table class="jd-tagtable"> 2374 2375 <tr> 2376 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2377 <td></td> 2378 </tr> 2379 </table> 2380 </div> 2381 2382 </div> 2383 </div> 2384 2385 2386 <A NAME="isChecked()"></A> 2387 2388 <div class="jd-details api"> 2389 <h4 class="jd-details-title"> 2390 <span class="normal"> 2391 public 2392 2393 2394 2395 2396 boolean 2397 </span> 2398 <span class="sympad">isChecked</span> 2399 <span class="normal">()</span> 2400 </h4> 2401 <div class="api-level"> 2402 <div></div> 2403 2404 2405 2406 </div> 2407 <div class="jd-details-descr"> 2408 2409 <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>checked</code> property is currently true</p></div> 2410 <div class="jd-tagdata"> 2411 <h5 class="jd-tagtitle">Returns</h5> 2412 <ul class="nolist"><li>true if it is else false</li></ul> 2413 </div> 2414 <div class="jd-tagdata"> 2415 <h5 class="jd-tagtitle">Throws</h5> 2416 <table class="jd-tagtable"> 2417 <tr> 2418 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2419 <td></td> 2420 </tr> 2421 </table> 2422 </div> 2423 2424 </div> 2425 </div> 2426 2427 2428 <A NAME="isClickable()"></A> 2429 2430 <div class="jd-details api"> 2431 <h4 class="jd-details-title"> 2432 <span class="normal"> 2433 public 2434 2435 2436 2437 2438 boolean 2439 </span> 2440 <span class="sympad">isClickable</span> 2441 <span class="normal">()</span> 2442 </h4> 2443 <div class="api-level"> 2444 <div></div> 2445 2446 2447 2448 </div> 2449 <div class="jd-details-descr"> 2450 2451 <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>clickable</code> property is currently true.</p></div> 2452 <div class="jd-tagdata"> 2453 <h5 class="jd-tagtitle">Returns</h5> 2454 <ul class="nolist"><li>true if it is else false</li></ul> 2455 </div> 2456 <div class="jd-tagdata"> 2457 <h5 class="jd-tagtitle">Throws</h5> 2458 <table class="jd-tagtable"> 2459 2460 <tr> 2461 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2462 <td></td> 2463 </tr> 2464 </table> 2465 </div> 2466 2467 </div> 2468 </div> 2469 2470 2471 <A NAME="isEnabled()"></A> 2472 2473 <div class="jd-details api"> 2474 <h4 class="jd-details-title"> 2475 <span class="normal"> 2476 public 2477 2478 2479 2480 2481 boolean 2482 </span> 2483 <span class="sympad">isEnabled</span> 2484 <span class="normal">()</span> 2485 </h4> 2486 <div class="api-level"> 2487 <div></div> 2488 2489 2490 2491 </div> 2492 <div class="jd-details-descr"> 2493 2494 <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>enabled</code> property is currently true.</p></div> 2495 <div class="jd-tagdata"> 2496 <h5 class="jd-tagtitle">Returns</h5> 2497 <ul class="nolist"><li>true if it is else false</li></ul> 2498 </div> 2499 <div class="jd-tagdata"> 2500 <h5 class="jd-tagtitle">Throws</h5> 2501 <table class="jd-tagtable"> 2502 2503 <tr> 2504 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2505 <td></td> 2506 </tr> 2507 </table> 2508 </div> 2509 2510 </div> 2511 </div> 2512 2513 2514 <A NAME="isFocusable()"></A> 2515 2516 <div class="jd-details api"> 2517 <h4 class="jd-details-title"> 2518 <span class="normal"> 2519 public 2520 2521 2522 2523 2524 boolean 2525 </span> 2526 <span class="sympad">isFocusable</span> 2527 <span class="normal">()</span> 2528 </h4> 2529 <div class="api-level"> 2530 <div></div> 2531 2532 2533 2534 </div> 2535 <div class="jd-details-descr"> 2536 2537 <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>focusable</code> property is currently true.</p></div> 2538 <div class="jd-tagdata"> 2539 <h5 class="jd-tagtitle">Returns</h5> 2540 <ul class="nolist"><li>true if it is else false</li></ul> 2541 </div> 2542 <div class="jd-tagdata"> 2543 <h5 class="jd-tagtitle">Throws</h5> 2544 <table class="jd-tagtable"> 2545 2546 <tr> 2547 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2548 <td></td> 2549 </tr> 2550 </table> 2551 </div> 2552 2553 </div> 2554 </div> 2555 2556 2557 <A NAME="isFocused()"></A> 2558 2559 <div class="jd-details api"> 2560 <h4 class="jd-details-title"> 2561 <span class="normal"> 2562 public 2563 2564 2565 2566 2567 boolean 2568 </span> 2569 <span class="sympad">isFocused</span> 2570 <span class="normal">()</span> 2571 </h4> 2572 <div class="api-level"> 2573 <div></div> 2574 2575 2576 2577 </div> 2578 <div class="jd-details-descr"> 2579 2580 <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>focused</code> property is currently true</p></div> 2581 <div class="jd-tagdata"> 2582 <h5 class="jd-tagtitle">Returns</h5> 2583 <ul class="nolist"><li>true if it is else false</li></ul> 2584 </div> 2585 <div class="jd-tagdata"> 2586 <h5 class="jd-tagtitle">Throws</h5> 2587 <table class="jd-tagtable"> 2588 2589 <tr> 2590 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2591 <td></td> 2592 </tr> 2593 </table> 2594 </div> 2595 2596 </div> 2597 </div> 2598 2599 2600 <A NAME="isLongClickable()"></A> 2601 2602 <div class="jd-details api"> 2603 <h4 class="jd-details-title"> 2604 <span class="normal"> 2605 public 2606 2607 2608 2609 2610 boolean 2611 </span> 2612 <span class="sympad">isLongClickable</span> 2613 <span class="normal">()</span> 2614 </h4> 2615 <div class="api-level"> 2616 <div></div> 2617 2618 2619 2620 </div> 2621 <div class="jd-details-descr"> 2622 2623 <div class="jd-tagdata jd-tagdescr"><p>Check if the view's <code>long-clickable</code> property is currently true</p></div> 2624 <div class="jd-tagdata"> 2625 <h5 class="jd-tagtitle">Returns</h5> 2626 <ul class="nolist"><li>true if it is else false</li></ul> 2627 </div> 2628 <div class="jd-tagdata"> 2629 <h5 class="jd-tagtitle">Throws</h5> 2630 <table class="jd-tagtable"> 2631 2632 <tr> 2633 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2634 <td></td> 2635 </tr> 2636 </table> 2637 </div> 2638 2639 </div> 2640 </div> 2641 2642 2643 <A NAME="isScrollable()"></A> 2644 2645 <div class="jd-details api"> 2646 <h4 class="jd-details-title"> 2647 <span class="normal"> 2648 public 2649 2650 2651 2652 2653 boolean 2654 </span> 2655 <span class="sympad">isScrollable</span> 2656 <span class="normal">()</span> 2657 </h4> 2658 <div class="api-level"> 2659 <div></div> 2660 2661 2662 2663 </div> 2664 <div class="jd-details-descr"> 2665 2666 <div class="jd-tagdata jd-tagdescr"><p>Check if the view's <code>scrollable</code> property is currently true</p></div> 2667 <div class="jd-tagdata"> 2668 <h5 class="jd-tagtitle">Returns</h5> 2669 <ul class="nolist"><li>true if it is else false</li></ul> 2670 </div> 2671 <div class="jd-tagdata"> 2672 <h5 class="jd-tagtitle">Throws</h5> 2673 <table class="jd-tagtable"> 2674 2675 <tr> 2676 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2677 <td></td> 2678 </tr> 2679 </table> 2680 </div> 2681 2682 </div> 2683 </div> 2684 2685 2686 <A NAME="isSelected()"></A> 2687 2688 <div class="jd-details api"> 2689 <h4 class="jd-details-title"> 2690 <span class="normal"> 2691 public 2692 2693 2694 2695 2696 boolean 2697 </span> 2698 <span class="sympad">isSelected</span> 2699 <span class="normal">()</span> 2700 </h4> 2701 <div class="api-level"> 2702 <div></div> 2703 2704 2705 2706 </div> 2707 <div class="jd-details-descr"> 2708 2709 <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>selected</code> property is currently true.</p></div> 2710 <div class="jd-tagdata"> 2711 <h5 class="jd-tagtitle">Returns</h5> 2712 <ul class="nolist"><li>true if it is else false</li></ul> 2713 </div> 2714 <div class="jd-tagdata"> 2715 <h5 class="jd-tagtitle">Throws</h5> 2716 <table class="jd-tagtable"> 2717 2718 <tr> 2719 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2720 <td></td> 2721 </tr> 2722 </table> 2723 </div> 2724 2725 </div> 2726 </div> 2727 2728 2729 <A NAME="longClick()"></A> 2730 2731 <div class="jd-details api"> 2732 <h4 class="jd-details-title"> 2733 <span class="normal"> 2734 public 2735 2736 2737 2738 2739 boolean 2740 </span> 2741 <span class="sympad">longClick</span> 2742 <span class="normal">()</span> 2743 </h4> 2744 <div class="api-level"> 2745 <div></div> 2746 2747 2748 2749 </div> 2750 <div class="jd-details-descr"> 2751 2752 <div class="jd-tagdata jd-tagdescr"><p>Long clicks the center of the visible bounds of the UI element</p></div> 2753 <div class="jd-tagdata"> 2754 <h5 class="jd-tagtitle">Returns</h5> 2755 <ul class="nolist"><li>true if operation was successful</li></ul> 2756 </div> 2757 <div class="jd-tagdata"> 2758 <h5 class="jd-tagtitle">Throws</h5> 2759 <table class="jd-tagtable"> 2760 2761 <tr> 2762 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2763 <td></td> 2764 </tr> 2765 </table> 2766 </div> 2767 2768 </div> 2769 </div> 2770 2771 2772 <A NAME="longClickBottomRight()"></A> 2773 2774 <div class="jd-details api"> 2775 <h4 class="jd-details-title"> 2776 <span class="normal"> 2777 public 2778 2779 2780 2781 2782 boolean 2783 </span> 2784 <span class="sympad">longClickBottomRight</span> 2785 <span class="normal">()</span> 2786 </h4> 2787 <div class="api-level"> 2788 <div></div> 2789 2790 2791 2792 </div> 2793 <div class="jd-details-descr"> 2794 2795 <div class="jd-tagdata jd-tagdescr"><p>Long clicks bottom and right corner of the UI element</p></div> 2796 <div class="jd-tagdata"> 2797 <h5 class="jd-tagtitle">Returns</h5> 2798 <ul class="nolist"><li>true if operation was successful</li></ul> 2799 </div> 2800 <div class="jd-tagdata"> 2801 <h5 class="jd-tagtitle">Throws</h5> 2802 <table class="jd-tagtable"> 2803 2804 <tr> 2805 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2806 <td></td> 2807 </tr> 2808 </table> 2809 </div> 2810 2811 </div> 2812 </div> 2813 2814 2815 <A NAME="longClickTopLeft()"></A> 2816 2817 <div class="jd-details api"> 2818 <h4 class="jd-details-title"> 2819 <span class="normal"> 2820 public 2821 2822 2823 2824 2825 boolean 2826 </span> 2827 <span class="sympad">longClickTopLeft</span> 2828 <span class="normal">()</span> 2829 </h4> 2830 <div class="api-level"> 2831 <div></div> 2832 2833 2834 2835 </div> 2836 <div class="jd-details-descr"> 2837 2838 <div class="jd-tagdata jd-tagdescr"><p>Long clicks on the top and left corner of the UI element</p></div> 2839 <div class="jd-tagdata"> 2840 <h5 class="jd-tagtitle">Returns</h5> 2841 <ul class="nolist"><li>true if operation was successful</li></ul> 2842 </div> 2843 <div class="jd-tagdata"> 2844 <h5 class="jd-tagtitle">Throws</h5> 2845 <table class="jd-tagtable"> 2846 2847 <tr> 2848 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 2849 <td></td> 2850 </tr> 2851 </table> 2852 </div> 2853 2854 </div> 2855 </div> 2856 2857 2858 <A NAME="performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)"></A> 2859 2860 <div class="jd-details api"> 2861 <h4 class="jd-details-title"> 2862 <span class="normal"> 2863 public 2864 2865 2866 2867 2868 boolean 2869 </span> 2870 <span class="sympad">performMultiPointerGesture</span> 2871 <span class="normal">(PointerCoords... touches)</span> 2872 </h4> 2873 <div class="jd-details-descr"> 2874 2875 <div class="jd-tagdata jd-tagdescr"><p>Performs a multi-touch gesture. You must specify touch coordinates for 2876 at least 2 pointers. Each pointer must have all of its touch steps 2877 defined in an array of <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code>. You can use this method to 2878 specify complex gestures, like circles and irregular shapes, where each 2879 pointer may take a different path. 2880 2881 To create a single point on a pointer's touch path: 2882 <code> 2883 PointerCoords p = new PointerCoords(); 2884 p.x = stepX; 2885 p.y = stepY; 2886 p.pressure = 1; 2887 p.size = 1; 2888 </code></p></div> 2889 <div class="jd-tagdata"> 2890 <h5 class="jd-tagtitle">Parameters</h5> 2891 <table class="jd-tagtable"> 2892 <tr> 2893 <th>touches</td> 2894 <td>represents the pointers' paths. Each <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code> 2895 array represents a different pointer. Each <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code> in an 2896 array element represents a touch point on a pointer's path.</td> 2897 </tr> 2898 </table> 2899 </div> 2900 <div class="jd-tagdata"> 2901 <h5 class="jd-tagtitle">Returns</h5> 2902 <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, 2903 <code>false</code> otherwise</li></ul> 2904 </div> 2905 <div class="jd-tagdata"> 2906 <h5 class="jd-tagtitle">Since</h5> 2907 <ul class="nolist"><li>Android API Level 18</li></ul> 2908 </div> 2909 </div> 2910 </div> 2911 2912 2913 <A NAME="performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int)"></A> 2914 2915 <div class="jd-details api"> 2916 <h4 class="jd-details-title"> 2917 <span class="normal"> 2918 public 2919 2920 2921 2922 2923 boolean 2924 </span> 2925 <span class="sympad">performTwoPointerGesture</span> 2926 <span class="normal">(Point startPoint1, Point startPoint2, Point endPoint1, Point endPoint2, int steps)</span> 2927 </h4> 2928 <div class="jd-details-descr"> 2929 2930 <div class="jd-tagdata jd-tagdescr"><p>Generates a two-pointer gesture with arbitrary starting and ending points.</p></div> 2931 <div class="jd-tagdata"> 2932 <h5 class="jd-tagtitle">Parameters</h5> 2933 <table class="jd-tagtable"> 2934 <tr> 2935 <th>startPoint1</td> 2936 <td>start point of pointer 1</td> 2937 </tr> 2938 <tr> 2939 <th>startPoint2</td> 2940 <td>start point of pointer 2</td> 2941 </tr> 2942 <tr> 2943 <th>endPoint1</td> 2944 <td>end point of pointer 1</td> 2945 </tr> 2946 <tr> 2947 <th>endPoint2</td> 2948 <td>end point of pointer 2</td> 2949 </tr> 2950 <tr> 2951 <th>steps</td> 2952 <td>the number of steps for the gesture. Steps are injected 2953 about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td> 2954 </tr> 2955 </table> 2956 </div> 2957 <div class="jd-tagdata"> 2958 <h5 class="jd-tagtitle">Returns</h5> 2959 <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, 2960 <code>false</code> otherwise</li></ul> 2961 </div> 2962 <div class="jd-tagdata"> 2963 <h5 class="jd-tagtitle">Since</h5> 2964 <ul class="nolist"><li>Android API Level 18</li></ul> 2965 </div> 2966 </div> 2967 </div> 2968 2969 2970 <A NAME="pinchIn(int, int)"></A> 2971 2972 <div class="jd-details api"> 2973 <h4 class="jd-details-title"> 2974 <span class="normal"> 2975 public 2976 2977 2978 2979 2980 boolean 2981 </span> 2982 <span class="sympad">pinchIn</span> 2983 <span class="normal">(int percent, int steps)</span> 2984 </h4> 2985 <div class="jd-details-descr"> 2986 2987 <div class="jd-tagdata jd-tagdescr"><p>Performs a two-pointer gesture, where each pointer moves diagonally 2988 toward the other, from the edges to the center of this UiObject .</p></div> 2989 <div class="jd-tagdata"> 2990 <h5 class="jd-tagtitle">Parameters</h5> 2991 <table class="jd-tagtable"> 2992 <tr> 2993 <th>percent</td> 2994 <td>percentage of the object's diagonal length for the pinch gesture</td> 2995 </tr> 2996 <tr> 2997 <th>steps</td> 2998 <td>the number of steps for the gesture. Steps are injected 2999 about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td> 3000 </tr> 3001 </table> 3002 </div> 3003 <div class="jd-tagdata"> 3004 <h5 class="jd-tagtitle">Returns</h5> 3005 <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, 3006 <code>false</code> otherwise</li></ul> 3007 </div> 3008 <div class="jd-tagdata"> 3009 <h5 class="jd-tagtitle">Throws</h5> 3010 <table class="jd-tagtable"> 3011 3012 <tr> 3013 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 3014 <td></td> 3015 </tr> 3016 </table> 3017 </div> 3018 <div class="jd-tagdata"> 3019 <h5 class="jd-tagtitle">Since</h5> 3020 <ul class="nolist"><li>Android API Level 18</li></ul> 3021 </div> 3022 </div> 3023 </div> 3024 3025 3026 <A NAME="pinchOut(int, int)"></A> 3027 3028 <div class="jd-details api"> 3029 <h4 class="jd-details-title"> 3030 <span class="normal"> 3031 public 3032 3033 3034 3035 3036 boolean 3037 </span> 3038 <span class="sympad">pinchOut</span> 3039 <span class="normal">(int percent, int steps)</span> 3040 </h4> 3041 <div class="jd-details-descr"> 3042 3043 <div class="jd-tagdata jd-tagdescr"><p>Performs a two-pointer gesture, where each pointer moves diagonally 3044 opposite across the other, from the center out towards the edges of the 3045 this UiObject.</p></div> 3046 <div class="jd-tagdata"> 3047 <h5 class="jd-tagtitle">Parameters</h5> 3048 <table class="jd-tagtable"> 3049 <tr> 3050 <th>percent</td> 3051 <td>percentage of the object's diagonal length for the pinch gesture</td> 3052 </tr> 3053 <tr> 3054 <th>steps</td> 3055 <td>the number of steps for the gesture. Steps are injected 3056 about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td> 3057 </tr> 3058 </table> 3059 </div> 3060 <div class="jd-tagdata"> 3061 <h5 class="jd-tagtitle">Returns</h5> 3062 <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, 3063 <code>false</code> otherwise</li></ul> 3064 </div> 3065 <div class="jd-tagdata"> 3066 <h5 class="jd-tagtitle">Throws</h5> 3067 <table class="jd-tagtable"> 3068 3069 <tr> 3070 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 3071 <td></td> 3072 </tr> 3073 </table> 3074 </div> 3075 <div class="jd-tagdata"> 3076 <h5 class="jd-tagtitle">Since</h5> 3077 <ul class="nolist"><li>Android API Level 18</li></ul> 3078 </div> 3079 </div> 3080 </div> 3081 3082 3083 <A NAME="setText(java.lang.String)"></A> 3084 3085 <div class="jd-details api"> 3086 <h4 class="jd-details-title"> 3087 <span class="normal"> 3088 public 3089 3090 3091 3092 3093 boolean 3094 </span> 3095 <span class="sympad">setText</span> 3096 <span class="normal">(String text)</span> 3097 </h4> 3098 <div class="api-level"> 3099 <div></div> 3100 3101 3102 3103 </div> 3104 <div class="jd-details-descr"> 3105 3106 <div class="jd-tagdata jd-tagdescr"><p>Sets the text in an editable field, after clearing the field's content. 3107 3108 The <code><a href="UiSelector.html">UiSelector</a></code> selector of this object must reference a UI element that is editable. 3109 3110 When you call this method, the method first simulates a <code><a href="#click()">click()</a></code> on 3111 editable field to set focus. The method then clears the field's contents 3112 and injects your specified text into the field. 3113 3114 If you want to capture the original contents of the field, call <code><a href="#getText()">getText()</a></code> first. 3115 You can then modify the text and use this method to update the field.</p></div> 3116 <div class="jd-tagdata"> 3117 <h5 class="jd-tagtitle">Parameters</h5> 3118 <table class="jd-tagtable"> 3119 <tr> 3120 <th>text</td> 3121 <td>string to set</td> 3122 </tr> 3123 </table> 3124 </div> 3125 <div class="jd-tagdata"> 3126 <h5 class="jd-tagtitle">Returns</h5> 3127 <ul class="nolist"><li>true if operation is successful</li></ul> 3128 </div> 3129 <div class="jd-tagdata"> 3130 <h5 class="jd-tagtitle">Throws</h5> 3131 <table class="jd-tagtable"> 3132 3133 <tr> 3134 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 3135 <td></td> 3136 </tr> 3137 </table> 3138 </div> 3139 3140 </div> 3141 </div> 3142 3143 3144 <A NAME="swipeDown(int)"></A> 3145 3146 <div class="jd-details api"> 3147 <h4 class="jd-details-title"> 3148 <span class="normal"> 3149 public 3150 3151 3152 3153 3154 boolean 3155 </span> 3156 <span class="sympad">swipeDown</span> 3157 <span class="normal">(int steps)</span> 3158 </h4> 3159 <div class="api-level"> 3160 <div></div> 3161 3162 3163 3164 </div> 3165 <div class="jd-details-descr"> 3166 3167 <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe down action on the UiObject. 3168 The swipe gesture can be performed over any surface. The targeted 3169 UI element does not need to be scrollable. 3170 See also: 3171 <ul> 3172 <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> 3173 <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> 3174 <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> 3175 <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> 3176 </ul></p></div> 3177 <div class="jd-tagdata"> 3178 <h5 class="jd-tagtitle">Parameters</h5> 3179 <table class="jd-tagtable"> 3180 <tr> 3181 <th>steps</td> 3182 <td>indicates the number of injected move steps into the system. Steps are 3183 injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> 3184 </tr> 3185 </table> 3186 </div> 3187 <div class="jd-tagdata"> 3188 <h5 class="jd-tagtitle">Returns</h5> 3189 <ul class="nolist"><li>true if successful</li></ul> 3190 </div> 3191 <div class="jd-tagdata"> 3192 <h5 class="jd-tagtitle">Throws</h5> 3193 <table class="jd-tagtable"> 3194 3195 <tr> 3196 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 3197 <td></td> 3198 </tr> 3199 </table> 3200 </div> 3201 3202 </div> 3203 </div> 3204 3205 3206 <A NAME="swipeLeft(int)"></A> 3207 3208 <div class="jd-details api"> 3209 <h4 class="jd-details-title"> 3210 <span class="normal"> 3211 public 3212 3213 3214 3215 3216 boolean 3217 </span> 3218 <span class="sympad">swipeLeft</span> 3219 <span class="normal">(int steps)</span> 3220 </h4> 3221 <div class="api-level"> 3222 <div></div> 3223 3224 3225 3226 </div> 3227 <div class="jd-details-descr"> 3228 3229 <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe left action on the UiObject. 3230 The swipe gesture can be performed over any surface. The targeted 3231 UI element does not need to be scrollable. 3232 See also: 3233 <ul> 3234 <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> 3235 <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> 3236 <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> 3237 <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> 3238 </ul></p></div> 3239 <div class="jd-tagdata"> 3240 <h5 class="jd-tagtitle">Parameters</h5> 3241 <table class="jd-tagtable"> 3242 <tr> 3243 <th>steps</td> 3244 <td>indicates the number of injected move steps into the system. Steps are 3245 injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> 3246 </tr> 3247 </table> 3248 </div> 3249 <div class="jd-tagdata"> 3250 <h5 class="jd-tagtitle">Returns</h5> 3251 <ul class="nolist"><li>true if successful</li></ul> 3252 </div> 3253 <div class="jd-tagdata"> 3254 <h5 class="jd-tagtitle">Throws</h5> 3255 <table class="jd-tagtable"> 3256 3257 <tr> 3258 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 3259 <td></td> 3260 </tr> 3261 </table> 3262 </div> 3263 3264 </div> 3265 </div> 3266 3267 3268 <A NAME="swipeRight(int)"></A> 3269 3270 <div class="jd-details api"> 3271 <h4 class="jd-details-title"> 3272 <span class="normal"> 3273 public 3274 3275 3276 3277 3278 boolean 3279 </span> 3280 <span class="sympad">swipeRight</span> 3281 <span class="normal">(int steps)</span> 3282 </h4> 3283 <div class="api-level"> 3284 <div></div> 3285 3286 3287 3288 </div> 3289 <div class="jd-details-descr"> 3290 3291 <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe right action on the UiObject. 3292 The swipe gesture can be performed over any surface. The targeted 3293 UI element does not need to be scrollable. 3294 See also: 3295 <ul> 3296 <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> 3297 <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> 3298 <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> 3299 <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> 3300 </ul></p></div> 3301 <div class="jd-tagdata"> 3302 <h5 class="jd-tagtitle">Parameters</h5> 3303 <table class="jd-tagtable"> 3304 <tr> 3305 <th>steps</td> 3306 <td>indicates the number of injected move steps into the system. Steps are 3307 injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> 3308 </tr> 3309 </table> 3310 </div> 3311 <div class="jd-tagdata"> 3312 <h5 class="jd-tagtitle">Returns</h5> 3313 <ul class="nolist"><li>true if successful</li></ul> 3314 </div> 3315 <div class="jd-tagdata"> 3316 <h5 class="jd-tagtitle">Throws</h5> 3317 <table class="jd-tagtable"> 3318 3319 <tr> 3320 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 3321 <td></td> 3322 </tr> 3323 </table> 3324 </div> 3325 3326 </div> 3327 </div> 3328 3329 3330 <A NAME="swipeUp(int)"></A> 3331 3332 <div class="jd-details api"> 3333 <h4 class="jd-details-title"> 3334 <span class="normal"> 3335 public 3336 3337 3338 3339 3340 boolean 3341 </span> 3342 <span class="sympad">swipeUp</span> 3343 <span class="normal">(int steps)</span> 3344 </h4> 3345 <div class="api-level"> 3346 <div></div> 3347 3348 3349 3350 </div> 3351 <div class="jd-details-descr"> 3352 3353 <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe up action on the UiObject. 3354 See also: 3355 <ul> 3356 <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> 3357 <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> 3358 <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> 3359 <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> 3360 </ul></p></div> 3361 <div class="jd-tagdata"> 3362 <h5 class="jd-tagtitle">Parameters</h5> 3363 <table class="jd-tagtable"> 3364 <tr> 3365 <th>steps</td> 3366 <td>indicates the number of injected move steps into the system. Steps are 3367 injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> 3368 </tr> 3369 </table> 3370 </div> 3371 <div class="jd-tagdata"> 3372 <h5 class="jd-tagtitle">Returns</h5> 3373 <ul class="nolist"><li>true of successful</li></ul> 3374 </div> 3375 <div class="jd-tagdata"> 3376 <h5 class="jd-tagtitle">Throws</h5> 3377 <table class="jd-tagtable"> 3378 3379 <tr> 3380 <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> 3381 <td></td> 3382 </tr> 3383 </table> 3384 </div> 3385 3386 </div> 3387 </div> 3388 3389 3390 <A NAME="waitForExists(long)"></A> 3391 3392 <div class="jd-details api"> 3393 <h4 class="jd-details-title"> 3394 <span class="normal"> 3395 public 3396 3397 3398 3399 3400 boolean 3401 </span> 3402 <span class="sympad">waitForExists</span> 3403 <span class="normal">(long timeout)</span> 3404 </h4> 3405 <div class="api-level"> 3406 <div></div> 3407 3408 3409 3410 </div> 3411 <div class="jd-details-descr"> 3412 3413 <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a view to become visible. 3414 3415 This method waits until the view becomes visible on the display, or 3416 until the timeout has elapsed. You can use this method in situations where 3417 the content that you want to select is not immediately displayed.</p></div> 3418 <div class="jd-tagdata"> 3419 <h5 class="jd-tagtitle">Parameters</h5> 3420 <table class="jd-tagtable"> 3421 <tr> 3422 <th>timeout</td> 3423 <td>the amount of time to wait (in milliseconds)</td> 3424 </tr> 3425 </table> 3426 </div> 3427 <div class="jd-tagdata"> 3428 <h5 class="jd-tagtitle">Returns</h5> 3429 <ul class="nolist"><li>true if the view is displayed, else false if timeout elapsed while waiting</li></ul> 3430 </div> 3431 3432 </div> 3433 </div> 3434 3435 3436 <A NAME="waitUntilGone(long)"></A> 3437 3438 <div class="jd-details api"> 3439 <h4 class="jd-details-title"> 3440 <span class="normal"> 3441 public 3442 3443 3444 3445 3446 boolean 3447 </span> 3448 <span class="sympad">waitUntilGone</span> 3449 <span class="normal">(long timeout)</span> 3450 </h4> 3451 <div class="api-level"> 3452 <div></div> 3453 3454 3455 3456 </div> 3457 <div class="jd-details-descr"> 3458 3459 <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a view to become undetectable. 3460 3461 This method waits until a view is no longer matchable, or until the 3462 timeout has elapsed. 3463 3464 A view becomes undetectable when the <code><a href="UiSelector.html">UiSelector</a></code> of the object is 3465 unable to find a match because the element has either changed its state or is no 3466 longer displayed. 3467 3468 You can use this method when attempting to wait for some long operation 3469 to compete, such as downloading a large file or connecting to a remote server.</p></div> 3470 <div class="jd-tagdata"> 3471 <h5 class="jd-tagtitle">Parameters</h5> 3472 <table class="jd-tagtable"> 3473 <tr> 3474 <th>timeout</td> 3475 <td>time to wait (in milliseconds)</td> 3476 </tr> 3477 </table> 3478 </div> 3479 <div class="jd-tagdata"> 3480 <h5 class="jd-tagtitle">Returns</h5> 3481 <ul class="nolist"><li>true if the element is gone before timeout elapsed, else false if timeout elapsed 3482 but a matching element is still found.</li></ul> 3483 </div> 3484 3485 </div> 3486 </div> 3487 3488 3489 3490 3491 3492 <!-- ========= METHOD DETAIL ======== --> 3493 3494 <h2>Protected Methods</h2> 3495 3496 3497 3498 <A NAME="findAccessibilityNodeInfo(long)"></A> 3499 3500 <div class="jd-details api"> 3501 <h4 class="jd-details-title"> 3502 <span class="normal"> 3503 protected 3504 3505 3506 3507 3508 AccessibilityNodeInfo 3509 </span> 3510 <span class="sympad">findAccessibilityNodeInfo</span> 3511 <span class="normal">(long timeout)</span> 3512 </h4> 3513 <div class="api-level"> 3514 <div></div> 3515 3516 3517 3518 </div> 3519 <div class="jd-details-descr"> 3520 3521 <div class="jd-tagdata jd-tagdescr"><p>Finds a matching UI element in the accessibility hierarchy, by 3522 using the selector for this UiObject.</p></div> 3523 <div class="jd-tagdata"> 3524 <h5 class="jd-tagtitle">Parameters</h5> 3525 <table class="jd-tagtable"> 3526 <tr> 3527 <th>timeout</td> 3528 <td>in milliseconds</td> 3529 </tr> 3530 </table> 3531 </div> 3532 <div class="jd-tagdata"> 3533 <h5 class="jd-tagtitle">Returns</h5> 3534 <ul class="nolist"><li>AccessibilityNodeInfo if found else null</li></ul> 3535 </div> 3536 3537 </div> 3538 3539 3540 3541 3542 3543 3544