Xcode 9.2 (9C40b): can't record UI tests with VoiceOver enabled on device

Originator:igeek1
Number:rdar://37568116 Date Originated:15-Feb-2018 09:18 AM
Status:Open Resolved:
Product:iOS + SDK Product Version:9.2 (9C40b)
Classification:UI/Usability Reproducible:Always
 
Summary:
When recording a UI test on a connected device, interactions made while VoiceOver is enabled on the device do not get recorded in the UI test.

Steps to Reproduce:
1. Create an iOS app with some buttons.
2. Create a UI unit test target.
3. Place your cursor in the default testExample() method’s body.
4. Set the target device of the app to a connected iOS device (in my case, an iPhone X running 11.2.5).
5. Enable VoiceOver on the iOS device.
6. Click the Record Test button to begin recording a UI test.
7. Use VoiceOver to tap some buttons or interact with the app.

Expected Results:
Generated UI test code appears in the test method.

Actual Results:
No code appears. Even if you turn off VoiceOver while recording, additional interactions with the app don’t work. You have to have not been running VoiceOver when the app was launched in order for interactions to be recorded.

Version:
9.2 (9C40b)

Notes:
The first time I interacted with the device after the recording has started, this message would appear in the console. It seems relevant:

2018-02-15 09:17:14.406646-0500 Voicerer[12675:2980486] [AXRun] the pid{0} for this context id{0} is not the same for the hit testing app{12675}, so we shouldn't use it here. this hit test needs to forward through to the remote view

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!