Title: Theory / Important / CS / Programming / Objective-C / test / Earl Grey
Tags: automatedNewLineAfterCommaSpace

Question: The main groups of earl grey APIs
Answer: Interaction
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md
Context: Objective-C
Answer2: Synchronization
Answer3: Other

Name: An interaction
Definition: Selecting an element to interact with
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md
Chapter: Interaction
Context: Objective-C
Definition2: Performing an action
Definition3: Making an assertion to verity state and behavior

Instruction: [EarlGrey
  selectElementWithMatcher:matcher
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: select the first element matched by matcher
Language: Objective-C

Variable: GREY_DISABLE_SHORTHAND
Meaning: whether grey shortand should be disabled
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C

Instruction: grey_foo(args)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: same as
[EarlyGrey foo:args]
Language: Objective-C
Assuming: GREY_DISABLE_SHORTHAND is not defined

Question: What is the recommanded way to access an element
Answer: with grey_accessibilityID(). This suppose to give an accessibility identifier to all elements
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Context: Earl grey

Instruction: grey_allOf(matchers)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: A matchers matching elements that satisfy each of the matcher of matchers
Intuition: Use most selective matcher first. Ends with nil

Instruction: grey_anyOf(matchers)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: A matchers matching elements that satisfy any of the matcher of matchers

Instruction: grey_not(matcher)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: A matchers matching elements that do not satisfy matchers

Typ: GREYMatcher
Meaning: A matcher for earl grey
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C

Typ: MatchesBlock
Meaning: A method that take a viewand state whether it matches
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Implementation: ^BOOL(UIView *view)

Typ: DescribeToBlock
Meaning: A method that takes a description and edit it
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Implementation: ^void(id<GREYDescription> description)

Instruction: [?
  usingSearchAction:action
  onElementWithMatcher:element
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: do action on element until the wanted element is found
Language: Objective-C

Instruction: [?
  performAction:action]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: do action on the selected element
Language: Objective-C

Instruction: [?
  performAction:action
  error:&error
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: do action on the selected element if possible. Otherwise put the error in error
Language: Objective-C
Variables: NSError error

Instruction: [GREYActionBlock
  actionWithName:name
  constraints:nil
  performBlock:block
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: An action named name that, if constraint holds, execute block

Instruction: [?
  assertWithMatcher:matcher
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: assertion that current selected element satisfies matcher
Language: Objective-C

Instruction: [?
  assertWithMatcher:matcher
  error:&error
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: assertion that current selected element satisfies matcher. Put the error in error if assertion fail
Language: Objective-C

Instruction: [GREYAssertionBlock
  assertionWithName:name
  assertionBlock:block
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: an assertion named name that check whether block holds on the selected view

Instruction: [EarlyGrey
  setFailureHandler:block
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: when an exception occur, execute block
Language: Objective-C

Instruction: GREYAssertTrue(
  expr,
  reason,
  ...
)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Fails if the expression evaluates to false
Language: Objective-C
Abbreviation: GREYAssert(
  expr,
  reason,
  ...
)

Instruction: GREYAssertFalse(
  expr,
  reason,
  ...
)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Fails if the expression evaluates to true
Language: Objective-C

Instruction: GREYAssert(Not)Nil(
  expr,
  reason,
  ...
)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Fails if the expression evaluates to not nil (nil)
Language: Objective-C

Instruction: GREYAssert(Not)Equal(
  left,
  right,
  reason,
  ...
)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Fails if the expression left and right are equal (not equal)
Language: Objective-C
Assuming: left and right are scalar

Instruction: GREYAssert(Not)EqualObject(
  left,
  right,
  reason,
  ...
)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Fails if the expression left and right are equal (not equal)
Language: Objective-C
Assuming: left and right are objects

Instruction: GREYFail(
  reason,
  ...
)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Fails
Language: Objective-C

Instruction: GREYFailWithdetails(
  reason,
  details,
  ...
)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Fails with reason and details
Language: Objective-C

Typ: GREYCondition
Meaning: Some assertion that can be used by earl grey
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C

Instruction: [GREYCondition
  conditionWithName:name
  block:block
]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: A GREYCondition named name checking whether block holds
Typ: GREYCondition

Instruction: [[GREYConfiguration sharedInstance]
  setValue:value
  forConfigKey:key
];
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: change the configuration key key's value to value
Language: Objective-C
Typ: GREYCondition

Instruction: [GREYConfiguration sharedInstance]
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: the shared instance's grey configuration
Typ: GREYCondition

Instruction: kGREYConfigKeySynchronizationEnable
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Returns: if this setting is set to true, wait until all download and actions are done before doing next action
Typ: GREYCondition

Variable: the maximum interval of non-repeating NSTimers that EarlGrey should synchronize with.
Meaning: kGREYConfigKeyNSTimerMaxTrackableInterval
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Typ: GREYCondition

Variable: The maximum delay for future executions using dispatch_after calls that EarlGrey must synchronize with.
Meaning: kGREYConfigKeyDispatchAfterMaxTrackableDelay
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Typ: GREYCondition

Variable: a list of URLs for which EarlGrey should not wait.
Meaning: kGREYConfigKeyURLBlacklistRegex
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Typ: GREYCondition

Variable: Maximal time to wait for synchronization for each interaction
Meaning: kGREYConfigKeyInteractionTimeoutDuration
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Typ: GREYCondition

Variable: Maximal duration of continuous interaction
Meaning: kGREYConfigKeyCALayerMaxAnimationDuration
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Language: Objective-C
Typ: GREYCondition

Instruction: grey_execute_(a)sync(foo)
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Allow to call foo (a)synchronously from a non-main thread without causing a livelock
Language: Objective-C
Typ: GREYCondition

Instruction: [EarlGrey
  rotateDeviceToOrientation:UIDeviceOrientationFOO
  errorOrNil:&error];
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Change the device orientation to foo or put the error in error if its not nil
Language: Objective-C
Typ: GREYCondition

Instruction: [EarlGrey
  shakeDeviceWithError:&error];
Page: https://github.com/google/EarlGrey/blob/master/docs/api.md#selection-api
Effect: Shake the device or put the error in error if its not nil
Language: Objective-C
Typ: GREYCondition

Name: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYConstants.h
Context: Earl Grey

Name: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYSwizzler.h
Context: Earl Grey

Typ: GREYStopwatch
Meaning: mimics a stopwatch for calculating code latency.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYStopwatch.h
Language: Objective-C
Context: Earl Grey

Instruction: [stopwatch
  start
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYStopwatch.h
Effect: (re)start the stopwatch
Language: Objective-C
Context: Earl Grey
Variables: GREYStopwatch stopwatch

Instruction: [stopwatch
  stop
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYStopwatch.h
Effect: stop the stopwatch
Language: Objective-C
Context: Earl Grey
Variables: GREYStopwatch stopwatch
Exception: if start was never called

Instruction: [stopwatch
  elapsedTime
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYStopwatch.h
Language: Objective-C
Context: Earl Grey
Returns: Time between last stop and last start
Variables: GREYStopwatch stopwatch
Exception: if it was never started and stopped

Instruction: [stopwatch
  lapAndReturnTime
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYStopwatch.h
Language: Objective-C
Context: Earl Grey
Returns: Time since last lap or start
Variables: GREYStopwatch stopwatch
Exception: if it was never started and stopped

Typ: GREYObjcRuntime
Meaning: A utility class used for common runtime related operations.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYStopwatch.h
Language: Objective-C
Context: Earl Grey

Instruction: [GREYObjcRuntime
  addInstanceMethodToClass:destination
  withSelector:selector
  fromClass:source
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYStopwatch.h
Effect: Adds the given method from the given class into the destination class.
Language: Objective-C
Context: Earl Grey

Instruction: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYLogger.h
Language: Objective-C
Context: Earl Grey

Instruction: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/GREYDiagnosable.h
Language: Objective-C
Context: Earl Grey

Typ: GREYProvider
Meaning: A protocol for providing arbitrary data as an enumeration.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Provider/GREYProvider.h
Language: Objective-C
Context: Earl Grey

Instruction: [provider
  dataEnumerator
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Provider/GREYProvider.h
Language: Objective-C
Context: Earl Grey
Returns: A new enumerator that can be used to enumerate data backed by this provider.
Variables: GREYProvider provider

Typ: GREYDispatchQueueInterposer
Meaning: A class to track dispatch_queues without using fishhook. Must be inside a dylib which is inserted into an application binary for tracking purposes.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Provider/GREYProvider.h
Language: Objective-C
Context: Earl Grey

Instruction: [dispatchQueueInterposer
  interposeDispathQueue:queue]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Provider/GREYProvider.h
Effect: Pass in a queue to the interposer so it can be interposed. This form of interposing will only work if it is part of a dylib.
Language: Objective-C
Context: Earl Grey
Returns: An instance of GREYDispatchQueueInterposer which can be used by looking at isIdleNow to check if it tracks any queues.
Variables: GREYDispatchQueueInterposer dispatchQueueInterposer

Instruction: [dispatchQueueInterposer
  isIdleNow
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Provider/GREYProvider.h
Language: Objective-C
Context: Earl Grey
Returns: Whether queue is idle
Variables: GREYDispatchQueueInterposer dispatchQueueInterposer

Instruction: [dispatchQueueInterposer
  isTrackingALiveQueue
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Provider/GREYProvider.h
Language: Objective-C
Context: Earl Grey
Returns: Whether it is tracking a live queue
Variables: GREYDispatchQueueInterposer dispatchQueueInterposer

Typ: GREYFailureHandler
Meaning: Protocol for handling failures (such as failure of actions and assertions) raised by EarlGrey.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Exceptions/GREYFailureHandler.h
Language: Objective-C
Context: Earl Grey

Instruction: [failureHandler
   handleException:exception
  details:details
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Exceptions/GREYFailureHandler.h
Effect: Called by the framework to raise an exception.
Language: Objective-C
Context: Earl Grey
Variables: GREYFailureHandler failureHandler

Instruction: [failureHandler
  setInvocationFile:fileName
  andInvocationLine:lineNumber
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Exceptions/GREYFailureHandler.h
Effect: Sets the file name and line number of operation that caused the failure.
Language: Objective-C
Context: Earl Grey
Variables: GREYFailureHandler failureHandler

Instruction: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Exceptions/GREYFrameworkException.h
Language: Objective-C
Context: Earl Grey
Variables: GREYFailureHandler failureHandler

Typ: GREYTouchPathObject
Meaning: A struct to encapsulate essential information about a touch path.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchPathObject.h
Language: Objective-C
Context: Earl Grey

Variable: touchPathObject.startPoint
Meaning: the start point of a touch gesture.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchPathObject.h
Context: Earl Grey
Language: Objective-C
Variables: GREYTouchPathObject touchPathObject

Variable: touchPathObject.endPoint
Meaning: the end point of a touch gesture.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchPathObject.h
Context: Earl Grey
Language: Objective-C
Variables: GREYTouchPathObject touchPathObject

Variable: touchPathObject.duration
Meaning: The duration of an action
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchPathObject.h
Context: Earl Grey
Language: Objective-C
Variables: GREYTouchPathObject touchPathObject

Variable: touchPathObject.cancelInertia
Meaning: check to nullify the inertia in the touch path.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchPathObject.h
Context: Earl Grey
Language: Objective-C
Variables: GREYTouchPathObject touchPathObject

Typ: GREYTouchInfo
Meaning: An object to encapsulate essential information about a touch.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchInfo.h
Language: Objective-C
Context: Earl Grey

Variable: touchInfo.points
Meaning: Array (one element per finger) where touch will be delivered
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchInfo.h
Context: Earl Grey
Language: Objective-C
Variables: GREYTouchInfo touchInfo

Variable: touchInfo.phase
Meaning: The phases (began, moved etc) of the UITouch object.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchInfo.h
Context: Earl Grey
Language: Objective-C
Typ: UITouchPhase
Variables: GREYTouchInfo touchInfo

Variable: touchInfo.deliveryTimeDeltaSinceLastTouch
Meaning: Delays touch delivery by this amount since the last touch delivery.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchInfo.h
Context: Earl Grey
Language: Objective-C
Variables: GREYTouchInfo touchInfo

Instruction: [touchInfo
  initWithpoints:points
  phase:phase
  deliveryTimeDeltaSinceLastTouch:timeDeltaSinceLastTouchSeconds
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Event/GREYTouchInfo.h
Effect: Initializes this object to represent a touch at the given points.
Language: Objective-C
Context: Earl Grey
Returns: An instance of GREYTouchInfo, initialized with all required data.
Variables: GREYTouchInfo touchInfo

Instruction: todo
Page: https://github.com/google/EarlGrey/tree/earlgrey2/CommonLib/Error
Language: Objective-C
Context: Earl Grey

Typ: GREYAppState
Meaning: Non-idle states that the App can be at any given point in time.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYAppState.h
Language: Objective-C
Context: Earl Grey
Implementation: Binary flag

Variable: Idle state implies App is not undergoing any state changes and it is OK to interact with it.
Meaning: kGREYIdle
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYAppState.h
Context: Earl Grey
Language: Objective-C

Variable: View is pending draw or layout pass.
Meaning: kGREYPendingDrawLayoutPass
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYAppState.h
Context: Earl Grey
Language: Objective-C

Variable: kGREYPendingViewsToAppear
Meaning: Waiting for viewDidAppear: method invocation.
Language: Objective-C

Variable: kGREYPendingViewsToDisappear
Meaning: Waiting for viewDidDisappear: method invocation.
Language: Objective-C

Variable: kGREYPendingKeyboardTransition
Meaning: Pending keyboard transition.
Language: Objective-C

Variable: kGREYPendingCAAnimation
Meaning: Waiting for CA animation to complete.
Context: Earl grey test
Language: Objective-C

Variable: kGREYPendingUIAnimation
Meaning: Waiting for a UIAnimation to be marked as stopped.
Language: Objective-C

Variable: kGREYPendingRootViewControllerToAppear
Meaning: Pending root view controller to be set.
Language: Objective-C

Variable: kGREYPendingNetworkRequest
Meaning: Pending a network request completion.
Language: Objective-C

Variable: kGREYPendingGestureRecognition
Meaning: Pending gesture recognition.
Language: Objective-C

Variable: kGREYPendingUIScrollViewScrolling
Meaning: Waiting for UIScrollView to finish scrolling.
Language: Objective-C

Variable: kGREYIgnoringSystemWideUserInteraction
Meaning: [UIApplication beginIgnoringInteractionEvents] was called and all interaction events are
Language: Objective-C

Instruction: GREYKeyForAppState(GREYAppState state);
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYAppState.h
Language: Objective-C
Returns: A string value for the app state's based on its key name.

Variable: kGREYConfigKeyActionConstraintsEnabled
Meaning: Configuration that enables or disables constraint checks before performing an action.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeyInteractionTimeoutDuration
Meaning: Configuration that enables or disables EarlGrey's synchronization feature. When disabled, any command that used to wait for the app to idle before proceeding will no longer do so.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeySynchronizationEnabled
Meaning: Configuration that enables or disables EarlGrey's synchronization feature.
When disabled, any command that used to wait for the app to idle before proceeding will no longer do so.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeyIgnoreAppStates
Meaning: Configuration that enables synchronization for different app state. By default, EarlGrey will wait for all tracked app state resources to be idle. Set this config value to options with GREYAppState will skip resources with those options.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeyNSTimerMaxTrackableInterval
Meaning: Configuration for setting the max interval (in seconds) of non-repeating NSTimers that EarlGrey will automatically track.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeyDelayedPerformMaxTrackableDuration
Meaning: Configuration for setting the max duration (in seconds) for delayed executions on the main thread originating from any performSelector:afterDelay invocations that EarlGrey will automatically track.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeyCALayerModifyAnimations
Meaning: Whether or not CALayer animations are modified
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeyCALayerModifyAnimations
Meaning: Configuration that holds regular expressions for URLs that are blocked from synchronization. EarlGrey will not wait for any network request with URLs matching the blocked regular expressions to complete. Most frequently blocked URLs include those used for sending analytics, pingbacks, and background network tasks that don't interfere with testing.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: kGREYConfigKeyArtifactsDirLocation
Meaning: Configuration for setting a directory location where any test artifacts such as screenshots, test logs, etc. are stored. The user should ensure that the location provided is writable by the test.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfigKey.h
Language: Objective-C
Typ: GREYConfigKey

Variable: the merged configuration.
Meaning: configuration.mergedConfiguration
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfiguration+Private.h
Language: Objective-C
Typ: GREYConfigKey
Variables: GREYConfiguration configuration

Variable: whether the merged configuration was invalidated due to a change in the default or overridden configurations
Meaning: configuration.needsMerge
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfiguration+Private.h
Language: Objective-C
Typ: GREYConfigKey
Variables: GREYConfiguration configuration

Variable: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Config/GREYConfiguration.h
Language: Objective-C
Variables: GREYConfiguration configuration

Instruction: GREYGetLocalArrayShallowCopy(remoteArray)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYDistantObjectUtils.h
Language: objective-C
Context: earl-grey
Returns: a local NSArray object from a remote NSArray. The local array shallow copies the elements of the remoteArray.
Variables: NSArray<id> *remoteArray

Instruction: GREYGetRemoteArrayShallowCopy(remoteArray)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYDistantObjectUtils.h
Language: objective-C
Context: earl-grey
Returns: a remote NSArray object from a remote NSArray. The remote array shallow copies the elements of the localArray.
Variables: NSArray<id> *localArray

Typ: GREYHostApplicationDistantObject
Meaning: The application instance running in the app-under-test's process.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYDistantObjectUtils.h
Language: objective-C
Context: earl-grey

Variable: hostApplicationDistantObject.sharedInstance
Meaning: The singleton of GREYHostApplicationDistantObject.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostApplicationDistantObject.h
Context: earl-grey
Language: objective-C
Variables: GREYHostApplicationDistantObject hostApplicationDistantObject

Variable: hostApplicationDistantObject.testPort
Meaning: The port number that the eDO service on the test's main queue listens on
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostApplicationDistantObject.h
Context: earl-grey
Language: objective-C
Variables: GREYHostApplicationDistantObject hostApplicationDistantObject

Variable: hostApplicationDistantObject.service
Meaning: The EDOHostService the application process listens on.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostApplicationDistantObject.h
Context: earl-grey
Language: objective-C
Variables: GREYHostApplicationDistantObject hostApplicationDistantObject

Variable: hostApplicationDistantObject.servicePort
Meaning: the port for the distant object's service
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostApplicationDistantObject.h
Context: earl-grey
Language: objective-C
Variables: GREYHostApplicationDistantObject hostApplicationDistantObject

Typ: GREYHostBackgroundDistantObject
Meaning: The instance running in a non-main dispatch queue in the app-under-test's process.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostBackgroundDistantObject.h
Language: objective-C
Context: earl-grey

Variable: hostBackgroundDistantObject.sharedInstance
Meaning: The singleton of GREYHostApplicationDistantObject.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostBackgroundDistantObject.h
Context: earl-grey
Language: objective-C
Typ: GREYHostBackgroundDistantObject hostBackgroundDistantObject

Variable: hostBackgroundDistantObject.backgroundQueue
Meaning: The dispatch queue that the instance of GREYHostBackgroundDistantObject runs on in the application process.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostBackgroundDistantObject.h
Context: earl-grey
Language: objective-C
Typ: GREYHostBackgroundDistantObject hostBackgroundDistantObject

Variable: hostBackgroundDistantObject.service
Meaning: The EDOHostService the application process listens on.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostBackgroundDistantObject.h
Context: earl-grey
Language: objective-C
Typ: GREYHostBackgroundDistantObject hostBackgroundDistantObject

Variable: hostBackgroundDistantObject.servicePort
Meaning: the port for the distant object's service
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYHostBackgroundDistantObject.h
Context: earl-grey
Language: objective-C
Typ: GREYHostBackgroundDistantObject hostBackgroundDistantObject

Variable: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYTestApplicationDistantObject+Private.h
Context: earl-grey
Language: objective-C
Typ: GREYHostBackgroundDistantObject hostBackgroundDistantObject

Variable: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/DistantObject/GREYTestApplicationDistantObject.h
Context: earl-grey
Language: objective-C

Typ: GREYBaseMatcher
Meaning: A base class that implements the GREYMatcher protocol methods.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYBaseMatcher.h
Language: objective-C
Context: earl-grey

Instruction: [baseMatcher
  item:item
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYBaseMatcher.h
Language: objective-C
Context: earl-grey
Returns: Whether this matcher matches item
Variables: GREYBaseMatcher baseMatcher

Instruction: [baseMatcher
  describeTo:description
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYBaseMatcher.h
Effect: Alter the description to add this matcher
Language: objective-C
Context: earl-grey
Variables: GREYBaseMatcher baseMatcher

Typ: GREYDescription
Meaning: layout of an object that conforms to GREYMatcher.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYDescription.h
Language: objective-C
Context: earl-grey

Instruction: [description
  appendText:text
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYDescription.h
Effect: Appends the provided text to the GREYDescription.
Language: objective-C
Context: earl-grey
Returns: An instance of an object conforming to GREYDescription with the provided text appended to it.
Variables: GREYDescription description

Instruction: [description
  appendDescriptionOf:object
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYDescription.h
Effect: Appends the description of the provided object to the GREYDescription.
Language: objective-C
Context: earl-grey
Returns: An instance of an object conforming to GREYDescription with the provided object's description appended to it.
Variables: GREYDescription description

Instruction: todo
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYElementMatcherBlock+Private.h
Language: objective-C
Context: earl-grey

Typ: GREYMatchesBlock
Meaning: A block for implementing GREYBaseMatcher::matches:
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYElementMatcherBlock.h
Language: objective-C
Context: earl-grey
Implementation: BOOL (^)(id _Nullable element)

Typ: GREYDescribeToBlock
Meaning: A block for implementing GREYBaseMatcher::describeTo:.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYElementMatcherBlock.h
Language: objective-C
Context: earl-grey
Implementation: void (^)(id<GREYDescription> description);

Typ: GREYElementMatcherBlock
Meaning: A block based implementation of GREYBaseMatcher. Enables custom implementation of protocol method using blocks.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYElementMatcherBlock.h
Language: objective-C
Context: earl-grey

Variable: elementMatcherBlock.matcherBlock
Meaning: The block which will be invoked for the GREYBaseMatcher::matches: method.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYElementMatcherBlock.h
Context: earl-grey
Language: objective-C
Variables: GREYElementMatcherBlock elementMatcherBlock

Variable: elementMatcherBlock.descriptionBlock
Meaning: The block which will be invoked for the GREYBaseMatcher::describeTo: method.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYElementMatcherBlock.h
Context: earl-grey
Language: objective-C
Variables: GREYElementMatcherBlock elementMatcherBlock

Instruction: [GREYElementMatcherBlock
  matcherWithMatchesBlock:matchBlock
  descriptionBlock:describeBlock
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYElementMatcherBlock.h
Language: objective-C
Context: earl-grey
Returns: GREYElementMatcherBlock instance, initialized with the required matching condition and description.

Typ: GREYLayoutConstraint
Meaning: captures information related to a layout constraint: two attributes and a relation that must be satisfied between them.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Language: objective-C
Context: earl-grey

Instruction: + (instancetype)layoutConstraintWithAttribute:(GREYLayoutAttribute)attribute relatedBy:(GREYLayoutRelation)relation toReferenceAttribute:(GREYLayoutAttribute)referenceAttribute multiplier:(CGFloat)multiplier constant:(CGFloat)constant;
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Effect: todo
Language: objective-C
Context: earl-grey
Typ: GREYLayoutConstraint

Instruction: [GREYLayoutConstraint
  layoutConstraintForDirection:direction
  andMinimumSeparation:separation
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Language: objective-C
Context: earl-grey
Returns: GREYLayoutConstraint that checks the position of a UI element with respect to a particular direction
Typ: GREYLayoutConstraint

Instruction: [layoutConstraint
  satisfiedByElement:element
  andReferenceElement:referenceElement
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Effect: Checks if the given element satisfies the provided constraints, as shown by a reference element.
Language: objective-C
Context: earl-grey
Variables: GREYLayoutConstraint layoutConstraint
Typ: GREYLayoutConstraint

Instruction: [layoutConstraint
  description
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Effect: A description of the GREYLayoutConstraint created.
Language: objective-C
Context: earl-grey
Variables: GREYLayoutConstraint layoutConstraint
Typ: GREYLayoutConstraint

Variable: layoutConstraint.attribute
Meaning: The attribute constraint being checked.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Context: earl-grey
Language: objective-C
Variables: GREYLayoutConstraint layoutConstraint

Variable: layoutConstraint.relation
Meaning: The GREYLayoutRelation between the attribute and the referenceAttribute.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Context: earl-grey
Language: objective-C
Variables: GREYLayoutConstraint layoutConstraint

Variable: layoutConstraint.referenceAttribute
Meaning: The value the attribute is being compared to.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Context: earl-grey
Language: objective-C
Variables: GREYLayoutConstraint layoutConstraint

Variable: layoutConstraint.multiplier
Meaning: Value to multiply the referenceAttribute value with.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Context: earl-grey
Language: objective-C
Variables: GREYLayoutConstraint layoutConstraint

Variable: layoutConstraint.constant
Meaning: Any constant to be added to the relation being checked.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYLayoutConstraint.h
Context: earl-grey
Language: objective-C
Variables: GREYLayoutConstraint layoutConstraint

Typ: GREYMatcher
Function: - (BOOL)matches:(id)item;
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYMatcher.h
Function2: -(BOOL)matches:(id)item describingMismatchTo:(id<GREYDescription>)mismatchDescription;
Context: earl-grey
Function3: - (void)describeMismatchOf:(id)item to:(id<GREYDescription>)mismatchDescription;
Function4: - (void)describeTo:(id<GREYDescription>)description;
Variables: GREYLayoutConstraint layoutConstraint
Language: Objective-C

Instruction: [matcher
  matches:item
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYMatcher.h
Language: Objective-C
Context: earl-grey
Returns: whether the object matched the matcher
Variables: GREYMatcher matcher
Typ: GREYMatcher
Name: objective-C

Instruction: [matcher
  matches:item
  describingMismatchTo:mismatchDescription
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYMatcher.h
Effect: In case of a mismatch, the reason for mismatch is added to mismatchDescription.
Language: Objective-C
Context: earl-grey
Returns: whether the object matched the matcher
Variables: GREYMatcher matcher
Typ: GREYMatcher
Name: objective-C

Instruction: [matcher
  describingMismatchOf:item
  to:mismatchDescription
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYMatcher.h
Effect: Generate the description containing the reason for why a matcher did not match an * item.
Language: Objective-C
Context: earl-grey
Variables: GREYMatcher matcher
Assuming: assumes that GREYMatcher::matches: is false, but will not check this.
Name: objective-C

Typ: GREYStringDescription
Meaning: string based implementation of GREYDescription protocol.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Matcher/GREYMatcher.h
Language: objective-C
Context: earl-grey
Assuming: assumes that GREYMatcher::matches: is false, but will not check this.

Instruction: GREYFatalAssert(foo)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Effect: Asserts that foo is true otherwise aborts the program.
Language: objective-C
Assuming: assumes that GREYMatcher::matches: is false, but will not check this.
Typ: GREYStringDescription

Instruction: GREYFatalAssertWithMessage(
  foo,
  message
)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Effect: Asserts that foo is true otherwise aborts the program logging message
Language: objective-C
Assuming: assumes that GREYMatcher::matches: is false,
  but will not check this.
Typ: GREYStringDescription

Instruction: GREYFatalAssertNonMainThread()
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Effect: Asserts that the current thread is the main thread otherwise aborts the program.
Language: objective-C
Assuming: assumes that GREYMatcher::matches: is false, but will not check this.
Typ: GREYStringDescription

Instruction: GREYFatalAssertMainThread()
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Effect: Asserts that the current thread is the main thread otherwise aborts the program.
Language: objective-C
Assuming: assumes that GREYMatcher::matches: is false, but will not check this.
Typ: GREYStringDescription

Instruction: GREYThrowOnNilParameter(parameter)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Language: objective-C
Exception: GREYStringDescription

Instruction: GREYThrowOnNilParameterWithMessage(
  parameter,
  message,
  ...
)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Language: objective-C
Exception: NSInternalInconsistencyException if @c parameter is nil or NULL

Instruction: GREYThrowOnFailedCondition(condition)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Language: objective-C
Exception: NSInternalInconsistencyException if condition is false

Instruction: GREYThrowOnFailedConditionWithmessage(
  condition,
  message,
  ...
)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Language: objective-C
Exception: NSInternalInconsistencyException(
  message
) if condition is false

Instruction: GREYThrow(
  message,
  ...
)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Language: objective-C
Exception: NSInternalInconsistencyException(
  message
)

Instruction: GREYThrowInFunctionfoo(args)
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYFatalAsserts.h
Language: objective-C
Exception: Same as GREYThrowInfoo(args), but throws in function

Typ: GREYCheckBlockWithError
Meaning: A block that accepts an @c element, which will be invoked when an assertion is going to be performed on the element. If the assertion fails and a non-nil @c errorOrNil is provided, the block should populate it with the cause of failure.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYAssertionBlock.h
Language: objective-C
Implementation: BOOL (^)(id element, __strong NSError **errorOrNil);

Typ: An interface to create GREYAssertions from blocks.
Meaning: GREYAssertionBlock
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYAssertionBlock.h
Language: objective-C

Typ: GREYAssertion
Meaning: Protocol to which EarlGrey assertion classes must conform.
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYAssertion.h
Language: objective-C

Instruction: [assertion
  assert:element
  error:errorOrNil
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYAssertion.h
Effect: If a non-nil errorOrNil is provided, it will be set to error that represents the assertion failure cause, if any.
Language: objective-C
Returns: whether the assertion holds for the specified element
Variables: GREYAssertion assertion
Extra: If the assertion does not accept nil elements, the error domain should be kGREYInteractionErrorDomain and the error code kGREYInteractionElementNotFoundErrorCode.
Exception: if the if the assertion fails and the errorOrNil parameter is nil

Instruction: [assertion
  name
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Assertion/GREYAssertion.h
Language: objective-C
Returns: the name of the assertion
Variables: GREYAssertion assertion

Instruction: [NSFileManager
  grey_saveImageAsPNG:image
  toFile:filename
  inDirectory:directoryPath
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSFileManager%2BGREYCommon.h
Effect: Saves the provided image as a PNG to the given filename under the given directoryPath. If the given directory path doesn't exist, it will be created.
Language: objective-C
Typ: NSFileManager

Instruction: [object grey_viewContainingSelf
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: Traverses up the accessibility tree and returns the immediate ancestor UIView or nil if none exists.

Instruction: [object grey_container
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: The direct container of the element or nil if the element has no container.

Instruction: [object grey_containersAssignableFromClass:klass
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: Traverses up the element hierarchy returning all containers of type @c klass
Extra: When called on a non-UIView accessibility element, the accessibility container tree is traversed until the first UIView is encountered, at which point it switches to traversing the view hierarchy

Instruction: [object
  grey_description
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: A detailed description of the element, including accessibility attributes.

Instruction: [object
  grey_shortDescription
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: A short description of the element, including its class, accessibility ID and label.

Instruction: [object
  grey_objectescription
]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: A description with the class and memory address of the object.

Instruction: [object
  grey_formattedDescriptionOrEmptyStringForValue:value
  withPrefix:prefix]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: Prefix appended to the value or empty string if value is nil.

Instruction: [object
  grey_extendedDescriptionAttributes]
Page: https://github.com/google/EarlGrey/blob/earlgrey2/CommonLib/Additions/NSObject%2BGREYCommon.h
Language: objective-C
Returns: Dictionary mapping attribute names to values. The values can be any object which can be formatted with % in an NSString.