Recently, I started playing around with the UI Testing features in Xcode 7. To my surprise the recording feature was extremely useful but also left out some of the details like putting the text in the UITextField.
I am usually comfortable manually writing all my UI Tests instead of using the recording feature. During this adventure I came across a weird error message:
"UI Testing Failure - Neither element nor any descendent has keyboard focus on firstNumberTextField"
The fix is to disable the "Connect Hardware Keyboard" from the Simulator Hardware menu and enable the "Toggle Software Keyboard". After that the UI Tests started working correctly.