Xcode 5: UIAKeyboard.typeString fails given strings longer than one character

Originator:jeff
Number:rdar://14195485 Date Originated:06.18.2013
Status:Closed Resolved:07.29.2013
Product:Developer Tools Product Version:5.0 (50069.1)
Classification:Serious Bug Reproducible:Always
 
18-Jun-2013 03:21 PM Jeffrey Wear:
Summary:

Called with a string longer than one character, UIAKeyboard.typeString throws an exception.

Steps to Reproduce:

1. Open the simulator and set its version to 7.0 (11A4372q).
2. Make sure that no other SDKs are installed. It suffices to temporarily remove iPhoneSimulator[5.1, 6.1, etc].sdk from /Applications/Xcode5-DP.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/. Note that you must do this *after* the Simulator has been opened and its version set, otherwise the Simulator will crash.
3. Execute `sh RunUIAutomationTests.sh` from the root directory of the attached project.

Expected Results:

instruments should successfully run the `LogIn.js` script using the Automation trace template (as directed by `RunUIAutomationTests.sh`).

Actual Results:

instruments gets to line 5 of LogIn.js (target.frontMostApp().keyboard().typeString("Jeff");), taps the "J", and then prints the following:

2013-06-18 14:26:02.245 instruments[72962:1207] _msgObj is __NSCFString
2013-06-18 21:26:02 +0000 Debug: target.frontMostApp().keyboard() failed to tap 'e'
2013-06-18 14:26:02.246 instruments[72962:1207] _msgObj is __NSCFString
2013-06-18 21:26:02 +0000 None: Script threw an uncaught JavaScript error: target.frontMostApp().keyboard() failed to tap 'e' on line 5 of LogIn.js

Which causes the trace to terminate.

Regression:

Yes: following the steps to reproduce using the Xcode 4.6.2 (4H1003) developer tools (i.e instruments 4.5 (46000)) and iOS 6.1 yields the expected results.

Notes:

This is similarly broken when using iOS 5.1.

I have not been able to test this using iOS 6.1 due to http://openradar.appspot.com/radar?id=3115412.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!