| page.title=UiObject |
| parent.title=uiautomator |
| parent.link=index.html |
| @jd:body |
| <style> |
| h4.jd-details-title {background-color: #DEE8F1;} |
| </style> |
| <p>A <code><a href="#">UiObject</a></code> is a representation of a view. It is |
| not in any way directly bound to a view as an object reference. A <code><a href="#">UiObject</a></code> |
| contains information to help it locate a matching view at runtime based on the |
| <code><a href="#UiSelector.html">UiSelector</a></code> properties specified in |
| its constructor. Once you create an instance of a UiObject, it can be reused for |
| different views that match the selector criteria.</p> |
| |
| <h2>Summary</h2> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- =========== ENUM CONSTANT SUMMARY =========== --> |
| <table id="constants" class="jd-sumtable"><tr><th colspan="12">Constants</th></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol">int</td> |
| <td class="jd-linkcol"><a href="#FINGER_TOUCH_HALF_WIDTH">FINGER_TOUCH_HALF_WIDTH</a></td> |
| <td class="jd-descrcol" width="100%"></td> |
| </tr> |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol">int</td> |
| <td class="jd-linkcol"><a href="#SWIPE_MARGIN_LIMIT">SWIPE_MARGIN_LIMIT</a></td> |
| <td class="jd-descrcol" width="100%"></td> |
| </tr> |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol">long</td> |
| <td class="jd-linkcol"><a href="#WAIT_FOR_EVENT_TMEOUT">WAIT_FOR_EVENT_TMEOUT</a></td> |
| <td class="jd-descrcol" width="100%"><em> |
| This constant is deprecated. |
| use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code> |
| </em></td> |
| </tr> |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol">long</td> |
| <td class="jd-linkcol"><a href="#WAIT_FOR_SELECTOR_POLL">WAIT_FOR_SELECTOR_POLL</a></td> |
| <td class="jd-descrcol" width="100%"></td> |
| </tr> |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol">long</td> |
| <td class="jd-linkcol"><a href="#WAIT_FOR_SELECTOR_TIMEOUT">WAIT_FOR_SELECTOR_TIMEOUT</a></td> |
| <td class="jd-descrcol" width="100%"><em> |
| This constant is deprecated. |
| use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code> |
| </em></td> |
| </tr> |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol">long</td> |
| <td class="jd-linkcol"><a href="#WAIT_FOR_WINDOW_TMEOUT">WAIT_FOR_WINDOW_TMEOUT</a></td> |
| <td class="jd-descrcol" width="100%"></td> |
| </tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| <table id="pubctors" class="jd-sumtable"><tr><th colspan="12">Public Constructors</th></tr> |
| |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| </nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#UiObject(com.android.uiautomator.core.UiSelector)">UiObject</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr> |
| |
| <div class="jd-descrdiv">Constructs a UiObject to represent a view that matches the specified |
| selector criteria.</div> |
| |
| </td></tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> |
| |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#clearTextField()">clearTextField</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Clears the existing text contents in an editable field.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#click()">click</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented |
| by this UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow</a></span>(long timeout)</nobr> |
| |
| <div class="jd-descrdiv">Performs a click at the center of the visible bounds of the UI element represented |
| by this UiObject and waits for window transitions.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#clickAndWaitForNewWindow()">clickAndWaitForNewWindow</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Waits for window transitions that would typically take longer than the |
| usual default timeouts.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#clickBottomRight()">clickBottomRight</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Clicks the bottom and right corner of the UI element</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#clickTopLeft()">clickTopLeft</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Clicks the top and left corner of the UI element</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#dragTo(com.android.uiautomator.core.UiObject, int)">dragTo</a></span>(<a href="#">UiObject</a> destObj, int steps)</nobr> |
| |
| <div class="jd-descrdiv">Drags this object to a destination UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#dragTo(int, int, int)">dragTo</a></span>(int destX, int destY, int steps)</nobr> |
| |
| <div class="jd-descrdiv">Drags this object to arbitrary coordinates.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#exists()">exists</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Check if view exists.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| Rect</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getBounds()">getBounds</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Returns the view's <code>bounds</code> property.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| <a href="#">UiObject</a></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getChild(com.android.uiautomator.core.UiSelector)">getChild</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr> |
| |
| <div class="jd-descrdiv">Creates a new UiObject for a child view that is under the present UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getChildCount()">getChildCount</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Counts the child views immediately under the present UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| String</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getClassName()">getClassName</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Retrieves the <code>className</code> property of the UI element.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| String</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getContentDescription()">getContentDescription</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Reads the <code>content_desc</code> property of the UI element</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| <a href="#">UiObject</a></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getFromParent(com.android.uiautomator.core.UiSelector)">getFromParent</a></span>(<a href="UiSelector.html">UiSelector</a> selector)</nobr> |
| |
| <div class="jd-descrdiv">Creates a new UiObject for a sibling view or a child of the sibling view, |
| relative to the present UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| String</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getPackageName()">getPackageName</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Reads the view's <code>package</code> property</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| <a href="UiSelector.html">UiSelector</a></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getSelector()">getSelector</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Debugging helper.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| String</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getText()">getText</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Reads the <code>text</code> property of the UI element</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| Rect</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#getVisibleBounds()">getVisibleBounds</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Returns the visible bounds of the view.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isCheckable()">isCheckable</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Checks if the UI element's <code>checkable</code> property is currently true.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isChecked()">isChecked</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Check if the UI element's <code>checked</code> property is currently true</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isClickable()">isClickable</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Checks if the UI element's <code>clickable</code> property is currently true.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isEnabled()">isEnabled</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Checks if the UI element's <code>enabled</code> property is currently true.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isFocusable()">isFocusable</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Check if the UI element's <code>focusable</code> property is currently true.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isFocused()">isFocused</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Check if the UI element's <code>focused</code> property is currently true</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isLongClickable()">isLongClickable</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Check if the view's <code>long-clickable</code> property is currently true</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isScrollable()">isScrollable</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Check if the view's <code>scrollable</code> property is currently true</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#isSelected()">isSelected</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Checks if the UI element's <code>selected</code> property is currently true.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#longClick()">longClick</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Long clicks the center of the visible bounds of the UI element</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#longClickBottomRight()">longClickBottomRight</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Long clicks bottom and right corner of the UI element</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#longClickTopLeft()">longClickTopLeft</a></span>()</nobr> |
| |
| <div class="jd-descrdiv">Long clicks on the top and left corner of the UI element</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)">performMultiPointerGesture</a></span>(PointerCoords... touches)</nobr> |
| |
| <div class="jd-descrdiv">Performs a multi-touch gesture.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <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> |
| |
| <div class="jd-descrdiv">Generates a two-pointer gesture with arbitrary starting and ending points.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#pinchIn(int, int)">pinchIn</a></span>(int percent, int steps)</nobr> |
| |
| <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally |
| toward the other, from the edges to the center of this UiObject .</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#pinchOut(int, int)">pinchOut</a></span>(int percent, int steps)</nobr> |
| |
| <div class="jd-descrdiv">Performs a two-pointer gesture, where each pointer moves diagonally |
| opposite across the other, from the center out towards the edges of the |
| this UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#setText(java.lang.String)">setText</a></span>(String text)</nobr> |
| |
| <div class="jd-descrdiv">Sets the text in an editable field, after clearing the field's content.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#swipeDown(int)">swipeDown</a></span>(int steps)</nobr> |
| |
| <div class="jd-descrdiv">Performs the swipe down action on the UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#swipeLeft(int)">swipeLeft</a></span>(int steps)</nobr> |
| |
| <div class="jd-descrdiv">Performs the swipe left action on the UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#swipeRight(int)">swipeRight</a></span>(int steps)</nobr> |
| |
| <div class="jd-descrdiv">Performs the swipe right action on the UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#swipeUp(int)">swipeUp</a></span>(int steps)</nobr> |
| |
| <div class="jd-descrdiv">Performs the swipe up action on the UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#waitForExists(long)">waitForExists</a></span>(long timeout)</nobr> |
| |
| <div class="jd-descrdiv">Waits a specified length of time for a view to become visible.</div> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#waitUntilGone(long)">waitUntilGone</a></span>(long timeout)</nobr> |
| |
| <div class="jd-descrdiv">Waits a specified length of time for a view to become undetectable.</div> |
| |
| </td></tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="promethods" class="jd-sumtable"><tr><th colspan="12">Protected Methods</th></tr> |
| |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| AccessibilityNodeInfo</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad"><a href="#findAccessibilityNodeInfo(long)">findAccessibilityNodeInfo</a></span>(long timeout)</nobr> |
| |
| <div class="jd-descrdiv">Finds a matching UI element in the accessibility hierarchy, by |
| using the selector for this UiObject.</div> |
| |
| </td></tr> |
| |
| |
| |
| </table> |
| |
| |
| |
| |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| <table id="inhmethods" class="jd-sumtable"><tr><th> |
| <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> |
| <div style="clear:left;">Inherited Methods</div></th></tr> |
| |
| |
| <tr class="api" > |
| <td colspan="12"> |
| <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" |
| ><img id="inherited-methods-java.lang.Object-trigger" |
| src="../../../../../assets/images/styles/disclosure_down.png" |
| class="jd-expando-trigger-img" /></a> |
| From class |
| |
| java.lang.Object |
| |
| <div id="inherited-methods-java.lang.Object"> |
| <div id="inherited-methods-java.lang.Object-list" |
| class="jd-inheritedlinks"> |
| </div> |
| <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> |
| <table class="jd-sumtable-expando"> |
| |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| Object</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">clone</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| boolean</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">equals</span>(Object arg0)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">finalize</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| Class<?></nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">getClass</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| int</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">hashCode</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">notify</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">notifyAll</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| |
| |
| |
| String</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">toString</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>()</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>(long arg0, int arg1)</nobr> |
| |
| </td></tr> |
| |
| |
| |
| <tr class="api" > |
| <td class="jd-typecol"><nobr> |
| |
| |
| final |
| |
| |
| void</nobr> |
| </td> |
| <td class="jd-linkcol" width="100%"><nobr> |
| <span class="sympad">wait</span>(long arg0)</nobr> |
| |
| </td></tr> |
| |
| |
| </table> |
| </div> |
| </div> |
| </td></tr> |
| |
| |
| </table> |
| |
| |
| </div><!-- jd-descr (summary) --> |
| |
| <!-- Details --> |
| |
| |
| |
| |
| |
| |
| |
| |
| <!-- XML Attributes --> |
| |
| |
| <!-- Enum Values --> |
| |
| |
| <!-- Constants --> |
| |
| |
| <!-- ========= ENUM CONSTANTS DETAIL ======== --> |
| <h2>Constants</h2> |
| |
| |
| |
| |
| <A NAME="FINGER_TOUCH_HALF_WIDTH"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| protected |
| static |
| final |
| int |
| </span> |
| FINGER_TOUCH_HALF_WIDTH |
| </h4> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| |
| <div class="jd-tagdata"> |
| <span class="jd-tagtitle">Constant Value: </span> |
| <span> |
| |
| 20 |
| (0x00000014) |
| |
| </span> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| <A NAME="SWIPE_MARGIN_LIMIT"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| protected |
| static |
| final |
| int |
| </span> |
| SWIPE_MARGIN_LIMIT |
| </h4> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| |
| <div class="jd-tagdata"> |
| <span class="jd-tagtitle">Constant Value: </span> |
| <span> |
| |
| 5 |
| (0x00000005) |
| |
| </span> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| <A NAME="WAIT_FOR_EVENT_TMEOUT"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| protected |
| static |
| final |
| long |
| </span> |
| WAIT_FOR_EVENT_TMEOUT |
| </h4> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| <p> |
| <p class="caution"><strong> |
| This constant is deprecated.</strong><br/> |
| use <code><a href="Configurator.html#setScrollAcknowledgmentTimeout(long)">setScrollAcknowledgmentTimeout(long)</a></code> |
| |
| </p> |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| |
| <div class="jd-tagdata"> |
| <span class="jd-tagtitle">Constant Value: </span> |
| <span> |
| |
| 3000 |
| (0x0000000000000bb8) |
| |
| </span> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| <A NAME="WAIT_FOR_SELECTOR_POLL"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| protected |
| static |
| final |
| long |
| </span> |
| WAIT_FOR_SELECTOR_POLL |
| </h4> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| |
| <div class="jd-tagdata"> |
| <span class="jd-tagtitle">Constant Value: </span> |
| <span> |
| |
| 1000 |
| (0x00000000000003e8) |
| |
| </span> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| <A NAME="WAIT_FOR_SELECTOR_TIMEOUT"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| protected |
| static |
| final |
| long |
| </span> |
| WAIT_FOR_SELECTOR_TIMEOUT |
| </h4> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| <p> |
| <p class="caution"><strong> |
| This constant is deprecated.</strong><br/> |
| use <code><a href="Configurator.html#setWaitForSelectorTimeout(long)">setWaitForSelectorTimeout(long)</a></code> |
| |
| </p> |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| |
| <div class="jd-tagdata"> |
| <span class="jd-tagtitle">Constant Value: </span> |
| <span> |
| |
| 10000 |
| (0x0000000000002710) |
| |
| </span> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| <A NAME="WAIT_FOR_WINDOW_TMEOUT"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| protected |
| static |
| final |
| long |
| </span> |
| WAIT_FOR_WINDOW_TMEOUT |
| </h4> |
| <div class="api-level"> |
| |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p></p></div> |
| |
| |
| <div class="jd-tagdata"> |
| <span class="jd-tagtitle">Constant Value: </span> |
| <span> |
| |
| 5500 |
| (0x000000000000157c) |
| |
| </span> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| <!-- Fields --> |
| |
| |
| <!-- Public ctors --> |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <h2>Public Constructors</h2> |
| |
| |
| |
| <A NAME="UiObject(com.android.uiautomator.core.UiSelector)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| |
| </span> |
| <span class="sympad">UiObject</span> |
| <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Constructs a UiObject to represent a view that matches the specified |
| selector criteria.</p></div> |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <!-- Protected ctors --> |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| <!-- Public methdos --> |
| |
| <h2>Public Methods</h2> |
| |
| |
| |
| <A NAME="clearTextField()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| void |
| </span> |
| <span class="sympad">clearTextField</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Clears the existing text contents in an editable field. |
| |
| The <code><a href="UiSelector.html">UiSelector</a></code> of this object must reference a UI element that is editable. |
| |
| When you call this method, the method first sets focus at the start edge of the field. |
| The method then simulates a long-press to select the existing text, and deletes the |
| selected text. |
| |
| If a "Select-All" option is displayed, the method will automatically attempt to use it |
| to ensure full text selection. |
| |
| Note that it is possible that not all the text in the field is selected; for example, |
| if the text contains separators such as spaces, slashes, at symbol etc. |
| Also, not all editable fields support the long-press functionality.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="click()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">click</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs a click at the center of the visible bounds of the UI element represented |
| by this UiObject.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true id successful else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="clickAndWaitForNewWindow(long)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">clickAndWaitForNewWindow</span> |
| <span class="normal">(long timeout)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs a click at the center of the visible bounds of the UI element represented |
| by this UiObject and waits for window transitions. |
| |
| This method differ from <code><a href="#click()">click()</a></code> only in that this method waits for a |
| a new window transition as a result of the click. Some examples of a window transition: |
| <li>launching a new activity</li> |
| <li>bringing up a pop-up menu</li> |
| <li>bringing up a dialog</li></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>timeout</td> |
| <td>timeout before giving up on waiting for a new window</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if the event was triggered, else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="clickAndWaitForNewWindow()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">clickAndWaitForNewWindow</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Waits for window transitions that would typically take longer than the |
| usual default timeouts. |
| See <code><a href="#clickAndWaitForNewWindow(long)">clickAndWaitForNewWindow(long)</a></code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if the event was triggered, else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="clickBottomRight()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">clickBottomRight</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Clicks the bottom and right corner of the UI element</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true on success</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="clickTopLeft()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">clickTopLeft</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Clicks the top and left corner of the UI element</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true on success</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="dragTo(com.android.uiautomator.core.UiObject, int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">dragTo</span> |
| <span class="normal">(<a href="#">UiObject</a> destObj, int steps)</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Drags this object to a destination UiObject. |
| The number of steps specified in your input parameter can influence the |
| drag speed, and varying speeds may impact the results. Consider |
| evaluating different speeds when using this method in your tests.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>destObj</td> |
| <td>the destination UiObject.</td> |
| </tr> |
| <tr> |
| <th>steps</td> |
| <td>usually 40 steps. You can increase or decrease the steps to change the speed.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 18</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="dragTo(int, int, int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">dragTo</span> |
| <span class="normal">(int destX, int destY, int steps)</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Drags this object to arbitrary coordinates. |
| The number of steps specified in your input parameter can influence the |
| drag speed, and varying speeds may impact the results. Consider |
| evaluating different speeds when using this method in your tests.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>destX</td> |
| <td>the X-axis coordinate.</td> |
| </tr> |
| <tr> |
| <th>destY</td> |
| <td>the Y-axis coordinate.</td> |
| </tr> |
| <tr> |
| <th>steps</td> |
| <td>usually 40 steps. You can increase or decrease the steps to change the speed.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 18</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="exists()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">exists</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Check if view exists. |
| |
| This methods performs a <code><a href="#waitForExists(long)">waitForExists(long)</a></code> with zero timeout. This |
| basically returns immediately whether the view represented by this UiObject |
| exists or not. If you need to wait longer for this view, then see |
| <code><a href="#waitForExists(long)">waitForExists(long)</a></code>.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if the view represented by this UiObject does exist</li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getBounds()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| Rect |
| </span> |
| <span class="sympad">getBounds</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <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> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>Rect</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getChild(com.android.uiautomator.core.UiSelector)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| <a href="#">UiObject</a> |
| </span> |
| <span class="sympad">getChild</span> |
| <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject for a child view that is under the present UiObject.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>selector</td> |
| <td>for child view to match</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>a new UiObject representing the child view</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getChildCount()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| int |
| </span> |
| <span class="sympad">getChildCount</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Counts the child views immediately under the present UiObject.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>the count of child views.</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getClassName()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| String |
| </span> |
| <span class="sympad">getClassName</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Retrieves the <code>className</code> property of the UI element.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>class name of the current node represented by this UiObject</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td>if no match was found</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 18</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="getContentDescription()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| String |
| </span> |
| <span class="sympad">getContentDescription</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Reads the <code>content_desc</code> property of the UI element</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>value of node attribute "content_desc"</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getFromParent(com.android.uiautomator.core.UiSelector)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| <a href="#">UiObject</a> |
| </span> |
| <span class="sympad">getFromParent</span> |
| <span class="normal">(<a href="UiSelector.html">UiSelector</a> selector)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Creates a new UiObject for a sibling view or a child of the sibling view, |
| relative to the present UiObject.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>selector</td> |
| <td>for a sibling view or children of the sibling view</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>a new UiObject representing the matched view</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getPackageName()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| String |
| </span> |
| <span class="sympad">getPackageName</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Reads the view's <code>package</code> property</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getSelector()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| final |
| |
| |
| <a href="UiSelector.html">UiSelector</a> |
| </span> |
| <span class="sympad">getSelector</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Debugging helper. A test can dump the properties of a selector as a string |
| to its logs if needed. <code>getSelector().toString();</code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code><a href="UiSelector.html">UiSelector</a></code></li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getText()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| String |
| </span> |
| <span class="sympad">getText</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Reads the <code>text</code> property of the UI element</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>text value of the current node represented by this UiObject</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td>if no match could be found</td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="getVisibleBounds()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| Rect |
| </span> |
| <span class="sympad">getVisibleBounds</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Returns the visible bounds of the view. |
| |
| If a portion of the view is visible, only the bounds of the visible portion are |
| reported.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>Rect</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">See Also</h5> |
| <ul class="nolist"><li><code><a href="#getBounds()">getBounds()</a></code></li> |
| </ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 17</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="isCheckable()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isCheckable</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>checkable</code> property is currently true.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isChecked()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isChecked</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>checked</code> property is currently true</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isClickable()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isClickable</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>clickable</code> property is currently true.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isEnabled()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isEnabled</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>enabled</code> property is currently true.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isFocusable()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isFocusable</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>focusable</code> property is currently true.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isFocused()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isFocused</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Check if the UI element's <code>focused</code> property is currently true</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isLongClickable()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isLongClickable</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Check if the view's <code>long-clickable</code> property is currently true</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isScrollable()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isScrollable</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Check if the view's <code>scrollable</code> property is currently true</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="isSelected()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">isSelected</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Checks if the UI element's <code>selected</code> property is currently true.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if it is else false</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="longClick()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">longClick</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Long clicks the center of the visible bounds of the UI element</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if operation was successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="longClickBottomRight()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">longClickBottomRight</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Long clicks bottom and right corner of the UI element</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if operation was successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="longClickTopLeft()"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">longClickTopLeft</span> |
| <span class="normal">()</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Long clicks on the top and left corner of the UI element</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if operation was successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="performMultiPointerGesture(android.view.MotionEvent.PointerCoords[]...)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">performMultiPointerGesture</span> |
| <span class="normal">(PointerCoords... touches)</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs a multi-touch gesture. You must specify touch coordinates for |
| at least 2 pointers. Each pointer must have all of its touch steps |
| defined in an array of <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code>. You can use this method to |
| specify complex gestures, like circles and irregular shapes, where each |
| pointer may take a different path. |
| |
| To create a single point on a pointer's touch path: |
| <code> |
| PointerCoords p = new PointerCoords(); |
| p.x = stepX; |
| p.y = stepY; |
| p.pressure = 1; |
| p.size = 1; |
| </code></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>touches</td> |
| <td>represents the pointers' paths. Each <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code> |
| array represents a different pointer. Each <code><a href="../../../../../reference/android/view/MotionEvent.PointerCoords.html">MotionEvent.PointerCoords</a></code> in an |
| array element represents a touch point on a pointer's path.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, |
| <code>false</code> otherwise</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 18</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">performTwoPointerGesture</span> |
| <span class="normal">(Point startPoint1, Point startPoint2, Point endPoint1, Point endPoint2, int steps)</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Generates a two-pointer gesture with arbitrary starting and ending points.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>startPoint1</td> |
| <td>start point of pointer 1</td> |
| </tr> |
| <tr> |
| <th>startPoint2</td> |
| <td>start point of pointer 2</td> |
| </tr> |
| <tr> |
| <th>endPoint1</td> |
| <td>end point of pointer 1</td> |
| </tr> |
| <tr> |
| <th>endPoint2</td> |
| <td>end point of pointer 2</td> |
| </tr> |
| <tr> |
| <th>steps</td> |
| <td>the number of steps for the gesture. Steps are injected |
| about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, |
| <code>false</code> otherwise</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 18</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="pinchIn(int, int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">pinchIn</span> |
| <span class="normal">(int percent, int steps)</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs a two-pointer gesture, where each pointer moves diagonally |
| toward the other, from the edges to the center of this UiObject .</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>percent</td> |
| <td>percentage of the object's diagonal length for the pinch gesture</td> |
| </tr> |
| <tr> |
| <th>steps</td> |
| <td>the number of steps for the gesture. Steps are injected |
| about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, |
| <code>false</code> otherwise</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 18</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="pinchOut(int, int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">pinchOut</span> |
| <span class="normal">(int percent, int steps)</span> |
| </h4> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs a two-pointer gesture, where each pointer moves diagonally |
| opposite across the other, from the center out towards the edges of the |
| this UiObject.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>percent</td> |
| <td>percentage of the object's diagonal length for the pinch gesture</td> |
| </tr> |
| <tr> |
| <th>steps</td> |
| <td>the number of steps for the gesture. Steps are injected |
| about 5 milliseconds apart, so 100 steps may take around 0.5 seconds to complete.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li><code>true</code> if all touch events for this gesture are injected successfully, |
| <code>false</code> otherwise</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Since</h5> |
| <ul class="nolist"><li>Android API Level 18</li></ul> |
| </div> |
| </div> |
| </div> |
| |
| |
| <A NAME="setText(java.lang.String)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">setText</span> |
| <span class="normal">(String text)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Sets the text in an editable field, after clearing the field's content. |
| |
| The <code><a href="UiSelector.html">UiSelector</a></code> selector of this object must reference a UI element that is editable. |
| |
| When you call this method, the method first simulates a <code><a href="#click()">click()</a></code> on |
| editable field to set focus. The method then clears the field's contents |
| and injects your specified text into the field. |
| |
| If you want to capture the original contents of the field, call <code><a href="#getText()">getText()</a></code> first. |
| You can then modify the text and use this method to update the field.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>text</td> |
| <td>string to set</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if operation is successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="swipeDown(int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">swipeDown</span> |
| <span class="normal">(int steps)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe down action on the UiObject. |
| The swipe gesture can be performed over any surface. The targeted |
| UI element does not need to be scrollable. |
| See also: |
| <ul> |
| <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> |
| </ul></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>steps</td> |
| <td>indicates the number of injected move steps into the system. Steps are |
| injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="swipeLeft(int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">swipeLeft</span> |
| <span class="normal">(int steps)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe left action on the UiObject. |
| The swipe gesture can be performed over any surface. The targeted |
| UI element does not need to be scrollable. |
| See also: |
| <ul> |
| <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> |
| </ul></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>steps</td> |
| <td>indicates the number of injected move steps into the system. Steps are |
| injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="swipeRight(int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">swipeRight</span> |
| <span class="normal">(int steps)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe right action on the UiObject. |
| The swipe gesture can be performed over any surface. The targeted |
| UI element does not need to be scrollable. |
| See also: |
| <ul> |
| <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> |
| </ul></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>steps</td> |
| <td>indicates the number of injected move steps into the system. Steps are |
| injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="swipeUp(int)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">swipeUp</span> |
| <span class="normal">(int steps)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Performs the swipe up action on the UiObject. |
| See also: |
| <ul> |
| <li><code><a href="UiScrollable.html#scrollToBeginning(int)">scrollToBeginning(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollToEnd(int)">scrollToEnd(int)</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollBackward()">scrollBackward()</a></code></li> |
| <li><code><a href="UiScrollable.html#scrollForward()">scrollForward()</a></code></li> |
| </ul></p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>steps</td> |
| <td>indicates the number of injected move steps into the system. Steps are |
| injected about 5ms apart. So a 100 steps may take about 1/2 second to complete.</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true of successful</li></ul> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Throws</h5> |
| <table class="jd-tagtable"> |
| |
| <tr> |
| <th><a href="UiObjectNotFoundException.html">UiObjectNotFoundException</a></td> |
| <td></td> |
| </tr> |
| </table> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="waitForExists(long)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">waitForExists</span> |
| <span class="normal">(long timeout)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a view to become visible. |
| |
| This method waits until the view becomes visible on the display, or |
| until the timeout has elapsed. You can use this method in situations where |
| the content that you want to select is not immediately displayed.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>timeout</td> |
| <td>the amount of time to wait (in milliseconds)</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if the view is displayed, else false if timeout elapsed while waiting</li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| <A NAME="waitUntilGone(long)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| public |
| |
| |
| |
| |
| boolean |
| </span> |
| <span class="sympad">waitUntilGone</span> |
| <span class="normal">(long timeout)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Waits a specified length of time for a view to become undetectable. |
| |
| This method waits until a view is no longer matchable, or until the |
| timeout has elapsed. |
| |
| A view becomes undetectable when the <code><a href="UiSelector.html">UiSelector</a></code> of the object is |
| unable to find a match because the element has either changed its state or is no |
| longer displayed. |
| |
| You can use this method when attempting to wait for some long operation |
| to compete, such as downloading a large file or connecting to a remote server.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>timeout</td> |
| <td>time to wait (in milliseconds)</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>true if the element is gone before timeout elapsed, else false if timeout elapsed |
| but a matching element is still found.</li></ul> |
| </div> |
| |
| </div> |
| </div> |
| |
| |
| |
| |
| |
| <!-- ========= METHOD DETAIL ======== --> |
| |
| <h2>Protected Methods</h2> |
| |
| |
| |
| <A NAME="findAccessibilityNodeInfo(long)"></A> |
| |
| <div class="jd-details api"> |
| <h4 class="jd-details-title"> |
| <span class="normal"> |
| protected |
| |
| |
| |
| |
| AccessibilityNodeInfo |
| </span> |
| <span class="sympad">findAccessibilityNodeInfo</span> |
| <span class="normal">(long timeout)</span> |
| </h4> |
| <div class="api-level"> |
| <div></div> |
| |
| |
| |
| </div> |
| <div class="jd-details-descr"> |
| |
| <div class="jd-tagdata jd-tagdescr"><p>Finds a matching UI element in the accessibility hierarchy, by |
| using the selector for this UiObject.</p></div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Parameters</h5> |
| <table class="jd-tagtable"> |
| <tr> |
| <th>timeout</td> |
| <td>in milliseconds</td> |
| </tr> |
| </table> |
| </div> |
| <div class="jd-tagdata"> |
| <h5 class="jd-tagtitle">Returns</h5> |
| <ul class="nolist"><li>AccessibilityNodeInfo if found else null</li></ul> |
| </div> |
| |
| </div> |
| |
| |
| |
| |
| |
| |