Uitextview 在Xcode UITest中使用typeText时,第二个单词总是消失

Uitextview 在Xcode UITest中使用typeText时,第二个单词总是消失,uitextview,xcode-ui-testing,Uitextview,Xcode Ui Testing,我有一个UITest,我正在尝试确认文本是否正确保存,输入如下: let wonderfulTextView = elementsQuery.textViews["Wonderful"] wonderfulTextView.tap() wonderfulTextView.typeText("Think of all the beauty left around you and be happy") 但不管我放了什么文本,它总是漏掉第二个单词。上述问题最终会“想所有的美…”这是通过确保模拟器中的

我有一个UITest,我正在尝试确认文本是否正确保存,输入如下:

let wonderfulTextView = elementsQuery.textViews["Wonderful"]
wonderfulTextView.tap()
wonderfulTextView.typeText("Think of all the beauty left around you and be happy")

但不管我放了什么文本,它总是漏掉第二个单词。上述问题最终会“想所有的美…”

这是通过确保模拟器中的硬件键盘已断开而解决的