Summary: Ctors | Methods | Inherited Methods | [Expand All]

# UiAutomatorTestCase

`public class UiAutomatorTestCase`
`` `` `` `extends InstrumentationTestCase` ``

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

This class is deprecated.
It is no longer necessary to extend UiAutomatorTestCase. You can use `getInstance(Instrumentation)` from any test class as long as you have access to an `Instrumentation` instance.

UI Automator test case that is executed on the device.

## Summary

### Public constructors
`UiAutomatorTestCase()`

### Public methods
`IAutomationSupport` | `getAutomationSupport()` This method is deprecated. Use `sendStatus(int, Bundle)` instead
`Bundle` | `getParams()` Get command line parameters.
`UiDevice` | `getUiDevice()` Get current instance of `UiDevice`.
`void` | `sleep(long ms)` This method is deprecated. Use `sleep(long)` instead.

### Inherited methods
From class `android.test.InstrumentationTestCase`
`Instrumentation` | `getInstrumentation()`
`void` | `injectInsrumentation(Instrumentation arg0)`
`void` | `injectInstrumentation(Instrumentation arg0)`
`final <T extends Activity> T` | `launchActivity(String arg0, Class<T> arg1, Bundle arg2)`
`final <T extends Activity> T` | `launchActivityWithIntent(String arg0, Class<T> arg1, Intent arg2)`
`void` | `runTest()`
`void` | `runTestOnUiThread(Runnable arg0)`
`void` | `sendKeys(String arg0)`
`void` | `sendKeys(int... arg0)`
`void` | `sendRepeatedKeys(int... arg0)`
`void` | `tearDown()`
From class `junit.framework.TestCase`
`int` | `countTestCases()`
`TestResult` | `createResult()`
`String` | `getName()`
`TestResult` | `run()`
`void` | `run(TestResult arg0)`
`void` | `runBare()`
`void` | `runTest()`
`void` | `setName(String arg0)`
`void` | `setUp()`
`void` | `tearDown()`
`String` | `toString()`
From class `junit.framework.Assert`
`static void` | `assertEquals(boolean arg0, boolean arg1)`
`static void` | `assertEquals(String arg0, long arg1, long arg2)`
`static void` | `assertEquals(short arg0, short arg1)`
`static void` | `assertEquals(String arg0, String arg1, String arg2)`
`static void` | `assertEquals(String arg0, int arg1, int arg2)`
`static void` | `assertEquals(Object arg0, Object arg1)`
`static void` | `assertEquals(String arg0, boolean arg1, boolean arg2)`
`static void` | `assertEquals(String arg0, String arg1)`
`static void` | `assertEquals(String arg0, short arg1, short arg2)`
`static void` | `assertEquals(String arg0, Object arg1, Object arg2)`
`static void` | `assertEquals(char arg0, char arg1)`
`static void` | `assertEquals(byte arg0, byte arg1)`
`static void` | `assertEquals(double arg0, double arg1, double arg2)`
`static void` | `assertEquals(String arg0, char arg1, char arg2)`
`static void` | `assertEquals(float arg0, float arg1, float arg2)`
`static void` | `assertEquals(String arg0, double arg1, double arg2, double arg3)`
`static void` | `assertEquals(String arg0, byte arg1, byte arg2)`
`static void` | `assertEquals(String arg0, float arg1, float arg2, float arg3)`
`static void` | `assertEquals(long arg0, long arg1)`
`static void` | `assertEquals(int arg0, int arg1)`
`static void` | `assertFalse(String arg0, boolean arg1)`
`static void` | `assertFalse(boolean arg0)`
`static void` | `assertNotNull(Object arg0)`
`static void` | `assertNotNull(String arg0, Object arg1)`
`static void` | `assertNotSame(String arg0, Object arg1, Object arg2)`
`static void` | `assertNotSame(Object arg0, Object arg1)`
`static void` | `assertNull(String arg0, Object arg1)`
`static void` | `assertNull(Object arg0)`
`static void` | `assertSame(String arg0, Object arg1, Object arg2)`
`static void` | `assertSame(Object arg0, Object arg1)`
`static void` | `assertTrue(String arg0, boolean arg1)`
`static void` | `assertTrue(boolean arg0)`
`static void` | `fail(String arg0)`
`static void` | `fail()`
`static void` | `failNotEquals(String arg0, Object arg1, Object arg2)`
`static void` | `failNotSame(String arg0, Object arg1, Object arg2)`
`static void` | `failSame(String arg0)`
`static String` | `format(String arg0, Object arg1, Object arg2)`
From class `java.lang.Object`
`Object` | `clone()`
`boolean` | `equals(Object arg0)`
`void` | `finalize()`
`final Class<?>` | `getClass()`
`int` | `hashCode()`
`final void` | `notify()`
`final void` | `notifyAll()`
`String` | `toString()`
`final void` | `wait(long arg0, int arg1)`
`final void` | `wait(long arg0)`
`final void` | `wait()`
From interface `junit.framework.Test`
`abstract int` | `countTestCases()`
`abstract void` | `run(TestResult arg0)`

## Public constructors

### UiAutomatorTestCase

    UiAutomatorTestCase ()

## Public methods

### getAutomationSupport

    IAutomationSupport getAutomationSupport ()

This method is deprecated.
Use `sendStatus(int, Bundle)` instead

Provides support for running tests to report interim status

Returns
`IAutomationSupport` | IAutomationSupport

### getParams

    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.

Returns
`Bundle` |

### getUiDevice

    UiDevice getUiDevice ()

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

Returns
`UiDevice` |

### sleep

    void sleep (long ms)

This method is deprecated.
Use `sleep(long)` instead.

Calls `sleep(long)` to sleep

Parameters
`ms` | `long`: is in milliseconds.

- ## Interfaces

  - IAutomationSupport
  - UiWatcher

- ## Classes

  - By
  - BySelector
  - Configurator
  - EventCondition
  - SearchCondition
  - UiAutomatorInstrumentationTestRunner
  - UiAutomatorTestCase
  - UiCollection
  - UiDevice
  - UiObject
  - UiObject2
  - UiObject2Condition
  - UiScrollable
  - UiSelector
  - Until

- ## Enums

  - Direction

- ## Exceptions

  - StaleObjectException
  - UiObjectNotFoundException