UiAutomatorTestCase


class UiAutomatorTestCase : InstrumentationTestCase


UI Automator test case that is executed on the device.

Summary

Public constructors

Public functions

IAutomationSupport!

This function is deprecated.

Use sendStatus instead

Bundle!

Get command line parameters.

UiDevice!

Get current instance of UiDevice.

Unit
sleep(ms: Long)

This function is deprecated.

Use sleep instead.

Inherited functions

From android.test.InstrumentationTestCase
Instrumentation!

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

T!
<T : Activity?> launchActivity(
    pkg: String!,
    activityCls: Class<T!>!,
    extras: Bundle!
)

This function is deprecated.

T!
<T : Activity?> launchActivityWithIntent(
    pkg: String!,
    activityCls: Class<T!>!,
    intent: Intent!
)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

Unit
sendKeys(keysSequence: String!)

This function is deprecated.

Unit

This function is deprecated.

Unit

This function is deprecated.

From junit.framework.TestCase
java-static Unit
assertEquals(message: String!, expected: Any!, actual: Any!)
java-static Unit
assertFalse(message: String!, condition: Boolean)
java-static Unit
assertNotNull(object: Any!)
java-static Unit
assertNotSame(message: String!, expected: Any!, actual: Any!)
java-static Unit
assertNull(object: Any!)
java-static Unit
assertSame(message: String!, expected: Any!, actual: Any!)
java-static Unit
assertTrue(message: String!, condition: Boolean)
Int
TestResult!
java-static Unit
fail(message: String!)
java-static Unit
failNotEquals(message: String!, expected: Any!, actual: Any!)
java-static Unit
failNotSame(message: String!, expected: Any!, actual: Any!)
java-static Unit
failSame(message: String!)
java-static String!
format(message: String!, expected: Any!, actual: Any!)
String!
TestResult!
run()
Unit
run(result: TestResult!)
Unit
Unit
setName(name: String!)
Unit
String!

Public constructors

UiAutomatorTestCase

UiAutomatorTestCase()

Public functions

getAutomationSupport

fun getAutomationSupport(): IAutomationSupport!

Provides support for running tests to report interim status

Returns
IAutomationSupport!

IAutomationSupport

getParams

fun getParams(): Bundle!

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

fun getUiDevice(): UiDevice!

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

sleep

fun sleep(ms: Long): Unit

Calls sleep to sleep

Parameters
ms: Long

is in milliseconds.