UIASCRIPT:
var result = UIATarget.localTarget().host().performTaskWithPathArgumentsTimeout("/usr/bin/open", ["/Applications/Safari.app", "http://www.google.com"], 30);
UIATarget.captureScreenWithName('test.png');
命令行:
instruments -t /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Instruments/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate Safari.app -e UIASCRIPT cap.js
我的方法有什么问题?谢谢!