Summary: Methods | Inherited Methods | [Expand All]

# ViewAssertions

`public final class ViewAssertions`
`extends Object` ``

java.lang.Object
↳ | android.support.test.espresso.assertion.ViewAssertions

A collection of common `ViewAssertion`s.

## Summary

### Public methods
`static ViewAssertion` | `doesNotExist()` Returns an assert that ensures the view matcher does not find any matching view in the hierarchy.
`static ViewAssertion` | `matches(Matcher<? super View> viewMatcher)` Returns a generic `ViewAssertion` that asserts that a view exists in the view hierarchy and is matched by the given view matcher.
`static ViewAssertion` | `selectedDescendantsMatch(Matcher<View> selector, Matcher<View> matcher)` Returns a generic `ViewAssertion` that asserts that the descendant views selected by the selector match the specified matcher.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()`
`boolean` | `equals(Object arg0)`
`void` | `finalize()`
`final Class<?>` | `getClass()`
`int` | `hashCode()`
`final void` | `notify()`
`final void` | `notifyAll()`
`String` | `toString()`
`final void` | `wait(long arg0, int arg1)`
`final void` | `wait(long arg0)`
`final void` | `wait()`

## Public methods

### doesNotExist

    ViewAssertion doesNotExist ()

Returns an assert that ensures the view matcher does not find any matching view in the hierarchy.

Returns
`ViewAssertion` |

### matches

    ViewAssertion matches (Matcher<? super View> viewMatcher)

Returns a generic `ViewAssertion` that asserts that a view exists in the view hierarchy and is matched by the given view matcher.

Parameters
`viewMatcher` | `Matcher`

Returns
`ViewAssertion` |

### selectedDescendantsMatch

    ViewAssertion selectedDescendantsMatch (Matcher<View> selector,
                    Matcher<View> matcher)

Returns a generic `ViewAssertion` that asserts that the descendant views selected by the selector match the specified matcher. Example: onView(rootView).check(selectedDescendantsMatch( not(isAssignableFrom(TextView.class)), hasContentDescription()));

Parameters
`selector` | `Matcher`
`matcher` | `Matcher`

Returns
`ViewAssertion` |

- ## Classes

  - LayoutAssertions
  - PositionAssertions
  - ViewAssertions