我一直在将新的 UI 自动化工具与 Instruments 和 iPhone SDK 4.0 一起使用,但到目前为止我还无法让它在 iPhone 模拟器下运行。我已经尝试将目标设置到每个可能的位置——我的构建文件夹、~/Library/Application Support/iPhone Simulator 中的应用程序文件夹等——但是当我尝试运行它时收到一条错误消息:
Unexpected error in -[UIATarget_0x5a1e3b0 frontMostApp], /SourceCache/UIAutomation_Sim/UIAutomation-37/Framework/UIATargetElements.m line 437,
有人用过这个吗?
最佳答案
理论上是可以的。在实践中存在很多问题。但是你检查过模拟器是否有 accessibity.plist 吗?
我在 https://devforums.apple.com/message/261883#261883 上找到了这个 他们推荐:“将 ~/Library/Application Support/iPhone Simulator/4.0/Library/Preferences/com.apple.Accessibility.plist 复制到 ~/Library/Application Support/iPhone Simulator/4.0.1/Library/Preferences”并且它有效对我来说。
关于iphone - 我们可以将 UI 自动化工具与 iPhone 模拟器一起使用吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3397733/