UiAutomatorTestCase


public class UiAutomatorTestCase extends InstrumentationTestCase

java.lang.Object
   ↳ junit.framework.Assert
     ↳ junit.framework.TestCase
       ↳ android.test.InstrumentationTestCase
         ↳ androidx.test.uiautomator.UiAutomatorTestCase

UI Automator test case that is executed on the device.

Summary

Public constructors

This method is deprecated. Deprecated in Java

Public methods

IAutomationSupport

This method is deprecated.

Use sendStatus instead

Bundle

This method is deprecated. Deprecated in Java

UiDevice

This method is deprecated. Deprecated in Java

void
sleep(long ms)

This method is deprecated.

Use sleep instead.

Inherited methods

From android.test.InstrumentationTestCase
Instrumentation

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

final T
<T extends Activity> launchActivity(
    String pkg,
    Class<T> activityCls,
    Bundle extras
)

This method is deprecated.

final T
<T extends Activity> launchActivityWithIntent(
    String pkg,
    Class<T> activityCls,
    Intent intent
)

This method is deprecated.

void

This method is deprecated.

void

This method is deprecated.

void
sendKeys(int[] keys)

This method is deprecated.

void
sendRepeatedKeys(int[] keys)

This method is deprecated.

void

This method is deprecated.

From junit.framework.TestCase
static void
assertEquals(String message, Object expected, Object actual)

This method is deprecated. Deprecated in Java

static void
assertFalse(String message, boolean condition)

This method is deprecated. Deprecated in Java

static void
assertNotNull(Object object)

This method is deprecated. Deprecated in Java

static void
assertNotSame(String message, Object expected, Object actual)

This method is deprecated. Deprecated in Java

static void
assertNull(Object object)

This method is deprecated. Deprecated in Java

static void
assertSame(String message, Object expected, Object actual)

This method is deprecated. Deprecated in Java

static void
assertTrue(String message, boolean condition)

This method is deprecated. Deprecated in Java

int
countTestCases()

This method is deprecated. Deprecated in Java

junit.framework.TestResult
createResult()

This method is deprecated. Deprecated in Java

static void
fail(String message)

This method is deprecated. Deprecated in Java

static void
failNotEquals(String message, Object expected, Object actual)

This method is deprecated. Deprecated in Java

static void
failNotSame(String message, Object expected, Object actual)

This method is deprecated. Deprecated in Java

static void
failSame(String message)

This method is deprecated. Deprecated in Java

static String
format(String message, Object expected, Object actual)

This method is deprecated. Deprecated in Java

String
getName()

This method is deprecated. Deprecated in Java

junit.framework.TestResult
run()

This method is deprecated. Deprecated in Java

void
run(junit.framework.TestResult result)

This method is deprecated. Deprecated in Java

void
runBare()

This method is deprecated. Deprecated in Java

void
setName(String name)

This method is deprecated. Deprecated in Java

void
setUp()

This method is deprecated. Deprecated in Java

String
toString()

This method is deprecated. Deprecated in Java

Public constructors

UiAutomatorTestCase

Added in 2.2.0
Deprecated in 2.2.0
public UiAutomatorTestCase()

Public methods

getAutomationSupport

Added in 2.2.0
Deprecated in 2.2.0
public IAutomationSupport getAutomationSupport()

Provides support for running tests to report interim status

Returns
IAutomationSupport

IAutomationSupport

getParams

Added in 2.2.0
Deprecated in 2.2.0
public Bundle getParams()

Get command line parameters. On the command line when passing -e key value pairs, the Bundle will have the key value pairs conveniently available to the tests.

getUiDevice

Added in 2.2.0
Deprecated in 2.2.0
public UiDevice getUiDevice()

Get current instance of UiDevice. Works similar to calling the static getInstance from anywhere in the test classes.

sleep

Added in 2.2.0
Deprecated in 2.2.0
public void sleep(long ms)

Calls sleep to sleep

Parameters
long ms

is in milliseconds.