[Bug]: ui-automation tap on an alert button's elementRef reports success but doesn't dismiss the alert

未关闭
#573 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
65/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
ios, typescript
领域
mobile

调研方向

Start at the ui-automation tap handler and compare how it resolves a runtime-snapshot elementRef with the ui-automation touch path. Reproduce on an iOS 27 simulator using a SwiftUI alert with one button, then check that tap dismisses the alert and reports success.

由索引模型根据 Issue 内容生成。

描述

Bug Description

ui-automation tap on a runtime-snapshot elementRef for a button in an in-app alert (a SwiftUI .alert with a single "OK" or "Dismiss" button) reports success, but the alert stays on screen. The screen hash doesn't change after three attempts. ui-automation touch with the same elementRef and "down": true, "up": true dismisses the alert on the first try.

Debug Output
MobileBuildMCP doctor (redacted)
Server Version: 2.7.1
- xcode: ok (Xcode 27.2, Build version 27B52)
- axe: ok (Available: Yes; UI automation: Yes; Video capture: Yes)
- debugger-dap: ok (Selected backend: lldb-cli; lldb-dap available: Yes)
- runtime-registration: ok (Enabled workflows: debugging, doctor, project-discovery, session-management, simulator-management, simulator, ui-automation, utilities, xcode-ide)
- mise: warning (Running under mise: No; Available: No)
Editor/Client

Claude Code

MCP Server Version

2.7.1

LLM

Claude Opus 5.5

MCP Configuration
Default configuration. Tools invoked through the `mobilebuildmcp` CLI (`ui-automation snapshot-ui`, `ui-automation tap`, `ui-automation touch`) against a booted iOS 27 simulator.
Steps to Reproduce
  1. Launch an app on an iOS 27 simulator so that it presents an alert with a single "OK" (or "Dismiss") button.
  2. Run ui-automation snapshot-ui and take the button's elementRef.
  3. Run ui-automation tap with that elementRef.
  4. Run ui-automation snapshot-ui again.
Expected Behavior

A tap that reports success performs the tap: the alert's button is activated and the alert is dismissed.

Actual Behavior

tap reports SUCCEEDED, but the alert remains and the snapshot is unchanged, across 3 attempts. As a workaround, ui-automation touch --json '{"elementRef":"<ref>","down":true,"up":true}' dismisses the alert.

Error Messages
None: the tap command reports success.
主要语言
TypeScript
星标
6.6k
派生
329
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/MobileBuildMCP 的其他 Issue

查看 getsentry/MobileBuildMCP 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。