# simulator_scroll_to

> 팀 Simulator의 화면을 요소가 보일 때까지 스크롤하되 탭하지는 않는 MCP 도구입니다.

Source: https://air.build/ko/docs/mcp-tools/simulator_scroll_to/

`simulator_scroll_to`는 실행 중인 팀 Simulator를 요소가 화면에 완전히 들어올 때까지 한 번씩 스와이프해 스크롤한 뒤 멈춥니다. 요소를 탭하지는 않으니 이어서 [simulator_tap](https://air.build/ko/docs/mcp-tools/simulator_tap/)을 사용하세요. 이미 화면에 있는 요소는 스와이프가 필요 없습니다. 각 스와이프는 스크롤 영역의 최대 절반만 움직이고 부드럽게 손을 떼므로, 콘텐츠가 요소를 지나쳐 튕겨 나가지 않습니다. 검색은 요소가 보이거나, 콘텐츠가 더 움직이지 않거나(목록의 끝), `maxScrolls`번 스와이프하거나, `timeoutSeconds`가 지나면 끝납니다. 검색에 실패해도 화면은 스크롤된 채로 남을 수 있습니다. 한 번의 검색은 최대 25초이니, 계속하려면 다시 호출하세요.

`direction`은 손가락이 움직이는 방향이 아니라 콘텐츠가 있는 방향입니다. `down`(기본값)은 아래에 있는 것을 보여 주므로 손가락은 위로 움직입니다. 화면에 스크롤 영역이 여러 개 있으면 `withinId`나 `withinText`로 스크롤할 영역을 지정하세요. 보이는 요소 하나와 정확히 일치해야 합니다.

| 읽기 전용 | 파괴적 | 멱등 |
| --- | --- | --- |
| 아니요 | 아니요 | 아니요 |

## 입력

| 입력 | 유형 | 필수 | 기본값 | 설명 |
| --- | --- | --- | --- | --- |
| `teamId` | 문자열 (UUID) | 예 | — | 팀. [list_teams](https://air.build/ko/docs/mcp-tools/list_teams/)에서 가져옵니다 |
| `simulator` | string | 아니요 | 팀의 기본 기기 | 어떤 기기인지. [list_simulators](https://air.build/ko/docs/mcp-tools/list_simulators/#result)의 `id` |
| `text` | string | `text`, `id`, `nodeId` 중 하나 | — | 요소의 보이는 텍스트. [선택자](https://air.build/ko/docs/mcp-tools/simulator_find/#selector)와 같음 |
| `id` | string | `text`, `id`, `nodeId` 중 하나 | — | 요소의 `accessibilityIdentifier` |
| `nodeId` | string | `text`, `id`, `nodeId` 중 하나 | — | [simulator_describe_ui](https://air.build/ko/docs/mcp-tools/simulator_describe_ui/)의 `nodeId` |
| `exact` | boolean | 아니요 | `false` | `text`가 정확히 일치해야 함 |
| `direction` | 문자열: `down`, `up`, `left`, `right` | 아니요 | `down` | 보여 줄 콘텐츠가 있는 방향 |
| `withinId` | string | 아니요 | 화면 전체 | `accessibilityIdentifier`로 지정한 스크롤 영역 |
| `withinText` | string | 아니요 | 화면 전체 | 텍스트로 지정한 스크롤 영역 |
| `withinExact` | boolean | 아니요 | `false` | `withinText`가 정확히 일치해야 함 |
| `timeoutSeconds` | 숫자, 0~25 | 아니요 | `20` | 검색할 시간(초) |
| `maxScrolls` | 정수, 1~100 | 아니요 | `25` | 최대 스와이프 횟수 |

## 결과

| 필드 | 내용 |
| --- | --- |
| `ok` | `true` |
| `element`, `point`, `exact`, `matchCount`, `excluded` | 찾은 요소. [simulator_tap](https://air.build/ko/docs/mcp-tools/simulator_tap/#result)과 같음 |
| `scrolls` | 스와이프한 횟수 |
| `elapsedMs` | 걸린 시간(밀리초) |

```json
{ "ok": true, "element": { "label": "Settings", "role": "AXCell", "frame": { "x": 0, "y": 610, "width": 402, "height": 44 }, "enabled": true, "interactive": true, "adjustable": false },
  "point": { "x": 201, "y": 632 }, "exact": true, "matchCount": 1, "excluded": [], "scrolls": 3, "elapsedMs": 4200 }
```

## 오류

| Message | 발생 조건 | 해결 방법 |
| --- | --- | --- |
| Name the element: text, id or nodeId. | 세 가지 중 아무것도 없음 | 하나를 추가하세요 |
| direction must be one of down, up, left, right. | 다른 `direction` | 네 가지 중 하나를 사용하세요 |
| scroll content stopped changing after _n_ swipes without revealing _selector_; reached the end or the gesture did not scroll | 콘텐츠의 끝이거나, 영역이 스크롤되지 않음 | 반대 `direction`을 시도하거나 스크롤 영역을 지정하세요 |
| _selector_ not visible after _n_ scroll attempts | `maxScrolls` reached | 다시 호출하거나 `maxScrolls`를 늘리세요 |
| scroll-to _selector_ did not happen within _n_s | 시간이 다 됨 | 계속하려면 다시 호출하세요 |
| scroll container _selector_ must match exactly one visible element (found _n_) | `withinId` / `withinText`가 하나도 일치하지 않거나 여러 개와 일치함 | 범위를 좁히세요 |
| max-scrolls must be between 1 and 100 | `maxScrolls`가 범위를 벗어남 | 1~100을 보내세요 |

모든 Simulator 도구가 반환할 수 있는 오류도 반환합니다. [start_simulator](https://air.build/ko/docs/mcp-tools/start_simulator/#device-errors)를 참고하세요.

## 예시

```json
{"name": "simulator_scroll_to", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "text": "Settings", "direction": "down"}}
```
