在 Xcode UITest 中使用 typeText 时第二个词总是消失
Second word always disappears when using typeText in Xcode UITest
我有一个 UITest,我正在尝试确认文本是否正确保存,输入如下:
let wonderfulTextView = elementsQuery.textViews["Wonderful"]
wonderfulTextView.tap()
wonderfulTextView.typeText("Think of all the beauty left around you and be happy")
但是无论我输入什么文本,它总是缺少第二个词。上面的结果会是 "Think all the beauty..."
已通过确保硬件键盘在模拟器中断开连接来解决此问题。
我有一个 UITest,我正在尝试确认文本是否正确保存,输入如下:
let wonderfulTextView = elementsQuery.textViews["Wonderful"]
wonderfulTextView.tap()
wonderfulTextView.typeText("Think of all the beauty left around you and be happy")
但是无论我输入什么文本,它总是缺少第二个词。上面的结果会是 "Think all the beauty..."
已通过确保硬件键盘在模拟器中断开连接来解决此问题。