UI Automation - Click the home button
Is there a way to tap or double tap the "Home" button via scripting in apple instruments automation?
i couldnt find anything in the apple javascript reference.
XCode, Apple Instruments-OTHER, Mac OS X (10.7)
Is there a way to tap or double tap the "Home" button via scripting in apple instruments automation?
i couldnt find anything in the apple javascript reference.
XCode, Apple Instruments-OTHER, Mac OS X (10.7)
You cannot simulate the home button, but you can send the app to the background for a given time, using UIATarget.localTarget().deactivateAppForDuration(seconds);
Thank you for the response. Well, that part I did know, but unfortunately doesnt help me, as I am trying to close the app completely. Do you know if there is any way to close/kill an app on a device via Javascript?
I don't think so. You can create a secret offscreen button in your app, and have UIAutomation press that button. If the action triggered by the button does [[UIApplication sharedApplication] terminate]; the app will quit. Not sure why you'd want to do that, but that's something to consider.
UI Automation - Click the home button