Classes

The following classes are available globally.

  • Entrypoint to the EarlGrey framework. Use methods of this class to initiate interaction with any UI element on the screen.

    See more

    Declaration

    Objective-C

    @interface EarlGreyImpl : NSObject

    Swift

    class EarlGreyImpl : NSObject
  • A interface that exposes UI element actions.

    See more

    Declaration

    Objective-C

    @interface GREYActions : NSObject

    Swift

    class GREYActions : NSObject
  • A matcher for combining multiple matchers with a logical @c AND operator, so that a match only occurs when all combined matchers match the element. The invocation of the matchers is in the same order in which they are passed. As soon as one matcher fails, the rest of the matchers are not invoked.

    See more

    Declaration

    Objective-C

    @interface GREYAllOf : GREYBaseMatcher

    Swift

    class GREYAllOf
  • Matcher for combining multiple matchers with a logical @c OR operator, so that a match occurs when any of the matchers match the element. The invocation of the matchers is in the same order in which they are passed. As soon as one of the matchers succeeds, the rest are not invoked.

    See more

    Declaration

    Objective-C

    @interface GREYAnyOf : GREYBaseMatcher

    Swift

    class GREYAnyOf
  • An interface that exposes UI element assertions.

    Declaration

    Objective-C

    @interface GREYAssertions : NSObject

    Swift

    class GREYAssertions : NSObject
  • A base class for all actions that incorporates commonalities between initialization parameters and constraint checking.

    See more

    Declaration

    Objective-C

    @interface GREYBaseAction : NSObject <GREYAction>

    Swift

    class GREYBaseAction
  • A base class that implements the GREYMatcher protocol methods. Prefer subclassing this class over creating your own matchers. Every subclass must override and provide its own implementation for GREYBaseMatcher::matches: and GREYBaseMatcher::describeTo: methods.

    See more

    Declaration

    Objective-C

    @interface GREYBaseMatcher : NSObject <GREYMatcher, NSCopying>

    Swift

    class GREYBaseMatcher : NSObject
  • A class for creating boolean conditions that can be waited on until the condition is satisfied or a timeout elapses.

    Conditions are specified in the form of a block that returns a @c BOOL value indicating whether the condition is met.

    See more

    Declaration

    Objective-C

    @interface GREYCondition : NSObject

    Swift

    class GREYCondition : NSObject
  • Provides an interface for runtime configuration of EarlGrey’s behavior.

    See more

    Declaration

    Objective-C

    @interface GREYConfiguration : NSObject

    Swift

    class GREYConfiguration : NSObject
  • A class containing helper methods for conversion to-and-from constants.

    See more

    Declaration

    Objective-C

    @interface GREYConstants : NSObject

    Swift

    class GREYConstants
  • An block-based enumerator that repeatedly invokes the block to return the next object.

    See more

    Declaration

    Objective-C

    @interface GREYDataEnumerator : NSEnumerator

    Swift

    class GREYDataEnumerator : NSEnumerator
  • Finds UI elements in GREYProvider that are accepted by a matcher.

    See more

    Declaration

    Objective-C

    @interface GREYElementFinder : NSObject

    Swift

    class GREYElementFinder : NSObject
  • A utility to get the string representation of the UI hierarchy.

    See more

    Declaration

    Objective-C

    @interface GREYElementHierarchy : NSObject

    Swift

    class GREYElementHierarchy : NSObject
  • Interface for creating an interaction with a UI element. If no datasource is set, a default datasource is used. The default datasource provides access to the entire UI element hierarchy of all the windows in the application.

    See more

    Declaration

    Objective-C

    @interface GREYElementInteraction : NSObject <GREYInteraction>

    Swift

    class GREYElementInteraction
  • A block based implementation of GREYBaseMatcher. Enables custom implementation of protocol method using blocks.

    See more

    Declaration

    Objective-C

    @interface GREYElementMatcherBlock : GREYBaseMatcher

    Swift

    class GREYElementMatcherBlock
  • Exception raised by the framework which results in a test failure. To catch such exceptions, install a custom failure handler using EarlGrey::setFailureHandler:. A default failure handler is provided by the framework.

    See more

    Declaration

    Objective-C

    @interface GREYFrameworkException : NSException

    Swift

    class GREYFrameworkException : NSException
  • Modeled after NSLayoutConstraint, this class captures information related to a layout constraint: two attributes and a relation that must be satisfied between them.

    See more

    Declaration

    Objective-C

    @interface GREYLayoutConstraint : NSObject

    Swift

    class GREYLayoutConstraint
  • Idling resource that tracks core data managed object context operations.

    Tracks the managed object context’s internal operation queue and optionally any pending changes yet to be committed.

    See more

    Declaration

    Objective-C

    @interface GREYManagedObjectContextIdlingResource
        : NSObject <GREYIdlingResource>

    Swift

    class GREYManagedObjectContextIdlingResource
  • EarlGrey matchers for UI elements.

    See more

    Declaration

    Objective-C

    @interface GREYMatchers : NSObject

    Swift

    class GREYMatchers : NSObject
  • An idling resource to track NSTimer firing events so that the framework can synchronize with them.

    See more

    Declaration

    Objective-C

    @interface GREYNSTimerIdlingResource : NSObject <GREYIdlingResource>

    Swift

    class GREYNSTimerIdlingResource
  • A matcher to negate the result of another matcher.

    See more

    Declaration

    Objective-C

    @interface GREYNot : GREYBaseMatcher

    Swift

    class GREYNot
  • Provides interfaces for taking screenshots of the entire screen and UI elements of the App.

    See more

    Declaration

    Objective-C

    @interface GREYScreenshotUtil : NSObject

    Swift

    class GREYScreenshotUtil
  • Provides interface for test helper methods.

    See more

    Declaration

    Objective-C

    @interface GREYTestHelper : NSObject

    Swift

    class GREYTestHelper
  • Executor that syncs execution with the UI events on the main thread. Before executing a block or operation, it waits for any pending UI events to complete.

    See more

    Declaration

    Objective-C

    @interface GREYUIThreadExecutor : NSObject

    Swift

    class GREYUIThreadExecutor : NSObject