public final class

DefaultFailureHandler

extends Object
implements FailureHandler
java.lang.Object
   ↳ androidx.test.espresso.base.DefaultFailureHandler

Class Overview

Espresso's default FailureHandler. If this does not fit your needs, feel free to provide your own implementation via Espresso.setFailureHandler(FailureHandler).

Summary

Public Constructors
DefaultFailureHandler(Context appContext)
Public Methods
void handle(Throwable error, Matcher<View> viewMatcher)
Handle the given error in a manner that makes sense to the environment in which the test is executed (e.g.
[Expand]
Inherited Methods
From class java.lang.Object
From interface androidx.test.espresso.FailureHandler

Public Constructors

public DefaultFailureHandler (Context appContext)

Parameters
appContext Context

Public Methods

public void handle (Throwable error, Matcher<View> viewMatcher)

Handle the given error in a manner that makes sense to the environment in which the test is executed (e.g. take a screenshot, output extra debug info, etc). Upon handling, most handlers will choose to propagate the error.

Parameters
error Throwable
viewMatcher Matcher