Allow forcing keyboard open or closed to support UI testing

Number:rdar://36544371 Date Originated:January 16 2018
Status:Open Resolved:
Product:Developer Tools Product Version:9.2
Classification:Suggestion Reproducible:
In order to test some keyboard functionality, it's important to test what happens when the user taps certain keys such as the "Next"/"Done" button on the software keyboard, etc. It doesn't seem to be possible to force the iOS simulator software keyboard open or closed when launching UI tests

Steps to Reproduce:
1. Build UI tests in Xcode
2. Include something like tester().tapView(withAccessibilityLabel: "Next") in the UI test

Expected Results:
The test always passes because the software keyboard is consistently displaying

Actual Results:
The software keyboard has to be manually enabled if it's not already

9.2 (9C40b)

10.12.6 (16G29)


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!