Deprecate shell-based UI Automator.
Change-Id: I15aee7a6aba551b737d2c41b4fafd5b0ced9a4b7
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
package com.android.uiautomator.core {
|
||||
|
||||
public final class Configurator {
|
||||
public final deprecated class Configurator {
|
||||
method public long getActionAcknowledgmentTimeout();
|
||||
method public static com.android.uiautomator.core.Configurator getInstance();
|
||||
method public long getKeyInjectionDelay();
|
||||
@ -14,7 +14,7 @@ package com.android.uiautomator.core {
|
||||
method public com.android.uiautomator.core.Configurator setWaitForSelectorTimeout(long);
|
||||
}
|
||||
|
||||
public class UiCollection extends com.android.uiautomator.core.UiObject {
|
||||
public deprecated class UiCollection extends com.android.uiautomator.core.UiObject {
|
||||
ctor public UiCollection(com.android.uiautomator.core.UiSelector);
|
||||
method public com.android.uiautomator.core.UiObject getChildByDescription(com.android.uiautomator.core.UiSelector, java.lang.String) throws com.android.uiautomator.core.UiObjectNotFoundException;
|
||||
method public com.android.uiautomator.core.UiObject getChildByInstance(com.android.uiautomator.core.UiSelector, int) throws com.android.uiautomator.core.UiObjectNotFoundException;
|
||||
@ -22,7 +22,7 @@ package com.android.uiautomator.core {
|
||||
method public int getChildCount(com.android.uiautomator.core.UiSelector);
|
||||
}
|
||||
|
||||
public class UiDevice {
|
||||
public deprecated class UiDevice {
|
||||
method public void clearLastTraversedText();
|
||||
method public boolean click(int, int);
|
||||
method public boolean drag(int, int, int, int, int);
|
||||
@ -77,7 +77,7 @@ package com.android.uiautomator.core {
|
||||
method public void wakeUp() throws android.os.RemoteException;
|
||||
}
|
||||
|
||||
public class UiObject {
|
||||
public deprecated class UiObject {
|
||||
ctor public UiObject(com.android.uiautomator.core.UiSelector);
|
||||
method public void clearTextField() throws com.android.uiautomator.core.UiObjectNotFoundException;
|
||||
method public boolean click() throws com.android.uiautomator.core.UiObjectNotFoundException;
|
||||
@ -130,13 +130,13 @@ package com.android.uiautomator.core {
|
||||
field protected static final long WAIT_FOR_WINDOW_TMEOUT = 5500L; // 0x157cL
|
||||
}
|
||||
|
||||
public class UiObjectNotFoundException extends java.lang.Exception {
|
||||
public deprecated class UiObjectNotFoundException extends java.lang.Exception {
|
||||
ctor public UiObjectNotFoundException(java.lang.String);
|
||||
ctor public UiObjectNotFoundException(java.lang.String, java.lang.Throwable);
|
||||
ctor public UiObjectNotFoundException(java.lang.Throwable);
|
||||
}
|
||||
|
||||
public class UiScrollable extends com.android.uiautomator.core.UiCollection {
|
||||
public deprecated class UiScrollable extends com.android.uiautomator.core.UiCollection {
|
||||
ctor public UiScrollable(com.android.uiautomator.core.UiSelector);
|
||||
method protected boolean exists(com.android.uiautomator.core.UiSelector);
|
||||
method public boolean flingBackward() throws com.android.uiautomator.core.UiObjectNotFoundException;
|
||||
@ -165,7 +165,7 @@ package com.android.uiautomator.core {
|
||||
method public com.android.uiautomator.core.UiScrollable setSwipeDeadZonePercentage(double);
|
||||
}
|
||||
|
||||
public class UiSelector {
|
||||
public deprecated class UiSelector {
|
||||
ctor public UiSelector();
|
||||
method public com.android.uiautomator.core.UiSelector checkable(boolean);
|
||||
method public com.android.uiautomator.core.UiSelector checked(boolean);
|
||||
@ -198,7 +198,7 @@ package com.android.uiautomator.core {
|
||||
method public com.android.uiautomator.core.UiSelector textStartsWith(java.lang.String);
|
||||
}
|
||||
|
||||
public abstract interface UiWatcher {
|
||||
public abstract deprecated interface UiWatcher {
|
||||
method public abstract boolean checkForCondition();
|
||||
}
|
||||
|
||||
@ -206,11 +206,11 @@ package com.android.uiautomator.core {
|
||||
|
||||
package com.android.uiautomator.testrunner {
|
||||
|
||||
public abstract interface IAutomationSupport {
|
||||
public abstract deprecated interface IAutomationSupport {
|
||||
method public abstract void sendStatus(int, android.os.Bundle);
|
||||
}
|
||||
|
||||
public class UiAutomatorTestCase extends junit.framework.TestCase {
|
||||
public deprecated class UiAutomatorTestCase extends junit.framework.TestCase {
|
||||
ctor public UiAutomatorTestCase();
|
||||
method public com.android.uiautomator.testrunner.IAutomationSupport getAutomationSupport();
|
||||
method public android.os.Bundle getParams();
|
||||
|
@ -67,6 +67,11 @@ jars=
|
||||
|
||||
# special case pre-processing for 'runtest' command
|
||||
if [ "${cmd}" == "runtest" ]; then
|
||||
# Print deprecation warning
|
||||
echo "Warning: This version of UI Automator is deprecated. New tests should be written using"
|
||||
echo "UI Automator 2.0 which is available as part of the Android Testing Support Library."
|
||||
echo "See https://developer.android.com/training/testing/ui-testing/uiautomator-testing.html"
|
||||
echo "for more details."
|
||||
# first parse the jar paths
|
||||
while [ true ]; do
|
||||
if [ -z "${1}" ] && [ -z "${jars}" ]; then
|
||||
|
@ -22,7 +22,10 @@ import android.os.Bundle;
|
||||
* Provides auxiliary support for running test cases
|
||||
*
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IAutomationSupport {
|
||||
|
||||
/**
|
||||
|
@ -28,7 +28,10 @@ import junit.framework.TestListener;
|
||||
/**
|
||||
* Test runner for {@link UiAutomatorTestCase}s. Such tests are executed
|
||||
* on the device and have access to an applications context.
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiAutomatorInstrumentationTestRunner extends InstrumentationTestRunner {
|
||||
|
||||
@Override
|
||||
|
@ -26,7 +26,10 @@ import com.android.uiautomator.core.UiDevice;
|
||||
|
||||
/**
|
||||
* UI Automator test case that is executed on the device.
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiAutomatorTestCase extends InstrumentationTestCase {
|
||||
|
||||
private Bundle mParams;
|
||||
|
@ -67,7 +67,6 @@ include $(BUILD_STATIC_JAVA_LIBRARY)
|
||||
# Make sure to run droiddoc first to generate the stub source files.
|
||||
$(full_classes_compiled_jar) : $(uiautomator_stubs_stamp)
|
||||
$(built_dex_intermediate) : $(uiautomator_stubs_stamp)
|
||||
uiautomator_stubs_jar := $(full_classes_compiled_jar)
|
||||
|
||||
###############################################
|
||||
# API check
|
||||
@ -92,7 +91,7 @@ $(eval $(call check-api, \
|
||||
$(uiautomator_internal_removed_api_file), \
|
||||
$(checkapi_last_error_level_flags), \
|
||||
cat $(LOCAL_PATH)/apicheck_msg_last.txt, \
|
||||
$(uiautomator_stubs_jar), \
|
||||
uiautomator.core, \
|
||||
$(uiautomator_stubs_stamp)))
|
||||
|
||||
checkapi_current_error_level_flags := \
|
||||
@ -111,7 +110,7 @@ $(eval $(call check-api, \
|
||||
$(uiautomator_internal_removed_api_file), \
|
||||
$(checkapi_current_error_level_flags), \
|
||||
cat $(LOCAL_PATH)/apicheck_msg_current.txt, \
|
||||
$(uiautomator_stubs_jar), \
|
||||
uiautomator.core, \
|
||||
$(uiautomator_stubs_stamp)))
|
||||
|
||||
.PHONY: update-uiautomator-api
|
||||
@ -128,7 +127,6 @@ uiautomator.core_src_files :=
|
||||
uiautomator.core_java_libraries :=
|
||||
uiautomator_stubs_stamp :=
|
||||
uiautomator_internal_api_file :=
|
||||
uiautomator_stubs_jar :=
|
||||
uiautomator_api_dir :=
|
||||
checkapi_last_error_level_flags :=
|
||||
checkapi_current_error_level_flags :=
|
||||
|
@ -25,7 +25,10 @@ package com.android.uiautomator.core;
|
||||
* tests with the modified parameters, make sure to also restore
|
||||
* the original parameter values, otherwise this will impact other tests cases.
|
||||
* @since API Level 18
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public final class Configurator {
|
||||
private long mWaitForIdleTimeout = 10 * 1000;
|
||||
private long mWaitForSelector = 10 * 1000;
|
||||
|
@ -19,7 +19,10 @@ package com.android.uiautomator.core;
|
||||
* Used to enumerate a container's UI elements for the purpose of counting,
|
||||
* or targeting a sub elements by a child's text or description.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiCollection extends UiObject {
|
||||
|
||||
/**
|
||||
|
@ -42,7 +42,10 @@ import java.util.concurrent.TimeoutException;
|
||||
* You can also use this class to simulate user actions on the device,
|
||||
* such as pressing the d-pad or pressing the Home and Menu buttons.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiDevice {
|
||||
private static final String LOG_TAG = UiDevice.class.getSimpleName();
|
||||
|
||||
|
@ -31,7 +31,10 @@ import android.view.accessibility.AccessibilityNodeInfo;
|
||||
* its constructor. Once you create an instance of a UiObject, it can
|
||||
* be reused for different views that match the selector criteria.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiObject {
|
||||
private static final String LOG_TAG = UiObject.class.getSimpleName();
|
||||
/**
|
||||
|
@ -20,7 +20,10 @@ package com.android.uiautomator.core;
|
||||
* Generated in test runs when a {@link UiSelector} selector could not be matched
|
||||
* to any UI element displayed.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiObjectNotFoundException extends Exception {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -24,7 +24,10 @@ import android.view.accessibility.AccessibilityNodeInfo;
|
||||
* for items in scrollable layout elements. This class can be used with
|
||||
* horizontally or vertically scrollable controls.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiScrollable extends UiCollection {
|
||||
private static final String LOG_TAG = UiScrollable.class.getSimpleName();
|
||||
|
||||
|
@ -27,7 +27,10 @@ import java.util.regex.Pattern;
|
||||
* information. You can also target an element by its location in a layout
|
||||
* hierarchy.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiSelector {
|
||||
static final int SELECTOR_NIL = 0;
|
||||
static final int SELECTOR_TEXT = 1;
|
||||
|
@ -22,7 +22,10 @@ package com.android.uiautomator.core;
|
||||
* to locate its selector yet. Only during this time, the watchers are invoked to check if there is
|
||||
* something else unexpected on the screen.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface UiWatcher {
|
||||
|
||||
/**
|
||||
|
@ -22,7 +22,10 @@ import android.os.Bundle;
|
||||
* Provides auxiliary support for running test cases
|
||||
*
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public interface IAutomationSupport {
|
||||
|
||||
/**
|
||||
|
@ -36,7 +36,10 @@ import java.util.List;
|
||||
* {@link UiDevice} instance
|
||||
* {@link Bundle} for command line parameters.
|
||||
* @since API Level 16
|
||||
* @deprecated New tests should be written using UI Automator 2.0 which is available as part of the
|
||||
* Android Testing Support Library.
|
||||
*/
|
||||
@Deprecated
|
||||
public class UiAutomatorTestCase extends TestCase {
|
||||
|
||||
private static final String DISABLE_IME = "disable_ime";
|
||||
|
Reference in New Issue
Block a user