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