So I've got anther solution which appears to work on xcode cloud. Basically this solution brings up the spotlight search on the homescreen before launching the first test. This may (or may not) show the 'speed up your typing' tutorial. When your test/app runs - the actual keyboard will show.
class SpringboardHelper {
private static var keyboardDismissed = false
/// Call this from the setUp() function of any UI test that deals with the keyboard.
static func showKeyboardIfNeeded() {
if !keyboardDismissed {
let springBoard = XCUIApplication(bundleIdentifier: "com.apple.springboard")
springBoard.activate()
springBoard.windows.firstMatch.swipeDown(velocity: .slow)
springBoard.windows.firstMatch.tap()
springBoard.windows.firstMatch.swipeUp(velocity: .slow)
keyboardDismissed = true
}
}
}
// THEN in the test....
final class AppUITests: XCTestCase {
override func setUpWithError() throws {
SpringboardHelper.showKeyboardIfNeeded()
}
}
Ive also got a gist that i plan to keep up-to date as necessary:... https://gist.github.com/sushant-here/92e38e0af8770b4c79c5052995c9a484