I use the UI test case class integrated in Xcode and XCTest to test the user interface of the application. I want to check something like this:
app = XCUIApplication() let textField = app.textFields["Apple"] textField.typeText("text_user_typed_in") XCTAssertEqual(textField.text, "text_user_typed_in")
I tried textField.value like! String this does not work. I also tried using the new async method with expectationForPredicate () , and this will result in a timeout.
Any ideas how to do this? Or is verification of this type impossible when testing the user interface, and I can only write tests with a "black box"?
ios swift xcode-ui-testing
leoluo
source share