Methods Summary |
---|
public IAutomationSupport | getAutomationSupport()Provides support for running tests to report interim status
if (mAutomationSupport == null) {
mAutomationSupport = new InstrumentationAutomationSupport(getInstrumentation());
}
return mAutomationSupport;
|
public android.os.Bundle | getParams()Get command line parameters. On the command line when passing -e key value
pairs, the {@link Bundle} will have the key value pairs conveniently available to the
tests.
return mParams;
|
public com.android.uiautomator.core.UiDevice | getUiDevice()Get current instance of {@link UiDevice}. Works similar to calling the static
{@link UiDevice#getInstance()} from anywhere in the test classes.
return UiDevice.getInstance();
|
void | initialize(android.os.Bundle params)Initializes this test case.
mParams = params;
// check if this is a monkey test mode
String monkeyVal = mParams.getString("monkey");
if (monkeyVal != null) {
// only if the monkey key is specified, we alter the state of monkey
// else we should leave things as they are.
getInstrumentation().getUiAutomation().setRunAsMonkey(Boolean.valueOf(monkeyVal));
}
UiDevice.getInstance().initialize(new InstrumentationUiAutomatorBridge(
getInstrumentation().getContext(),
getInstrumentation().getUiAutomation()));
|
void | setAutomationSupport(IAutomationSupport automationSupport)
mAutomationSupport = automationSupport;
|
public void | sleep(long ms)Calls {@link SystemClock#sleep(long)} to sleep
SystemClock.sleep(ms);
|