# simulator_tap

> 팀 Simulator 화면의 한 지점이나 선택자로 지정한 요소를 탭하거나 길게 누르는 MCP 도구입니다.

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

`simulator_tap`은 실행 중인 팀 Simulator의 화면을 두 가지 방법 중 하나로 탭합니다. 정확히 하나만 지정하세요.

- **좌표**: [화면 좌표](https://air.build/ko/docs/mcp-tools/simulator_screen/#coordinates)로 나타낸 `x`와 `y`. 그 아래에 무엇이 있든 바로 그 위치를 탭합니다.
- **요소**: 선택자. [simulator_describe_ui](https://air.build/ko/docs/mcp-tools/simulator_describe_ui/)나 [simulator_find](https://air.build/ko/docs/mcp-tools/simulator_find/)에서 얻은 `text`, `id`, `value`, `role`, `nodeId` 중 아무것이나 씁니다([선택자](https://air.build/ko/docs/mcp-tools/simulator_find/#selector) 참고). 도구는 `timeoutSeconds`까지 일치하는 요소가 활성화되고 움직임을 멈추기를 기다린 뒤 탭합니다(요소의 중심, 또는 스위치 같은 컨트롤은 iOS가 알려 주는 지점). 스크롤하지는 않으니 먼저 [simulator_scroll_to](https://air.build/ko/docs/mcp-tools/simulator_scroll_to/)로 요소를 화면에 가져오세요.

`duration`은 손가락을 누르고 있는 시간, 즉 길게 누르기입니다. 도구는 탭의 결과를 확인하지 않으니 [simulator_describe_ui](https://air.build/ko/docs/mcp-tools/simulator_describe_ui/)로 확인하거나 [simulator_wait](https://air.build/ko/docs/mcp-tools/simulator_wait/)로 결과를 기다리세요.

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

## 입력

| 입력 | 유형 | 필수 | 기본값 | 설명 |
| --- | --- | --- | --- | --- |
| `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` |
| `x` | 숫자, -100000~100000 | `y`와 함께 | — | 탭할 가로 위치 |
| `y` | 숫자, -100000~100000 | `x`와 함께 | — | 탭할 세로 위치 |
| `text`, `id`, `value`, `role`, `nodeId`, `exact`, `strict` | [선택자](https://air.build/ko/docs/mcp-tools/simulator_find/#selector) 참고 | `x`, `y` 대신 | — | 탭할 요소 |
| `duration` | 숫자, 0~60 | 아니요 | 일반 탭 | 누르고 있을 초: 길게 누르기 |
| `timeoutSeconds` | 숫자, 0~600 | 아니요 | `10` | 선택자를 쓸 때: 요소를 기다릴 시간 |
| `display` | string | 아니요 | 사용 중인 디스플레이 | 폴더블 기기에서 좌표를 쓸 때: [simulator_displays](https://air.build/ko/docs/mcp-tools/simulator_displays/)의 디스플레이 `screenId` |

## 결과

좌표를 쓸 때:

| 필드 | 내용 |
| --- | --- |
| `ok` | `true` |

선택자를 쓸 때:

| 필드 | 내용 |
| --- | --- |
| `ok` | `true` |
| `element` | 탭한 요소(필드는 [simulator_find](https://air.build/ko/docs/mcp-tools/simulator_find/#result)와 같음) |
| `point` | `x`, `y`: 탭이 닿은 위치 |
| `exact` | 텍스트가 쿼리와 같은지 여부 |
| `matchCount` | 일치한 사용 가능한 요소 수. 1보다 크면 순위로 골랐다는 뜻입니다 |
| `excluded` | 일치했지만 제외된 요소와 그 `reason` |
| `elapsedMs` | 대기가 한 번을 넘었을 때: 기다린 시간(밀리초) |

```json
{
  "ok": true,
  "element": { "label": "New note", "identifier": "new-note", "role": "AXButton",
               "frame": { "x": 16, "y": 120, "width": 370, "height": 52 }, "enabled": true, "interactive": true, "adjustable": false },
  "point": { "x": 201, "y": 146 },
  "exact": true,
  "matchCount": 1,
  "excluded": []
}
```

## 오류

| Message | 발생 조건 | 해결 방법 |
| --- | --- | --- |
| Give both x and y. | 좌표가 하나뿐임 | 둘 다 보내세요 |
| Give coordinates or a selector, not both. | 좌표와 선택자 필드를 함께 보냄 | 둘 중 하나만 보내세요 |
| Name the element: text, id, value, role or nodeId. | 좌표도 선택자도 없음 | 하나만 보내세요 |
| no usable element matching _selector_ within _n_s | 제시간에 일치하는 사용 가능한 요소가 없음 | [선택자 오류](https://air.build/ko/docs/mcp-tools/simulator_find/#selector) 참고 |

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

## 예시

```json
{"name": "simulator_tap", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "id": "new-note"}}
```
