2012-05-14 3 views
1

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 

내 접근 방식에있어 문제점은 무엇입니까? 감사!

답변

0

대상 개체 대신 UIATarget 클래스에서 captureScreenWithName 메서드를 호출하는 것이 문제입니다.

이 있어야한다 :

UIATarget.localTarget().captureScreenWithName('test.png');

참고 : captureRectWithName에 대한 동일은.

관련 문제