Similar to UiController but with one additional method that enables interrupting Espresso
tasks.
Provides base-level UI operations (such as injection of MotionEvents) that can be used to
build user actions such as clicks, scrolls, swipes, etc. This replaces parts of the android
Instrumentation class that provides similar functionality. However, it provides a more advanced
synchronization mechanism for test actions. The key differentiators are:
test actions are assumed to be called on the main thread
after a test action is initiated, execution blocks until all messages in the main message
queue have been cleared.
if the event couldn't be injected because it would
interact with another application. @Deprecated Please use injectMotionEventSequence this
method will be removed in future.
Types a string into the application using series of KeyEvents. It is up to the
implementor to decide how to map the string to KeyEvent objects. If you need specific
control over the key events generated use injectKeyEvent(KeyEvent).
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.