RootMatchers

class RootMatchers


A collection of matchers for Root objects.

Summary

Constants

const Matcher<Root!>!

Espresso's default Root matcher.

Public functions

java-static Matcher<Root!>!
java-static Matcher<Root!>!

Matches Roots that are dialogs (i.e. is not a window of the currently resumed activity).

java-static Matcher<Root!>!

Matches Roots that can take window focus.

java-static Matcher<Root!>!

Matches Roots that are popups - like autocomplete suggestions or the actionbar spinner.

java-static Matcher<Root!>!

Matches Roots that are system alert windows i.e. shown on top of all other applications and is not a window of the currently resumed activity

java-static Matcher<Root!>!

Matches Roots that can receive touch events.

java-static Matcher<Root!>!
withDecorView(decorViewMatcher: Matcher<View!>!)

Matches Roots with decor views that match the given view matcher.

Constants

DEFAULT

const val DEFAULTMatcher<Root!>!

Espresso's default Root matcher.

Public functions

hasWindowLayoutParams

java-static fun hasWindowLayoutParams(): Matcher<Root!>!

isDialog

java-static fun isDialog(): Matcher<Root!>!

Matches Roots that are dialogs (i.e. is not a window of the currently resumed activity).

isFocusable

java-static fun isFocusable(): Matcher<Root!>!

Matches Roots that can take window focus.

isPlatformPopup

java-static fun isPlatformPopup(): Matcher<Root!>!

Matches Roots that are popups - like autocomplete suggestions or the actionbar spinner.

isSystemAlertWindow

java-static fun isSystemAlertWindow(): Matcher<Root!>!

Matches Roots that are system alert windows i.e. shown on top of all other applications and is not a window of the currently resumed activity

Apps using this type of windows require the following permission: android.permission.SYSTEM_ALERT_WINDOW

isTouchable

java-static fun isTouchable(): Matcher<Root!>!

Matches Roots that can receive touch events.

withDecorView

java-static fun withDecorView(decorViewMatcher: Matcher<View!>!): Matcher<Root!>!

Matches Roots with decor views that match the given view matcher.