---
title: "assertTopPositionInRootIsEqualTo"
description: "Asserts that the layout of this node has the top position in the root composable that is equal to
the given position."
type: "function"
---

<div class='type'>Function</div>


<a id='references'></a>
<div class='sourceset sourceset-common'>Common</div>


```kotlin
fun SemanticsNodeInteraction.assertTopPositionInRootIsEqualTo(
    expectedTop: Dp
): SemanticsNodeInteraction
```


Asserts that the layout of this node has the top position in the root composable that is equal to
the given position.

#### Parameters

| | |
| --- | --- |
| expectedTop | The top (y) position to assert. |




