# PickerActions

Summary:[Methods](https://developer.android.com/reference/android/support/test/espresso/contrib/PickerActions#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/test/espresso/contrib/PickerActions#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/test/espresso/contrib/PickerActions#)  

# PickerActions

| 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

final

class
PickerActions
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object.html)`


``


`

|---|-----------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||
| ↳ | android.support.test.espresso.contrib.PickerActions |

<br />

*** ** * ** ***

Espresso action for interacting with[DatePicker](https://developer.android.com/reference/android/widget/DatePicker.html)and[TimePicker](https://developer.android.com/reference/android/widget/TimePicker.html).  
**See also:**

- [Pickers API guide](http://developer.android.com/guide/topics/ui/controls/pickers.html)

## Summary

|                                                                                                                                                                                                                                             ### Public methods                                                                                                                                                                                                                                             ||
|----------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction) | ` `[setDate](https://developer.android.com/reference/android/support/test/espresso/contrib/PickerActions#setDate(int, int, int))`(int year, int monthOfYear, int dayOfMonth) ` Returns a[ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction)that sets a date on a[DatePicker](https://developer.android.com/reference/android/widget/DatePicker.html). |
| ` static `[ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction) | ` `[setTime](https://developer.android.com/reference/android/support/test/espresso/contrib/PickerActions#setTime(int, int))`(int hours, int minutes) ` Returns a[ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction)that sets a time on a[TimePicker](https://developer.android.com/reference/android/widget/TimePicker.html).                         |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/contrib/PickerActions#)From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object.html)` ` |-------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object.html)          | ` clone() `                                                                                | | ` boolean`                                                                          | ` equals(`[Object](https://developer.android.com/reference/java/lang/Object.html)` arg0) ` | | ` void`                                                                             | ` finalize() `                                                                             | | ` final `[Class](https://developer.android.com/reference/java/lang/Class.html)`<?>` | ` getClass() `                                                                             | | ` int`                                                                              | ` hashCode() `                                                                             | | ` final void`                                                                       | ` notify() `                                                                               | | ` final void`                                                                       | ` notifyAll() `                                                                            | | ` `[String](https://developer.android.com/reference/java/lang/String.html)          | ` toString() `                                                                             | | ` final void`                                                                       | ` wait(long arg0, int arg1) `                                                              | | ` final void`                                                                       | ` wait(long arg0) `                                                                        | | ` final void`                                                                       | ` wait() `                                                                                 | ||

## Public methods

### setDate

```
ViewAction setDate (int year, 
                int monthOfYear, 
                int dayOfMonth)
```

Returns a[ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction)that sets a date on a[DatePicker](https://developer.android.com/reference/android/widget/DatePicker.html).

<br />

|         Parameters          ||
|---------------|--------------|
| `year`        | `int` <br /> |
| `monthOfYear` | `int` <br /> |
| `dayOfMonth`  | `int` <br /> |

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

### setTime

```
ViewAction setTime (int hours, 
                int minutes)
```

Returns a[ViewAction](https://developer.android.com/reference/android/support/test/espresso/ViewAction)that sets a time on a[TimePicker](https://developer.android.com/reference/android/widget/TimePicker.html).

<br />

|       Parameters        ||
|-----------|--------------|
| `hours`   | `int` <br /> |
| `minutes` | `int` <br /> |

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

-

  ## Interfaces

  - [RecyclerViewActions.PositionableRecyclerViewAction](https://developer.android.com/reference/android/support/test/espresso/contrib/RecyclerViewActions.PositionableRecyclerViewAction)
-

  ## Classes

  - [AccessibilityChecks](https://developer.android.com/reference/android/support/test/espresso/contrib/AccessibilityChecks)
  - [ActivityResultMatchers](https://developer.android.com/reference/android/support/test/espresso/contrib/ActivityResultMatchers)
  - [DrawerActions](https://developer.android.com/reference/android/support/test/espresso/contrib/DrawerActions)
  - [DrawerMatchers](https://developer.android.com/reference/android/support/test/espresso/contrib/DrawerMatchers)
  - [NavigationViewActions](https://developer.android.com/reference/android/support/test/espresso/contrib/NavigationViewActions)
  - [PickerActions](https://developer.android.com/reference/android/support/test/espresso/contrib/PickerActions)
  - [RecyclerViewActions](https://developer.android.com/reference/android/support/test/espresso/contrib/RecyclerViewActions)
  - [ViewPagerActions](https://developer.android.com/reference/android/support/test/espresso/contrib/ViewPagerActions)