??????????

?????????????ó???????????????????£?????????????????????????????????????????????У???????(void)applicationWillEnterForeground:(UIApplication *)application?????????Σ?????????????????????????????????????10???????????????.

????UIATarget.localTarget().deactivateAppForDuration(10);

????deactivateAppForDuration(duration) ???????????????????У??????????Home??????????????????????????????????????????????????????????д???????

???????????

?????????????????iPhone????????????????????

var target = UIATarget.localTarget();
var app = target.frontMostApp();
// set landscape left
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_LANDSCAPELEFT);
UIALogger.logMessage("Current orientation is " + app.interfaceOrientation());
// portrait
target.setDeviceOrientation(UIA_DEVICE_ORIENTATION_PORTRAIT);
UIALogger.logMessage("Current orientation is " + app.interfaceOrientation());

????5?????

?????????????

????????????е???????????????????????UIAutomation???????????????ó????????????????????????????????UIAutomation???????????????г??????????????????

?????? http://cocoamanifest.net/articles/2011/05/uiautomation-an-introduction.html??http://cocoamanifest.net/articles/2011/07/ui-automation-part-2-assertions-and-imports.html ?? http://cocoamanifest.net/articles/2011/11/changes-to-ui-automation-in-ios-5.html: ??????UIAutomation??е?????

?????? http://mobilecoder.wordpress.com/2010/11/08/iphoneipodipad-automation-basics: ????????UIAutomation????????????

?????? http://www.juddsolutions.com/downloads/UnitAndFunctionalTestingForiOSPlatform.pdf: ?????????????UI????????????????70???????“?????????????????UIATarget.delay(1);!”?????????????

?????? http://guerratopia.com/en/introduction-to-automating-ui-testing-in-ios: ???????????

?????? http://jojitsoriano.wordpress.com/2011/06/03/references-on-unit-testing-ui-automation-for-ios-applications: ?????????????UI??????????????

??????????У?

?????? Apple documentation on UIAutomation

?????? UIAutomation in Apple Instruments documentation

?????? WWDC 2010 - Session 306 - Automating User Interface Testing with Instruments

???????????????????????????????Щ?????