public final class TypeTextAction extends java.lang.Object implements ViewAction
Constructor and Description |
---|
TypeTextAction(java.lang.String stringToBeTyped)
Constructs
TypeTextAction with given string. |
TypeTextAction(java.lang.String stringToBeTyped,
boolean tapToFocus)
Constructs
TypeTextAction with given string. |
Modifier and Type | Method and Description |
---|---|
|
getConstraints()
A mechanism for ViewActions to specify what type of views they can operate on.
|
java.lang.String |
getDescription()
Returns a description of the view action.
|
void |
perform(UiController uiController,
android.view.View view)
Performs this action on the given view.
|
public TypeTextAction(java.lang.String stringToBeTyped)
TypeTextAction
with given string. If the string is empty it results in no-op
(nothing is typed). By default this action sends a tap event to the center of the view to
attain focus before typing.stringToBeTyped
- String To be typed by TypeTextAction
public TypeTextAction(java.lang.String stringToBeTyped, boolean tapToFocus)
TypeTextAction
with given string. If the string is empty it results in no-op
(nothing is typed).stringToBeTyped
- String To be typed by TypeTextAction
tapToFocus
- indicates whether a tap should be sent to the underlying view before typing.publicgetConstraints()
ViewAction
getConstraints
in interface ViewAction
Matcher
that will be tested prior to calling perform.public void perform(UiController uiController, android.view.View view)
ViewAction
perform
in interface ViewAction
uiController
- the controller to use to interact with the UI.view
- the view to act upon. never null.public java.lang.String getDescription()
ViewAction
getDescription
in interface ViewAction