I am using the UI Test Case
class integrated in Xcode and XCTest
to test app UI. I want to test something like this:
app = XCUIApplication()
let textField = app.textFields["Apple"]
textField.typeText("text_user_typed_in")
XCTAssertEqual(textField.text, "text_user_typed_in")
I've tried the textField.value as! String
method; it does not work.
I've also tried using the new async method with expectationForPredicate()
, and it will result in a timeout.
Any idea how to do this or validation of this kind is not possible with UI Test and I could only write black-box tests?