【发布时间】:2012-09-21 10:46:34
【问题描述】:
我尝试了 UIAElement 中的tapAndHold() 函数
var target = UIATarget.localTarget();
target.frontMostApp().mainWindow().buttons()["Button"].tapAndHold()
target.captureScreenWithName("shot")
但这会因为 JavaScript 错误而失败:'undefined' is not a function (evaluating target.frontMostApp().mainWindow().buttons()["Button"].tapAndHold()。
更新:
我也试过
target.frontMostApp().mainWindow().buttons()["Button"].touchAndHold(1.5)
target.captureScreenWithName("shot")
至少确实突出显示了按钮,但是当屏幕截图被制作时,它已经再次被停用。 :(
【问题讨论】:
标签: iphone ios instruments ui-automation ios-ui-automation