AppNotIdleException

public final class AppNotIdleException
extends RuntimeException implements EspressoException

java.lang.Object
   ↳ java.lang.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ android.support.test.espresso.AppNotIdleException


指示应用程序即使在指定的持续时间之后仍未空闲的异常。

Summary

Public methods

static AppNotIdleException create(List<String> idleConditions, int loopCount, int seconds)

此方法已弃用。 改为使用create(List, String)

static AppNotIdleException create(List<String> idleConditions, String message)

创建一个适用于错误测试用例的新AppNotIdleException。

Inherited methods

From class java.lang.Throwable
From class java.lang.Object

Public methods

create

AppNotIdleException create (List<String> idleConditions, 
                int loopCount, 
                int seconds)

此方法已弃用。
改为使用create(List, String)

创建一个适用于错误测试用例的新AppNotIdleException。

如果应用程序在指定的时间内没有空闲,应该只从主线程调用它。

Parameters
idleConditions List: list of idleConditions that failed to become idle.
loopCount int: number of times it was tried to check if they became idle.
seconds int: number of seconds that was tried before giving up.
Returns
AppNotIdleException a AppNotIdleException suitable to be thrown on the instrumentation thread.

create

AppNotIdleException create (List<String> idleConditions, 
                String message)

创建一个适用于错误测试用例的新AppNotIdleException。

如果应用程序在指定的时间内没有空闲,应该只从主线程调用它。

Parameters
idleConditions List: list of idleConditions that failed to become idle.
message String: a message about the failure.
Returns
AppNotIdleException a AppNotIdleException suitable to be thrown on the instrumentation thread.