# Tapper

Summary:[Nested Classes](https://developer.android.com/reference/android/support/test/espresso/action/Tapper#nestedclasses)\|[Methods](https://developer.android.com/reference/android/support/test/espresso/action/Tapper#pubmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/action/Tapper#)  

# Tapper

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public


interface
Tapper
`  
`


`

|---------------------------------------------|
| android.support.test.espresso.action.Tapper |

|---|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/action/Tapper#)Known Indirect Subclasses [Tap](https://developer.android.com/reference/android/support/test/espresso/action/Tap) |-----------------------------------------------------------------------------------------|---------------------------------------------------| | [Tap](https://developer.android.com/reference/android/support/test/espresso/action/Tap) | Executes different click types to given position. | ||

<br />

*** ** * ** ***

Interface to implement different click types.

## Summary

|                                                             ### Nested classes                                                              ||
|---------|------------------------------------------------------------------------------------------------------------------------------------|
| ` enum` | [Tapper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Tapper.Status) The result of the tap. |

|                                                                                                                                                                                                                                                                                                                                                                                                                                  ### Public methods                                                                                                                                                                                                                                                                                                                                                                                                                                   ||
|-------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` abstract `[Tapper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Tapper.Status) | ` `[sendTap](https://developer.android.com/reference/android/support/test/espresso/action/Tapper#sendTap(android.support.test.espresso.UiController, float[], float[], int, int))`(`[UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)` uiController, float[] coordinates, float[] precision, int inputDevice, int buttonState) ` Sends a MotionEvent to the given UiController.                                                                                                                                                                                                                                                                                                                             |
| ` abstract `[Tapper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Tapper.Status) | ` `[sendTap](https://developer.android.com/reference/android/support/test/espresso/action/Tapper#sendTap(android.support.test.espresso.UiController, float[], float[]))`(`[UiController](https://developer.android.com/reference/android/support/test/espresso/UiController)` uiController, float[] coordinates, float[] precision) ` *This method is deprecated. Use @{link #sendTap(UiController, float\[\], float\[\], int, int)} instead This will call the @{link #sendTap(UiController, float\[\], float\[\], int, int)} with[SOURCE_UNKNOWN](https://developer.android.com/reference/android/view/InputDevice.html#SOURCE_UNKNOWN),[BUTTON_PRIMARY](https://developer.android.com/reference/android/view/MotionEvent.html#BUTTON_PRIMARY)by default.* |

## Public methods

### sendTap

```
Tapper.Status sendTap (UiController uiController, 
                float[] coordinates, 
                float[] precision, 
                int inputDevice, 
                int buttonState)
```

Sends a MotionEvent to the given UiController.

<br />

|                                                Parameters                                                ||
|----------------|------------------------------------------------------------------------------------------|
| `uiController` | `UiController`: a UiController to use to send MotionEvents to the screen. <br />         |
| `coordinates`  | `float`: a float\[\] with x and y values of center of the tap. <br />                    |
| `precision`    | `float`: a float\[\] with x and y values of precision of the tap. <br />                 |
| `inputDevice`  | `int`: the input device of the tap, ie. InputDevice.SOURCE_MOUSE. <br />                 |
| `buttonState`  | `int`: the button the tap is received from, ie. BUTTON_PRIMARY, BUTTON_SECONDARY. <br /> |

|                                                                  Returns                                                                   ||
|-------------------------------------------------------------------------------------------------------------|-------------------------------|
| [Tapper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Tapper.Status) | The status of the tap. <br /> |

### sendTap

```
Tapper.Status sendTap (UiController uiController, 
                float[] coordinates, 
                float[] precision)
```

<br />

**This method is deprecated.**   
Use @{link #sendTap(UiController, float\[\], float\[\], int, int)} instead This will call the @{link #sendTap(UiController, float\[\], float\[\], int, int)} with[SOURCE_UNKNOWN](https://developer.android.com/reference/android/view/InputDevice.html#SOURCE_UNKNOWN),[BUTTON_PRIMARY](https://developer.android.com/reference/android/view/MotionEvent.html#BUTTON_PRIMARY)by default.

<br />

<br />

|              Parameters               ||
|----------------|-----------------------|
| `uiController` | `UiController` <br /> |
| `coordinates`  | `float` <br />        |
| `precision`    | `float` <br />        |

|                                                       Returns                                                       ||
|-------------------------------------------------------------------------------------------------------------|--------|
| [Tapper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Tapper.Status) | <br /> |

-

  ## Interfaces

  - [AdapterViewProtocol](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol)
  - [AdapterViewProtocol.DataFunction](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol.DataFunction)
  - [CoordinatesProvider](https://developer.android.com/reference/android/support/test/espresso/action/CoordinatesProvider)
  - [PrecisionDescriber](https://developer.android.com/reference/android/support/test/espresso/action/PrecisionDescriber)
  - [Swiper](https://developer.android.com/reference/android/support/test/espresso/action/Swiper)
  - [Tapper](https://developer.android.com/reference/android/support/test/espresso/action/Tapper)
-

  ## Classes

  - [AdapterDataLoaderAction](https://developer.android.com/reference/android/support/test/espresso/action/AdapterDataLoaderAction)
  - [AdapterViewProtocol.AdaptedData](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData)
  - [AdapterViewProtocol.AdaptedData.Builder](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocol.AdaptedData.Builder)
  - [AdapterViewProtocols](https://developer.android.com/reference/android/support/test/espresso/action/AdapterViewProtocols)
  - [CloseKeyboardAction](https://developer.android.com/reference/android/support/test/espresso/action/CloseKeyboardAction)
  - [EditorAction](https://developer.android.com/reference/android/support/test/espresso/action/EditorAction)
  - [EspressoKey](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey)
  - [EspressoKey.Builder](https://developer.android.com/reference/android/support/test/espresso/action/EspressoKey.Builder)
  - [GeneralClickAction](https://developer.android.com/reference/android/support/test/espresso/action/GeneralClickAction)
  - [GeneralSwipeAction](https://developer.android.com/reference/android/support/test/espresso/action/GeneralSwipeAction)
  - [KeyEventAction](https://developer.android.com/reference/android/support/test/espresso/action/KeyEventAction)
  - [MotionEvents](https://developer.android.com/reference/android/support/test/espresso/action/MotionEvents)
  - [MotionEvents.DownResultHolder](https://developer.android.com/reference/android/support/test/espresso/action/MotionEvents.DownResultHolder)
  - [OpenLinkAction](https://developer.android.com/reference/android/support/test/espresso/action/OpenLinkAction)
  - [PressBackAction](https://developer.android.com/reference/android/support/test/espresso/action/PressBackAction)
  - [RepeatActionUntilViewState](https://developer.android.com/reference/android/support/test/espresso/action/RepeatActionUntilViewState)
  - [ReplaceTextAction](https://developer.android.com/reference/android/support/test/espresso/action/ReplaceTextAction)
  - [ScrollToAction](https://developer.android.com/reference/android/support/test/espresso/action/ScrollToAction)
  - [TypeTextAction](https://developer.android.com/reference/android/support/test/espresso/action/TypeTextAction)
  - [ViewActions](https://developer.android.com/reference/android/support/test/espresso/action/ViewActions)
-

  ## Enums

  - [GeneralLocation](https://developer.android.com/reference/android/support/test/espresso/action/GeneralLocation)
  - [Press](https://developer.android.com/reference/android/support/test/espresso/action/Press)
  - [Swipe](https://developer.android.com/reference/android/support/test/espresso/action/Swipe)
  - [Swiper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Swiper.Status)
  - [Tap](https://developer.android.com/reference/android/support/test/espresso/action/Tap)
  - [Tapper.Status](https://developer.android.com/reference/android/support/test/espresso/action/Tapper.Status)