Skip to content

Most visited

Recently visited

navigation

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
From class junit.framework.TestCase
From class junit.framework.Assert
From class java.lang.Object
From interface junit.framework.Test

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.
This site uses cookies to store your preferences for site-specific language and display options.

Hooray!

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.