在 Instruments 的自动化事件编辑器中捕获事件时(使用整洁的记录按钮点击编辑器),我经常得到这样的响应:
target.frontMostApp().mainWindow().buttons()["Filter"].tap();
捕获后,我可以选择将捕获的事件可视化地设置为等效代码。
问题:有没有办法将捕获的事件默认设置为通用/数字值而不是字符串值?我知道我可以手动更改它们中的每一个,但通常我想要
target.frontMostApp().mainWindow().buttons()[2].tap();
值,而不是这样
target.frontMostApp().mainWindow().buttons()["Filter"].tap();
提前致谢
最佳答案
我问过苹果的技术支持,在Instruments中还没有这种可能性。
关于iphone - 在 Instruments 中记录 UIAutomation 事件 : get numeric instead of string value,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9634397/