1 package com.android.uiautomator.core { 2 3 public final class Configurator { 4 method public long getActionAcknowledgmentTimeout(); 5 method public static com.android.uiautomator.core.Configurator getInstance(); 6 method public long getKeyInjectionDelay(); 7 method public long getScrollAcknowledgmentTimeout(); 8 method public long getWaitForIdleTimeout(); 9 method public long getWaitForSelectorTimeout(); 10 method public com.android.uiautomator.core.Configurator setActionAcknowledgmentTimeout(long); 11 method public com.android.uiautomator.core.Configurator setKeyInjectionDelay(long); 12 method public com.android.uiautomator.core.Configurator setScrollAcknowledgmentTimeout(long); 13 method public com.android.uiautomator.core.Configurator setWaitForIdleTimeout(long); 14 method public com.android.uiautomator.core.Configurator setWaitForSelectorTimeout(long); 15 } 16 17 public class UiCollection extends com.android.uiautomator.core.UiObject { 18 ctor public UiCollection(com.android.uiautomator.core.UiSelector); 19 method public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; 20 method public com.android.uiautomator.core.UiObject getChildByInstance(com.android.uiautomator.core.UiSelector, int) throws com.android.uiautomator.core.UiObjectNotFoundException; 21 method public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; 22 method public int getChildCount(com.android.uiautomator.core.UiSelector); 23 } 24 25 public class UiDevice { 26 method public void clearLastTraversedText(); 27 method public boolean click(int, int); 28 method public boolean drag(int, int, int, int, int); 29 method public void dumpWindowHierarchy(java.lang.String); 30 method public void freezeRotation() throws android.os.RemoteException; 31 method public deprecated java.lang.String getCurrentActivityName(); 32 method public java.lang.String getCurrentPackageName(); 33 method public int getDisplayHeight(); 34 method public int getDisplayRotation(); 35 method public android.graphics.Point getDisplaySizeDp(); 36 method public int getDisplayWidth(); 37 method public static com.android.uiautomator.core.UiDevice getInstance(); 38 method public java.lang.String getLastTraversedText(); 39 method public java.lang.String getProductName(); 40 method public boolean hasAnyWatcherTriggered(); 41 method public boolean hasWatcherTriggered(java.lang.String); 42 method public boolean isNaturalOrientation(); 43 method public boolean isScreenOn() throws android.os.RemoteException; 44 method public boolean openNotification(); 45 method public boolean openQuickSettings(); 46 method public boolean pressBack(); 47 method public boolean pressDPadCenter(); 48 method public boolean pressDPadDown(); 49 method public boolean pressDPadLeft(); 50 method public boolean pressDPadRight(); 51 method public boolean pressDPadUp(); 52 method public boolean pressDelete(); 53 method public boolean pressEnter(); 54 method public boolean pressHome(); 55 method public boolean pressKeyCode(int); 56 method public boolean pressKeyCode(int, int); 57 method public boolean pressMenu(); 58 method public boolean pressRecentApps() throws android.os.RemoteException; 59 method public boolean pressSearch(); 60 method public void registerWatcher(java.lang.String, com.android.uiautomator.core.UiWatcher); 61 method public void removeWatcher(java.lang.String); 62 method public void resetWatcherTriggers(); 63 method public void runWatchers(); 64 method public void setCompressedLayoutHeirarchy(boolean); 65 method public void setOrientationLeft() throws android.os.RemoteException; 66 method public void setOrientationNatural() throws android.os.RemoteException; 67 method public void setOrientationRight() throws android.os.RemoteException; 68 method public void sleep() throws android.os.RemoteException; 69 method public boolean swipe(int, int, int, int, int); 70 method public boolean swipe(android.graphics.Point[], int); 71 method public boolean takeScreenshot(java.io.File); 72 method public boolean takeScreenshot(java.io.File, float, int); 73 method public void unfreezeRotation() throws android.os.RemoteException; 74 method public void waitForIdle(); 75 method public void waitForIdle(long); 76 method public boolean waitForWindowUpdate(java.lang.String, long); 77 method public void wakeUp() throws android.os.RemoteException; 78 } 79 80 public class UiObject { 81 ctor public UiObject(com.android.uiautomator.core.UiSelector); 82 method public void clearTextField() throws com.android.uiautomator.core.UiObjectNotFoundException; 83 method public boolean click() throws com.android.uiautomator.core.UiObjectNotFoundException; 84 method public boolean clickAndWaitForNewWindow() throws com.android.uiautomator.core.UiObjectNotFoundException; 85 method public boolean clickAndWaitForNewWindow(long) throws com.android.uiautomator.core.UiObjectNotFoundException; 86 method public boolean clickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException; 87 method public boolean clickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException; 88 method public boolean dragTo(com.android.uiautomator.core.UiObject, int) throws com.android.uiautomator.core.UiObjectNotFoundException; 89 method public boolean dragTo(int, int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; 90 method public boolean exists(); 91 method protected android.view.accessibility.AccessibilityNodeInfo findAccessibilityNodeInfo(long); 92 method public android.graphics.Rect getBounds() throws com.android.uiautomator.core.UiObjectNotFoundException; 93 method public com.android.uiautomator.core.UiObject getChild(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; 94 method public int getChildCount() throws com.android.uiautomator.core.UiObjectNotFoundException; 95 method public java.lang.String getClassName() throws com.android.uiautomator.core.UiObjectNotFoundException; 96 method public java.lang.String getContentDescription() throws com.android.uiautomator.core.UiObjectNotFoundException; 97 method public com.android.uiautomator.core.UiObject getFromParent(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; 98 method public java.lang.String getPackageName() throws com.android.uiautomator.core.UiObjectNotFoundException; 99 method public final com.android.uiautomator.core.UiSelector getSelector(); 100 method public java.lang.String getText() throws com.android.uiautomator.core.UiObjectNotFoundException; 101 method public android.graphics.Rect getVisibleBounds() throws com.android.uiautomator.core.UiObjectNotFoundException; 102 method public boolean isCheckable() throws com.android.uiautomator.core.UiObjectNotFoundException; 103 method public boolean isChecked() throws com.android.uiautomator.core.UiObjectNotFoundException; 104 method public boolean isClickable() throws com.android.uiautomator.core.UiObjectNotFoundException; 105 method public boolean isEnabled() throws com.android.uiautomator.core.UiObjectNotFoundException; 106 method public boolean isFocusable() throws com.android.uiautomator.core.UiObjectNotFoundException; 107 method public boolean isFocused() throws com.android.uiautomator.core.UiObjectNotFoundException; 108 method public boolean isLongClickable() throws com.android.uiautomator.core.UiObjectNotFoundException; 109 method public boolean isScrollable() throws com.android.uiautomator.core.UiObjectNotFoundException; 110 method public boolean isSelected() throws com.android.uiautomator.core.UiObjectNotFoundException; 111 method public boolean longClick() throws com.android.uiautomator.core.UiObjectNotFoundException; 112 method public boolean longClickBottomRight() throws com.android.uiautomator.core.UiObjectNotFoundException; 113 method public boolean longClickTopLeft() throws com.android.uiautomator.core.UiObjectNotFoundException; 114 method public boolean performMultiPointerGesture(android.view.MotionEvent.PointerCoords...); 115 method public boolean performTwoPointerGesture(android.graphics.Point, android.graphics.Point, android.graphics.Point, android.graphics.Point, int); 116 method public boolean pinchIn(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; 117 method public boolean pinchOut(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; 118 method public boolean setText(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; 119 method public boolean swipeDown(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 120 method public boolean swipeLeft(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 121 method public boolean swipeRight(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 122 method public boolean swipeUp(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 123 method public boolean waitForExists(long); 124 method public boolean waitUntilGone(long); 125 field protected static final int FINGER_TOUCH_HALF_WIDTH = 20; // 0x14 126 field protected static final int SWIPE_MARGIN_LIMIT = 5; // 0x5 127 field protected static final deprecated long WAIT_FOR_EVENT_TMEOUT = 3000L; // 0xbb8L 128 field protected static final long WAIT_FOR_SELECTOR_POLL = 1000L; // 0x3e8L 129 field protected static final deprecated long WAIT_FOR_SELECTOR_TIMEOUT = 10000L; // 0x2710L 130 field protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL 131 } 132 133 public class UiObjectNotFoundException extends java.lang.Exception { 134 ctor public UiObjectNotFoundException(java.lang.String); 135 ctor public UiObjectNotFoundException(java.lang.String, java.lang.Throwable); 136 ctor public UiObjectNotFoundException(java.lang.Throwable); 137 } 138 139 public class UiScrollable extends com.android.uiautomator.core.UiCollection { 140 ctor public UiScrollable(com.android.uiautomator.core.UiSelector); 141 method protected boolean exists(com.android.uiautomator.core.UiSelector); 142 method public boolean flingBackward() throws com.android.uiautomator.core.UiObjectNotFoundException; 143 method public boolean flingForward() throws com.android.uiautomator.core.UiObjectNotFoundException; 144 method public boolean flingToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 145 method public boolean flingToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 146 method public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException; 147 method public com.android.uiautomator.core.UiObject getChildByText(com.android.uiautomator.core.UiSelector, java.lang.String, boolean) throws com.android.uiautomator.core.UiObjectNotFoundException; 148 method public int getMaxSearchSwipes(); 149 method public double getSwipeDeadZonePercentage(); 150 method public boolean scrollBackward() throws com.android.uiautomator.core.UiObjectNotFoundException; 151 method public boolean scrollBackward(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 152 method public boolean scrollDescriptionIntoView(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; 153 method public boolean scrollForward() throws com.android.uiautomator.core.UiObjectNotFoundException; 154 method public boolean scrollForward(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 155 method public boolean scrollIntoView(com.android.uiautomator.core.UiObject) throws com.android.uiautomator.core.UiObjectNotFoundException; 156 method public boolean scrollIntoView(com.android.uiautomator.core.UiSelector) throws com.android.uiautomator.core.UiObjectNotFoundException; 157 method public boolean scrollTextIntoView(java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException; 158 method public boolean scrollToBeginning(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; 159 method public boolean scrollToBeginning(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 160 method public boolean scrollToEnd(int, int) throws com.android.uiautomator.core.UiObjectNotFoundException; 161 method public boolean scrollToEnd(int) throws com.android.uiautomator.core.UiObjectNotFoundException; 162 method public com.android.uiautomator.core.UiScrollable setAsHorizontalList(); 163 method public com.android.uiautomator.core.UiScrollable setAsVerticalList(); 164 method public com.android.uiautomator.core.UiScrollable setMaxSearchSwipes(int); 165 method public com.android.uiautomator.core.UiScrollable setSwipeDeadZonePercentage(double); 166 } 167 168 public class UiSelector { 169 ctor public UiSelector(); 170 method public com.android.uiautomator.core.UiSelector checkable(boolean); 171 method public com.android.uiautomator.core.UiSelector checked(boolean); 172 method public com.android.uiautomator.core.UiSelector childSelector(com.android.uiautomator.core.UiSelector); 173 method public com.android.uiautomator.core.UiSelector className(java.lang.String); 174 method public com.android.uiautomator.core.UiSelector className(java.lang.Class<T>); 175 method public com.android.uiautomator.core.UiSelector classNameMatches(java.lang.String); 176 method public com.android.uiautomator.core.UiSelector clickable(boolean); 177 method protected com.android.uiautomator.core.UiSelector cloneSelector(); 178 method public com.android.uiautomator.core.UiSelector description(java.lang.String); 179 method public com.android.uiautomator.core.UiSelector descriptionContains(java.lang.String); 180 method public com.android.uiautomator.core.UiSelector descriptionMatches(java.lang.String); 181 method public com.android.uiautomator.core.UiSelector descriptionStartsWith(java.lang.String); 182 method public com.android.uiautomator.core.UiSelector enabled(boolean); 183 method public com.android.uiautomator.core.UiSelector focusable(boolean); 184 method public com.android.uiautomator.core.UiSelector focused(boolean); 185 method public com.android.uiautomator.core.UiSelector fromParent(com.android.uiautomator.core.UiSelector); 186 method public com.android.uiautomator.core.UiSelector index(int); 187 method public com.android.uiautomator.core.UiSelector instance(int); 188 method public com.android.uiautomator.core.UiSelector longClickable(boolean); 189 method public com.android.uiautomator.core.UiSelector packageName(java.lang.String); 190 method public com.android.uiautomator.core.UiSelector packageNameMatches(java.lang.String); 191 method public com.android.uiautomator.core.UiSelector resourceId(java.lang.String); 192 method public com.android.uiautomator.core.UiSelector resourceIdMatches(java.lang.String); 193 method public com.android.uiautomator.core.UiSelector scrollable(boolean); 194 method public com.android.uiautomator.core.UiSelector selected(boolean); 195 method public com.android.uiautomator.core.UiSelector text(java.lang.String); 196 method public com.android.uiautomator.core.UiSelector textContains(java.lang.String); 197 method public com.android.uiautomator.core.UiSelector textMatches(java.lang.String); 198 method public com.android.uiautomator.core.UiSelector textStartsWith(java.lang.String); 199 } 200 201 public abstract interface UiWatcher { 202 method public abstract boolean checkForCondition(); 203 } 204 205 } 206 207 package com.android.uiautomator.testrunner { 208 209 public abstract interface IAutomationSupport { 210 method public abstract void sendStatus(int, android.os.Bundle); 211 } 212 213 public class UiAutomatorTestCase extends junit.framework.TestCase { 214 ctor public UiAutomatorTestCase(); 215 method public com.android.uiautomator.testrunner.IAutomationSupport getAutomationSupport(); 216 method public android.os.Bundle getParams(); 217 method public com.android.uiautomator.core.UiDevice getUiDevice(); 218 method public void sleep(long); 219 } 220 221 } 222 223