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