I have an XCUITest that finds a secureTextField, .tap()s it, and then uses .typeText() to enter a value, then finds a second secureTextField and repeats the process with the second field.
When the test is run against the Simulator when Toggle Software Keyboard is not checked, the second .typeText() call fails because it complains that the field does not have focus. Watching the Simulator, I can see that the first field gains focus (probably from the .tap) and the field fills with (bulleted) text. When the second field gets its .tap(), the field looks like it becomes active (I can see the insertion indicator), but then the keyboard slides out, and the test barfs.
But I check Toggle Software Keyboard, and re-run the test, it succeeds.
Am I doing something wrong?