---
title: "performScrollTo"
description: "Scrolls the closest enclosing scroll parent by the smallest amount such that this node is fully
visible in its viewport. If this node is larger than the viewport, scrolls the scroll parent by
the smallest amount such that this node fills the entire viewport. A scroll parent is a parent
node that has the semantics action [SemanticsActions.ScrollBy] (usually implemented by defining
[scrollBy][androidx.compose.ui.semantics.scrollBy]).

This action should be performed on the [node][SemanticsNodeInteraction] that is part of the
scrollable content, not on the scrollable container.

Throws an [AssertionError] if there is no scroll parent."
type: "function"
---

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


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


```kotlin
fun SemanticsNodeInteraction.performScrollTo(): SemanticsNodeInteraction
```


Scrolls the closest enclosing scroll parent by the smallest amount such that this node is fully
visible in its viewport. If this node is larger than the viewport, scrolls the scroll parent by
the smallest amount such that this node fills the entire viewport. A scroll parent is a parent
node that has the semantics action `SemanticsActions.ScrollBy` (usually implemented by defining
`scrollBy`).

This action should be performed on the `node` that is part of the
scrollable content, not on the scrollable container.

Throws an `AssertionError` if there is no scroll parent.

#### Returns

| | |
| --- | --- |
|  | The `SemanticsNodeInteraction` that is the receiver of this method |




