开发者

Can we use UI Automation tools with the iPhone Simulator?

开发者 https://www.devze.com 2023-01-10 05:31 出处:网络
I’ve been using the new UI automation tools with Instruments and the iPhone SDK 4.0, but so far I haven’t been able to get it to run under the iPhone Simulator. I’ve tried setting the target to eve

I’ve been using the new UI automation tools with Instruments and the iPhone SDK 4.0, but so far I haven’t been able to get it to run under the iPhone Simulator. I’ve tried setting the target to every location possible—my build folder, the app folder in ~/Library/Application Support/iPhone Simulator, etc.—but I get an error message when I try to run it:

Unexpected error in -[UIATarget_0x5a1e3b0 frontMostApp], /SourceCache/UIAutomation_Sim/UIAutomation-37/Frame开发者_JS百科work/UIATargetElements.m line 437,

Has anyone gotten this to work?


Yes in theory you can. In practice there are a lot of problems. But did you check if simulator has the accessibity.plist?

I found this on https://devforums.apple.com/message/261883#261883 they recommend: "Copy ~/Library/Application Support/iPhone Simulator/4.0/Library/Preferences/com.apple.Accessibility.plist to ~/Library/Application Support/iPhone Simulator/4.0.1/Library/Preferences" and it worked for me.


If you have trouble getting the correct target, running your project with a different instrument (like Leaks) should put your executable into the "choose target" list. That is at least one potential error source you can exclude that way.

0

精彩评论

暂无评论...
验证码 换一张
取 消