blob: be81f07aac29b9b86511893df73979b0e16b5583 [file] [log] [blame]
<!DOCTYPE html>
<html lang="en">
<head>
<title>GREYInteraction Protocol Reference</title>
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
<meta charset='utf-8'>
<script src="../js/jquery.min.js" defer></script>
<script src="../js/jazzy.js" defer></script>
</head>
<body>
<a name="//apple_ref/objc/Protocol/GREYInteraction" class="dashAnchor"></a>
<a title="GREYInteraction Protocol Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">EarlGrey Docs</a> (100% documented)</p>
<p class="header-right"><a href="https://github.com/google/EarlGrey"><img src="../img/gh.png"/>View on GitHub</a></p>
</div>
</header>
<div class="content-wrapper">
<p id="breadcrumbs">
<a href="../index.html">EarlGrey Reference</a>
<img id="carat" src="../img/carat.png" />
GREYInteraction Protocol Reference
</p>
</div>
<div class="content-wrapper">
<nav class="sidebar">
<ul class="nav-groups">
<li class="nav-group-name">
<a href="../Classes.html">Classes</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Classes/EarlGreyImpl.html">EarlGreyImpl</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYActionBlock.html">GREYActionBlock</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYActions.html">GREYActions</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYAllOf.html">GREYAllOf</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYAnyOf.html">GREYAnyOf</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYAssertionBlock.html">GREYAssertionBlock</a>
</li>
<li class="nav-group-task">
<a href="../Classes.html#/c:objc(cs)GREYAssertions">GREYAssertions</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYBaseAction.html">GREYBaseAction</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYBaseMatcher.html">GREYBaseMatcher</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYCondition.html">GREYCondition</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYConfiguration.html">GREYConfiguration</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYConstants.html">GREYConstants</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYDataEnumerator.html">GREYDataEnumerator</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYDispatchQueueIdlingResource.html">GREYDispatchQueueIdlingResource</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYElementFinder.html">GREYElementFinder</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYElementHierarchy.html">GREYElementHierarchy</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYElementInteraction.html">GREYElementInteraction</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYElementMatcherBlock.html">GREYElementMatcherBlock</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYFrameworkException.html">GREYFrameworkException</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYLayoutConstraint.html">GREYLayoutConstraint</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYManagedObjectContextIdlingResource.html">GREYManagedObjectContextIdlingResource</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYMatchers.html">GREYMatchers</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYNSTimerIdlingResource.html">GREYNSTimerIdlingResource</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYNot.html">GREYNot</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYOperationQueueIdlingResource.html">GREYOperationQueueIdlingResource</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYScreenshotUtil.html">GREYScreenshotUtil</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYTestHelper.html">GREYTestHelper</a>
</li>
<li class="nav-group-task">
<a href="../Classes/GREYUIThreadExecutor.html">GREYUIThreadExecutor</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Constants.html">Constants</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYAcceptableFloatDifference">kGREYAcceptableFloatDifference</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYActionElementUserInfoKey">kGREYActionElementUserInfoKey</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYActionErrorUserInfoKey">kGREYActionErrorUserInfoKey</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYActionFailedException">kGREYActionFailedException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYActionUserInfoKey">kGREYActionUserInfoKey</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYAllowVerboseLogging">kGREYAllowVerboseLogging</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYAssertionElementUserInfoKey">kGREYAssertionElementUserInfoKey</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYAssertionErrorUserInfoKey">kGREYAssertionErrorUserInfoKey</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYAssertionFailedException">kGREYAssertionFailedException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYAssertionUserInfoKey">kGREYAssertionUserInfoKey</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyActionConstraintsEnabled">kGREYConfigKeyActionConstraintsEnabled</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyAnalyticsEnabled">kGREYConfigKeyAnalyticsEnabled</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyArtifactsDirLocation">kGREYConfigKeyArtifactsDirLocation</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyCALayerMaxAnimationDuration">kGREYConfigKeyCALayerMaxAnimationDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyCALayerModifyAnimations">kGREYConfigKeyCALayerModifyAnimations</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyDelayedPerformMaxTrackableDuration">kGREYConfigKeyDelayedPerformMaxTrackableDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyDispatchAfterMaxTrackableDelay">kGREYConfigKeyDispatchAfterMaxTrackableDelay</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyIncludeStatusBarWindow">kGREYConfigKeyIncludeStatusBarWindow</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyInteractionTimeoutDuration">kGREYConfigKeyInteractionTimeoutDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyNSTimerMaxTrackableInterval">kGREYConfigKeyNSTimerMaxTrackableInterval</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeySynchronizationEnabled">kGREYConfigKeySynchronizationEnabled</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConfigKeyURLBlacklistRegex">kGREYConfigKeyURLBlacklistRegex</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYConstraintFailedException">kGREYConstraintFailedException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYDidPerformActionNotification">kGREYDidPerformActionNotification</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYDidPerformAssertionNotification">kGREYDidPerformAssertionNotification</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYFailureHandlerKey">kGREYFailureHandlerKey</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYGenericFailureException">kGREYGenericFailureException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYInfiniteTimeout">kGREYInfiniteTimeout</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYInteractionErrorDomain">kGREYInteractionErrorDomain</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYKeyboardDismissalErrorDomain">kGREYKeyboardDismissalErrorDomain</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYLongPressDefaultDuration">kGREYLongPressDefaultDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYMinimumVisibleAlpha">kGREYMinimumVisibleAlpha</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYMultipleElementsFoundException">kGREYMultipleElementsFoundException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYNilException">kGREYNilException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYNoMatchingElementException">kGREYNoMatchingElementException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYNotNilException">kGREYNotNilException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYPinchAngleDefault">kGREYPinchAngleDefault</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYPinchFastDuration">kGREYPinchFastDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYPinchSlowDuration">kGREYPinchSlowDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYScrollErrorDomain">kGREYScrollErrorDomain</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYSwipeFastDuration">kGREYSwipeFastDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYSwipeSlowDuration">kGREYSwipeSlowDuration</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYTimeoutException">kGREYTimeoutException</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYUIThreadExecutorErrorDomain">kGREYUIThreadExecutorErrorDomain</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYWillPerformActionNotification">kGREYWillPerformActionNotification</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kGREYWillPerformAssertionNotification">kGREYWillPerformAssertionNotification</a>
</li>
<li class="nav-group-task">
<a href="../Constants.html#/c:@kUIPickerViewMaxAccessibilityViews">kUIPickerViewMaxAccessibilityViews</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Enums.html">Enums</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Enums/GREYContentEdge.html">GREYContentEdge</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYDirection.html">GREYDirection</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYInteractionErrorCode.html">GREYInteractionErrorCode</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYKeyboardDismissalErrorCode.html">GREYKeyboardDismissalErrorCode</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYLayoutAttribute.html">GREYLayoutAttribute</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYLayoutDirection.html">GREYLayoutDirection</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYLayoutRelation.html">GREYLayoutRelation</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYPinchDirection.html">GREYPinchDirection</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYScrollErrorCode.html">GREYScrollErrorCode</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYTapType.html">GREYTapType</a>
</li>
<li class="nav-group-task">
<a href="../Enums/GREYUIThreadExecutorErrorCode.html">GREYUIThreadExecutorErrorCode</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Protocols.html">Protocols</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Protocols/GREYAction.html">GREYAction</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/GREYAssertion.html">GREYAssertion</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/GREYDescription.html">GREYDescription</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/GREYFailureHandler.html">GREYFailureHandler</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/GREYIdlingResource.html">GREYIdlingResource</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/GREYInteraction.html">GREYInteraction</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/GREYMatcher.html">GREYMatcher</a>
</li>
<li class="nav-group-task">
<a href="../Protocols/GREYProvider.html">GREYProvider</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Type Definitions.html">Type Definitions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Type Definitions.html#/c:GREYElementMatcherBlock.h@T@DescribeToBlock">DescribeToBlock</a>
</li>
<li class="nav-group-task">
<a href="../Type Definitions.html#/c:GREYAssertionBlock.h@T@GREYCheckBlockWithError">GREYCheckBlockWithError</a>
</li>
<li class="nav-group-task">
<a href="../Type Definitions.html#/c:GREYUIThreadExecutor.h@T@GREYExecBlock">GREYExecBlock</a>
</li>
<li class="nav-group-task">
<a href="../Type Definitions.html#/c:GREYActionBlock.h@T@GREYPerformBlock">GREYPerformBlock</a>
</li>
<li class="nav-group-task">
<a href="../Type Definitions.html#/c:GREYElementMatcherBlock.h@T@MatchesBlock">MatchesBlock</a>
</li>
</ul>
</li>
<li class="nav-group-name">
<a href="../Functions.html">Functions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@NSStringFromGREYContentEdge">NSStringFromGREYContentEdge</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@NSStringFromGREYDirection">NSStringFromGREYDirection</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@NSStringFromGREYLayoutAttribute">NSStringFromGREYLayoutAttribute</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@NSStringFromGREYLayoutRelation">NSStringFromGREYLayoutRelation</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@NSStringFromPinchDirection">NSStringFromPinchDirection</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@NSStringFromUIAccessibilityTraits">NSStringFromUIAccessibilityTraits</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@NSStringFromUIDeviceOrientation">NSStringFromUIDeviceOrientation</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_accessibilityElement">grey_accessibilityElement</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_accessibilityFocused">grey_accessibilityFocused</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_accessibilityHint">grey_accessibilityHint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_accessibilityID">grey_accessibilityID</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_accessibilityLabel">grey_accessibilityLabel</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_accessibilityTrait">grey_accessibilityTrait</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_accessibilityValue">grey_accessibilityValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_allOf">grey_allOf</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_allOfMatchers">grey_allOfMatchers</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_ancestor">grey_ancestor</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_anyOf">grey_anyOf</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_anyOfMatchers">grey_anyOfMatchers</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_anything">grey_anything</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_buttonTitle">grey_buttonTitle</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_clearText">grey_clearText</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_closeTo">grey_closeTo</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_conformsToProtocol">grey_conformsToProtocol</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_createImagePixelDataFromCGImageRef">grey_createImagePixelDataFromCGImageRef</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_datePickerValue">grey_datePickerValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_descendant">grey_descendant</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_doubleTap">grey_doubleTap</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_doubleTapAtPoint">grey_doubleTapAtPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_enabled">grey_enabled</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_equalTo">grey_equalTo</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_execute_async">grey_execute_async</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_execute_sync">grey_execute_sync</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_firstResponder">grey_firstResponder</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_getFailureHandler">grey_getFailureHandler</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_greaterThan">grey_greaterThan</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_interactable">grey_interactable</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_javaScriptExecution">grey_javaScriptExecution</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_keyWindow">grey_keyWindow</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_kindOfClass">grey_kindOfClass</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_layout">grey_layout</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_lessThan">grey_lessThan</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_longPress">grey_longPress</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_longPressAtPointWithDuration">grey_longPressAtPointWithDuration</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_longPressWithDuration">grey_longPressWithDuration</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_minimumVisiblePercent">grey_minimumVisiblePercent</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_moveSliderToValue">grey_moveSliderToValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_multiFingerSwipeFastInDirection">grey_multiFingerSwipeFastInDirection</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_multiFingerSwipeFastInDirectionWithStartPoint">grey_multiFingerSwipeFastInDirectionWithStartPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_multiFingerSwipeSlowInDirection">grey_multiFingerSwipeSlowInDirection</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_multiFingerSwipeSlowInDirectionWithStartPoint">grey_multiFingerSwipeSlowInDirectionWithStartPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_multipleTapsWithCount">grey_multipleTapsWithCount</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_nil">grey_nil</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_not">grey_not</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_notNil">grey_notNil</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_notVisible">grey_notVisible</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_pickerColumnSetToValue">grey_pickerColumnSetToValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_pinchFastInDirectionAndAngle">grey_pinchFastInDirectionAndAngle</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_pinchSlowInDirectionAndAngle">grey_pinchSlowInDirectionAndAngle</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_progress">grey_progress</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_replaceText">grey_replaceText</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_respondsToSelector">grey_respondsToSelector</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_scrollInDirection">grey_scrollInDirection</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_scrollInDirectionWithStartPoint">grey_scrollInDirectionWithStartPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_scrollToContentEdge">grey_scrollToContentEdge</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_scrollToContentEdgeWithStartPoint">grey_scrollToContentEdgeWithStartPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_scrollViewContentOffset">grey_scrollViewContentOffset</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_scrolledToContentEdge">grey_scrolledToContentEdge</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_selected">grey_selected</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_setDate">grey_setDate</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_setPickerColumnToValue">grey_setPickerColumnToValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_setStepperValue">grey_setStepperValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_sliderValueMatcher">grey_sliderValueMatcher</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_snapshot">grey_snapshot</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_stepperValue">grey_stepperValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_sufficientlyVisible">grey_sufficientlyVisible</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_swipeFastInDirection">grey_swipeFastInDirection</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_swipeFastInDirectionWithStartPoint">grey_swipeFastInDirectionWithStartPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_swipeSlowInDirection">grey_swipeSlowInDirection</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_swipeSlowInDirectionWithStartPoint">grey_swipeSlowInDirectionWithStartPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_switchWithOnState">grey_switchWithOnState</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_systemAlertViewShown">grey_systemAlertViewShown</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_tap">grey_tap</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_tapAtPoint">grey_tapAtPoint</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_text">grey_text</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_textFieldValue">grey_textFieldValue</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_turnSwitchOn">grey_turnSwitchOn</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_typeText">grey_typeText</a>
</li>
<li class="nav-group-task">
<a href="../Functions.html#/c:@F@grey_userInteractionEnabled">grey_userInteractionEnabled</a>
</li>
</ul>
</li>
</ul>
</nav>
<article class="main-content">
<section>
<section class="section">
<h1>GREYInteraction</h1>
<div class="declaration">
<div class="language">
<pre class="highlight"><code><span class="k">@protocol</span> <span class="nc">GREYInteraction</span> <span class="o">&lt;</span><span class="n">NSObject</span><span class="o">&gt;</span></code></pre>
</div>
</div>
<p>Represents an interaction with a UI element.</p>
</section>
<section class="section task-group-section">
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(py)dataSource"></a>
<a name="//apple_ref/objc/Property/dataSource" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(py)dataSource">dataSource</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Data source for providing UI elements to interact with.
The dataSource must adopt GREYInteractionDataSource protocol and a weak reference is held.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">id</span><span class="o">&lt;</span><span class="n">GREYInteractionDataSource</span><span class="o">&gt;</span> <span class="n">dataSource</span><span class="p">;</span></code></pre>
</div>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)inRoot:"></a>
<a name="//apple_ref/objc/Method/-inRoot:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)inRoot:">-inRoot:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Indicates that the current interaction should be performed on a UI element contained inside
another UI element that is uniquely matched by @c rootMatcher.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">inRoot</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYMatcher.html">GREYMatcher</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">rootMatcher</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>rootMatcher</em>
</code>
</td>
<td>
<div>
<p>Matcher used to select the container of the element the interaction
will be performed on.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance, with an appropriate rootMatcher.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)usingSearchAction:onElementWithMatcher:"></a>
<a name="//apple_ref/objc/Method/-usingSearchAction:onElementWithMatcher:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)usingSearchAction:onElementWithMatcher:">-usingSearchAction:onElementWithMatcher:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Performs the @c action repeatedly on the the element matching the @c matcher until the element
to interact with (specified by GREYInteraction::selectElementWithMatcher:) is found or a
timeout occurs. The search action is only performed when coupled with
GREYInteraction::performAction:, GREYInteraction::assert:, or
GREYInteraction::assertWithMatcher: APIs. This API only creates an interaction consisting of
repeated executions of the search action provided. You need to call an action or assertion
after this in order to interaction with the element being searched for.</p>
<p>For example, this code will perform an upward scroll of 50 points until an element is found
and then tap on it:
@code
[[[EarlGrey selectElementWithMatcher:grey_accessibilityID(@<q>elementToFind</q>)]
usingSearchAction:grey_scrollInDirection(kGREYDirectionUp, 50.0f)
onElementWithMatcher:grey_accessibilityID(@<q>ScrollingWindow</q>)]
performAction:grey_tap()] // This should be separately called for the action.
@endcode</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">usingSearchAction</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYAction.html">GREYAction</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">action</span>
<span class="nf">onElementWithMatcher</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYMatcher.html">GREYMatcher</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">matcher</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>action</em>
</code>
</td>
<td>
<div>
<p>The action to be performed on the element.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>matcher</em>
</code>
</td>
<td>
<div>
<p>The matcher that the element matches.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance, with an appropriate action and matcher.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)performAction:"></a>
<a name="//apple_ref/objc/Method/-performAction:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)performAction:">-performAction:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Performs an @c action on the selected UI element.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">performAction</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYAction.html">GREYAction</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">action</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>action</em>
</code>
</td>
<td>
<div>
<p>The action to be performed on the @c element.
@throws NSException if the action fails.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance with an appropriate action.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)performAction:error:"></a>
<a name="//apple_ref/objc/Method/-performAction:error:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)performAction:error:">-performAction:error:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Performs an @c action on the selected UI element with an error set on failure.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">performAction</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYAction.html">GREYAction</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">action</span>
<span class="nf">error</span><span class="p">:(</span><span class="n">NSError</span> <span class="o">**</span><span class="p">)</span><span class="nv">errorOrNil</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>action</em>
</code>
</td>
<td>
<div>
<p>The action to be performed on the @c element.
@param[out] errorOrNil Error populated on failure.
@throws NSException on action failure if @c errorOrNil is not set.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>errorOrNil</em>
</code>
</td>
<td>
<div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance, with an action and an error that will be
populated on failure.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)assert:"></a>
<a name="//apple_ref/objc/Method/-assert:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)assert:">-assert:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Performs an @c assertion on the selected UI element.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">assert</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYAssertion.html">GREYAssertion</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">assertion</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>assertion</em>
</code>
</td>
<td>
<div>
<p>The assertion to be performed on the @c element.
@throws NSException if the @c assertion fails.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance with a valid assertion.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)assert:error:"></a>
<a name="//apple_ref/objc/Method/-assert:error:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)assert:error:">-assert:error:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Performs an @c assertion on the selected UI element with an error set on failure.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">assert</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYAssertion.html">GREYAssertion</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">assertion</span>
<span class="nf">error</span><span class="p">:(</span><span class="n">NSError</span> <span class="o">**</span><span class="p">)</span><span class="nv">errorOrNil</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>assertion</em>
</code>
</td>
<td>
<div>
<p>The assertion to be performed on the @c element.
@param[out] errorOrNil Error populated on failure.
@throws NSException on assertion failure if @c errorOrNil is not set.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>errorOrNil</em>
</code>
</td>
<td>
<div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance with an assertion and an error that will be
populated on failure.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)assertWithMatcher:"></a>
<a name="//apple_ref/objc/Method/-assertWithMatcher:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)assertWithMatcher:">-assertWithMatcher:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Performs an assertion that evaluates @c matcher on the selected UI element.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">assertWithMatcher</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYMatcher.html">GREYMatcher</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">matcher</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>matcher</em>
</code>
</td>
<td>
<div>
<p>The matcher to be evaluated on the @c element.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance with a matcher to be evaluated on an element.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)assertWithMatcher:error:"></a>
<a name="//apple_ref/objc/Method/-assertWithMatcher:error:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)assertWithMatcher:error:">-assertWithMatcher:error:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>Performs an assertion that evaluates @c matcher on the selected UI element.</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">assertWithMatcher</span><span class="p">:(</span><span class="n">id</span><span class="o">&lt;</span><span class="n"><a href="../Protocols/GREYMatcher.html">GREYMatcher</a></span><span class="o">&gt;</span><span class="p">)</span><span class="nv">matcher</span>
<span class="nf">error</span><span class="p">:(</span><span class="n">NSError</span> <span class="o">**</span><span class="p">)</span><span class="nv">errorOrNil</span><span class="p">;</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>matcher</em>
</code>
</td>
<td>
<div>
<p>The matcher to be evaluated on the @c element.
@param[out] errorOrNil Error populated on failure.
@throws NSException on assertion failure if @c errorOrNil is not set.</p>
</div>
</td>
</tr>
<tr>
<td>
<code>
<em>errorOrNil</em>
</code>
</td>
<td>
<div>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>The provided GREYInteraction instance, with a matcher to be evaluated on an element and
an error that will be populated on failure.</p>
</div>
</section>
</div>
</li>
<li class="item">
<div>
<code>
<a name="/c:objc(pl)GREYInteraction(im)atIndex:"></a>
<a name="//apple_ref/objc/Method/-atIndex:" class="dashAnchor"></a>
<a class="token" href="#/c:objc(pl)GREYInteraction(im)atIndex:">-atIndex:</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>In case of multiple matches, selects the element at the specified index. In case of the
index being over the number of matched elements, it throws an exception. Please make sure
that this is used after you&rsquo;ve created the matcher. For example, in case three elements are
matched, and you wish to match with the second one, then @c atIndex would be used in this
manner:</p>
<p>@code
[[EarlGrey selectElementWithMatcher:grey_accessibilityLabel(@<q>Generic Matcher</q>)] atIndex:1];
@endcode</p>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Objective-C</p>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">atIndex</span><span class="p">:(</span><span class="n">NSUInteger</span><span class="p">)</span><span class="nv">index</span><span class="p">;</span></code></pre>
</div>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight"><code><span class="kd">func</span> <span class="nf">atIndex</span><span class="p">(</span><span class="n">_</span> <span class="nv">index</span><span class="p">:</span> <span class="kt">UInt</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="k">Self</span><span class="o">!</span></code></pre>
</div>
</div>
<div>
<h4>Parameters</h4>
<table class="graybox">
<tbody>
<tr>
<td>
<code>
<em>index</em>
</code>
</td>
<td>
<div>
<p>The zero-indexed position of the element in the list of matched elements
to be selected.
@throws NSException if the @c index is more than the number of matched elements.</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<div>
<h4>Return Value</h4>
<p>An interaction (assertion or an action) to be performed on the element at the
specified index in the list of matched elements.</p>
</div>
</section>
</div>
</li>
</ul>
</div>
</section>
</section>
<section id="footer">
<p>Copyright 2017 Google Inc.</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.8.3</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
</div>
</body>
</div>
</html>