Xcode UI Test using ErrorTextField from Material Library

90 Views Asked by At

I'm using ErrorTextField from ComicMind's Material library.

How to access the detail value when using UI Test

if i want to check the detail value in a certain point in the test.

e.g.

let userTextField = app.textFields["username"]
XCTAssertEqual(userTextField.detail,"invalid username")
1

There are 1 best solutions below

0
ErikBrandsma On

Did you try the following?

userTextField.value as? String