IdlingPolicies
public final class IdlingPolicies
extends Object
java.lang.Object |
↳ |
android.support.test.espresso.IdlingPolicies |
允许用户对闲置策略进行精细的粒度控制。 Espresso的默认闲置策略适用于大多数使用情况 - 但是某些执行环境(如ARM模拟器)可能非常慢。 此类允许用户将默认值调整为适合其环境的合理值。
Summary
Inherited methods |
From class java.lang.Object
Object |
clone() |
boolean |
equals(Object arg0) |
void |
finalize() |
final Class<?> |
getClass() |
int |
hashCode() |
final void |
notify() |
final void |
notifyAll() |
String |
toString() |
final void |
wait(long arg0, int arg1) |
final void |
wait(long arg0) |
final void |
wait() |
|
Public methods
getDynamicIdlingResourceErrorPolicy
IdlingPolicy getDynamicIdlingResourceErrorPolicy ()
getDynamicIdlingResourceWarningPolicy
IdlingPolicy getDynamicIdlingResourceWarningPolicy ()
setIdlingResourceTimeout
void setIdlingResourceTimeout (long timeout,
TimeUnit unit)
更新IdlingResourceRegistry使用的IdlingPolicy,以确定IdlingResources超时的时间。
Parameters |
timeout |
long : the timeout before an IdlingResourceTimeoutException is created. |
unit |
TimeUnit : the unit of the timeout value. |
setMasterPolicyTimeout
void setMasterPolicyTimeout (long timeout,
TimeUnit unit)
更新UiController.loopUntil中使用的IdlingPolicy以检测AppNotIdleException。
Parameters |
timeout |
long : the timeout before an AppNotIdleException is created. |
unit |
TimeUnit : the unit of the timeout value. |