0

我在 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

它表明它是。

任何想法?

4

2 回答 2

4

我可以通过在 applicationDidBecomeActive 中运行测试来解决这个问题

于 2012-10-31T22:00:20.073 回答
0

测试可访问性检查器的代码对我来说也失败了。我分叉了 KIF 存储库并在此处修复:https ://github.com/mflint/KIF/tree/fix-accessibility-inspector-detection

在此处请求请求:https ://github.com/square/KIF/pull/152

于 2012-09-21T00:09:29.060 回答