{% setvar book_path %}/reference/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}
public final class PressBackAction extends KeyEventActionBase
| java.lang.Object | ||
| ↳ | androidx.test.espresso.action.KeyEventActionBase | |
| ↳ | androidx.test.espresso.action.PressBackAction | |
Performs an Android press back action
Public constructors |
|
|---|---|
PressBackAction(boolean conditional)Performs a press back action |
|
PressBackAction(boolean conditional, EspressoKey espressoKey) |
|
Public methods |
|
|---|---|
void |
perform(UiController uiController, View view)Performs this action on the given view. |
Inherited methods |
|
|---|---|
Inherited Constants |
||||||
|---|---|---|---|---|---|---|
|
||||||
public PressBackAction(boolean conditional)
Performs a press back action
| Parameters | |
|---|---|
boolean conditional |
Indicated whether or not to throw an exception when Espresso navigates outside the application or process under test. |
public void perform(UiController uiController, View view)
Performs this action on the given view.
| Parameters | |
|---|---|
UiController uiController |
the controller to use to interact with the UI. |
View view |
the view to act upon. never null. |