问题
I tried with Appium, UI Automation and Monkey Talk to automate native app automation for real iOS device. Mentioned tools are not supporting real iOS native app automation.
Is there a (freeware) tool that automates native apps of real iOS devices?
回答1:
You can try the following in your Terminal:
instruments -v -w YOUR_DEVICE_ID -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications/Preferences.app -e UIASCRIPT /Users/mytests/Documents/xCode/Shell-Script/YourTestScript-App.js
The above command is a 1 liner. But you need to write your own test script called YourTestScript-App.js
来源:https://stackoverflow.com/questions/29465731/how-can-i-automate-settings-app-in-real-ios-devices