【发布时间】:2013-12-13 07:54:11
【问题描述】:
我可以在我使用的 mac 中很好地创建和回放以下脚本。
var target = UIATarget.localTarget();
UIATarget.localTarget().delay(15);
target.frontMostApp().mainWindow().tableViews()[0].textFields()[0].tap();
当我在另一台 Mac 上运行上述脚本时,它在第 3 行显示错误。 将上述脚本的第三行更改如下后,它可以正常回放。
target.frontMostApp().mainWindow().tableViews()[1].textFields()[0].tap();
只是我已将 tableview 的索引从 0 更改为 1。如何在多个中实现这一点 mac系统?两个 mac 都具有相同的 xcode 版本(xcode 5)和模拟器版本(6.1)和 mac 版本。为什么 Instruments 在不同的 mac 中采用不同的脚本 API?
【问题讨论】:
标签: ios xcode xcode5 ui-automation ios-ui-automation