这就是我在UITests中清除UITextFields和UITextViews的方式。extensionXCUIElement{funcclear(){tap()while(valueas!String).characters.count>0{XCUIApplication().keys["delete"].tap()}}}使用示例:descriptionTextView.type("SomethingaboutRoom.")descriptionTextView.clear()如果我运行UITests,它总是在UITextView的开头点击。最后怎么点击?