{% setvar book_path %}/reference/kotlin/androidx/_book.yaml{% endsetvar %} {% include "_shared/_reference-head-tags.html" %}

AppNotIdleException

class AppNotIdleException : RuntimeException, EspressoException

kotlin.Any
   ↳ kotlin.Throwable
     ↳ java.lang.Exception
       ↳ java.lang.RuntimeException
         ↳ androidx.test.espresso.AppNotIdleException

An exception which indicates that the App has not become idle even after the specified duration.

Summary

Public constructors

Public functions

java-static AppNotIdleException!
create(idleConditions: (Mutable)List<String!>!, loopCount: Int, seconds: Int)

This function is deprecated.

use create instead

java-static AppNotIdleException!
create(idleConditions: (Mutable)List<String!>!, message: String!)

Creates a new AppNotIdleException suitable for erroring out a test case.

Inherited functions

From class java.lang.Throwable

Public constructors

AppNotIdleException

AppNotIdleException()

Public functions

create

java-static fun create(idleConditions: (Mutable)List<String!>!, loopCount: Int, seconds: Int): AppNotIdleException!

Creates a new AppNotIdleException suitable for erroring out a test case.

This should be called only from the main thread if the app does not idle out within the specified duration.

Parameters
idleConditions: (Mutable)List<String!>!

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

java-static fun create(idleConditions: (Mutable)List<String!>!, message: String!): AppNotIdleException!

Creates a new AppNotIdleException suitable for erroring out a test case.

This should be called only from the main thread if the app does not idle out within the specified duration.

Parameters
idleConditions: (Mutable)List<String!>!

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.