This is my case:
let passwordSecureTextField = app.secureTextFields[\"password\"]
passwordSecureTextField.tap()
passwordSecureTextField.typeText(\"wrong_pass
Your first line is just a query definition, which doesn't mean that passwordSecureTextField
would actually exist.
Your second line will dynamically execute the query and try to (re)bind the query to UI element. You should put a breakpoint on it and verify that one and only one element is found. Or just use an assert:
XCTAssertFalse(passwordSecureTextField.exists);
Otherwise it looks ok, tap
should force keyboard visible and then typeText
should just work. Error log should tell you more info.