public interface Searchable

Known direct subclasses
UiDevice

UiDevice provides access to state information about the device.

UiObject2

Represents a UI element, and exposes methods for performing gestures (clicks, swipes) or searching through its children.


The Searchable interface represents an object that can be searched for matching UI elements.

Summary

Public methods

abstract UiObject2

Returns the first object to match the selector criteria.

abstract @NonNull List<UiObject2>

Returns all objects that match the selector criteria.

abstract boolean

Returns whether there is a match for the given selector criteria.

Public methods

findObject

Added in 2.4.0-alpha02
abstract UiObject2 findObject(@NonNull BySelector selector)

Returns the first object to match the selector criteria.

findObjects

Added in 2.4.0-alpha02
abstract @NonNull List<UiObject2findObjects(@NonNull BySelector selector)

Returns all objects that match the selector criteria.

hasObject

Added in 2.4.0-alpha02
abstract boolean hasObject(@NonNull BySelector selector)

Returns whether there is a match for the given selector criteria.