# PositionAssertions

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

# PositionAssertions

| 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
PositionAssertions
`  
`

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.assertion.PositionAssertions |

<br />

*** ** * ** ***

A collection of[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)s for checking relative position of elements on the screen.

These comparisons are on the x,y plane; they ignore the z plane.

## Summary

|                                                                                                                                                                                                                                                                                                     ### Public methods                                                                                                                                                                                                                                                                                                      ||
|----------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isAbove](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isAbove(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` *This method is deprecated. Use[isCompletelyAbove(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyAbove(org.hamcrest.Matcher<android.view.View>))instead.*         |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isBelow](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isBelow(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` *This method is deprecated. Use[isCompletelyBelow(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyBelow(org.hamcrest.Matcher<android.view.View>))instead.*         |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isBottomAlignedWith](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isBottomAlignedWith(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is bottom aligned with the view matching the given matcher.           |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isCompletelyAbove](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyAbove(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely above the view matching the given matcher.                  |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isCompletelyBelow](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyBelow(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely below the view matching the given matcher.                  |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isCompletelyLeftOf](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyLeftOf(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely left of the view matching the given matcher.              |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isCompletelyRightOf](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyRightOf(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely right of the view matching the given matcher.           |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isLeftAlignedWith](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isLeftAlignedWith(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is left aligned with the view matching the given matcher.                 |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isLeftOf](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isLeftOf(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` *This method is deprecated. Use[isCompletelyLeftOf(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyLeftOf(org.hamcrest.Matcher<android.view.View>))instead.*     |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isPartiallyAbove](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isPartiallyAbove(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially above the view matching the given matcher.                     |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isPartiallyBelow](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isPartiallyBelow(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially below the view matching the given matcher.                     |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isPartiallyLeftOf](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isPartiallyLeftOf(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially left of the view matching the given matcher.                 |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isPartiallyRightOf](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isPartiallyRightOf(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially right of the view matching the given matcher.              |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isRightAlignedWith](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isRightAlignedWith(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is right aligned with the view matching the given matcher.              |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isRightOf](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isRightOf(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` *This method is deprecated. Use[isCompletelyRightOf(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyRightOf(org.hamcrest.Matcher<android.view.View>))instead.* |
| ` static `[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion) | ` `[isTopAlignedWith](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isTopAlignedWith(org.hamcrest.Matcher<android.view.View>))`(Matcher<`[View](https://developer.android.com/reference/android/view/View.html)`> matcher) ` Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is top aligned with the view matching the given matcher.                    |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#)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

### isAbove

```
ViewAssertion isAbove (Matcher<View> matcher)
```

<br />

**This method is deprecated.**   
Use[isCompletelyAbove(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyAbove(org.hamcrest.Matcher<android.view.View>))instead.

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely above the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is any vertical overlap.                |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isBelow

```
ViewAssertion isBelow (Matcher<View> matcher)
```

<br />

**This method is deprecated.**   
Use[isCompletelyBelow(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyBelow(org.hamcrest.Matcher<android.view.View>))instead.

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely below the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there any vertical overlap.                   |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isBottomAlignedWith

```
ViewAssertion isBottomAlignedWith (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is bottom aligned with the view matching the given matcher.

The bottom 'y' coordinate of the view displayed must equal the bottom 'y' coordinate of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if the views are not aligned bottom.             |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isCompletelyAbove

```
ViewAssertion isCompletelyAbove (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely above the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is any vertical overlap.                |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isCompletelyBelow

```
ViewAssertion isCompletelyBelow (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely below the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is any vertical overlap.                |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isCompletelyLeftOf

```
ViewAssertion isCompletelyLeftOf (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely left of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is any horizontal overlap.              |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isCompletelyRightOf

```
ViewAssertion isCompletelyRightOf (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely right of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is any horizontal overlap.              |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isLeftAlignedWith

```
ViewAssertion isLeftAlignedWith (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is left aligned with the view matching the given matcher.

The left 'x' coordinate of the view displayed must equal the left 'x' coordinate of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if the views are not aligned to the left.        |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isLeftOf

```
ViewAssertion isLeftOf (Matcher<View> matcher)
```

<br />

**This method is deprecated.**   
Use[isCompletelyLeftOf(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyLeftOf(org.hamcrest.Matcher<android.view.View>))instead.

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely left of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is any horizontal overlap.              |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isPartiallyAbove

```
ViewAssertion isPartiallyAbove (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially above the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is no vertical overlap.                 |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isPartiallyBelow

```
ViewAssertion isPartiallyBelow (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially below the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is no vertical overlap.                 |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isPartiallyLeftOf

```
ViewAssertion isPartiallyLeftOf (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially left of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is no horizontal overlap.               |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isPartiallyRightOf

```
ViewAssertion isPartiallyRightOf (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is partially right of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is no horizontal overlap.               |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isRightAlignedWith

```
ViewAssertion isRightAlignedWith (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is right aligned with the view matching the given matcher.

The right 'x' coordinate of the view displayed must equal the right 'x' coordinate of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if the views are not aligned to the right.       |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isRightOf

```
ViewAssertion isRightOf (Matcher<View> matcher)
```

<br />

**This method is deprecated.**   
Use[isCompletelyRightOf(Matcher)](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions#isCompletelyRightOf(org.hamcrest.Matcher<android.view.View>))instead.

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is completely right of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if there is any horizontal overlap.              |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

### isTopAlignedWith

```
ViewAssertion isTopAlignedWith (Matcher<View> matcher)
```

Returns a[ViewAssertion](https://developer.android.com/reference/android/support/test/espresso/ViewAssertion)that asserts that view displayed is top aligned with the view matching the given matcher.

The top 'y' coordinate of the view displayed must equal the top 'y' coordinate of the view matching the given matcher.

<br />

|         Parameters          ||
|-----------|------------------|
| `matcher` | `Matcher` <br /> |

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

|                                                                                         Throws                                                                                         ||
|--------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------|
| [AssertionFailedError](https://developer.android.com/reference/junit/framework/AssertionFailedError.html)                            | if the views are not aligned top.                |
| [AmbiguousViewMatcherException](https://developer.android.com/reference/android/support/test/espresso/AmbiguousViewMatcherException) | if more than one view matches the given matcher. |
| [NoMatchingViewException](https://developer.android.com/reference/android/support/test/espresso/NoMatchingViewException)             | if no views match the given matcher.             |

-

  ## Classes

  - [LayoutAssertions](https://developer.android.com/reference/android/support/test/espresso/assertion/LayoutAssertions)
  - [PositionAssertions](https://developer.android.com/reference/android/support/test/espresso/assertion/PositionAssertions)
  - [ViewAssertions](https://developer.android.com/reference/android/support/test/espresso/assertion/ViewAssertions)