[UI Testing] Keyboard will not appear after UIResponder.resignFirstResponder()

Number:rdar://FB9127171 Date Originated:06/04/2021
Status:Open Resolved:
Product:XCTest Product Version:
Classification:Incorrect/Unexpected Behavior Reproducible:
## Summary

When running UI tests on the simulator with “Connect Hardware Keyboard” enabled, after dismissing the keyboard, any subsequent calls to XCUIElement.typeText(_:) will not open the keyboard, and text cannot be entered.

## Steps to Reproduce:

1. Open the attached sample project
2. Select UI Tests scheme
3. Ensure that “Connect Hardware Keyboard” is enabled

## Expected:

I expected that every `XCUIElement.typeText(_:)` enters text into the text field.

## Actual:

The password was not entered into the text field.


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!