我在iOS模拟器中启用了辅助功能,并尝试运行我的KIF测试,但我不断收到以下错误:
** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'The accessibility inspector must be enabled in order to run KIF tests. It can be turned on in the Settings app of the simulator by going to General -> Accessibility.'
我在plist中检查了它是否通过以下方式启用:
/usr/libexec/PlistBuddy -c "Print :AXInspectorEnabled" ~/Library/Application\ Support/iPhone\ Simulator/5.0/Library/Preferences/com.apple.Accessibility.plist
它表明它是。
任何想法?
答案 0 :(得分:4)
我能够通过在applicationDidBecomeActive
中运行测试来解决这个问题答案 1 :(得分:0)
测试辅助功能检查员的代码也失败了。我分叉了KIF回购并在此处修复了它:https://github.com/mflint/KIF/tree/fix-accessibility-inspector-detection