I am trying to do user interface testing for a tvOS application, and I ran into some problem.
During the recording user interface test , when I enter the text field and start typing (on the keyboard), it essentially generates the code:
myTextField.typeText("String")
But every time the test runs, it will crash on this line with an error:
Assertion Failure: UI Testing Failure - Failed to receive event delivery confirmation within 20.0s of the original dispatch.
For reference, I have attached the code in the context below:
let myTextField = XCUIApplication().textFields["myTextField"]
XCTAssert(myTextField.hasFocus)
XCUIRemote.sharedRemote().pressButton(.Select)
myTextField.typeText("String") <-- Crashes here
XCUIRemote.sharedRemote().pressButton(.Select)
I understand that this may be because users will not have access to the keyboard on the device itself (if they do not have an updated remote application).
Is there an easier way to simulate text input in a text box in tvOS?
I would rather not create a ton XCUIRemote.sharedRemote().pressButton(.Direction)again and again.