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