UiAutomatorTestCase


public class UiAutomatorTestCase extends InstrumentationTestCase


UI Automator test case that is executed on the device.

Summary

Public constructors

Public methods

IAutomationSupport

This method is deprecated.

Use sendStatus instead

Bundle

Get command line parameters.

UiDevice

Get current instance of UiDevice.

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(String keysSequence)

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)
static void
assertFalse(String message, boolean condition)
static void
static void
assertNotSame(String message, Object expected, Object actual)
static void
static void
assertSame(String message, Object expected, Object actual)
static void
assertTrue(String message, boolean condition)
int
TestResult
static void
fail(String message)
static void
failNotEquals(String message, Object expected, Object actual)
static void
failNotSame(String message, Object expected, Object actual)
static void
failSame(String message)
static String
format(String message, Object expected, Object actual)
String
TestResult
run()
void
run(TestResult result)
void
void
void
String

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.