This code works when I run it in the iOS Simulator with iOS 17.0.1:
let passcodeInput = springboard.secureTextFields["Passcode field"]
_ = passcodeInput.waitForExistence(timeout: 10)
passcodeInput.tap()
However if I run it on the iOS Simulator with iOS 17.4 I get this error:
t = nans Checking existence of `"Passcode field" SecureTextField`
t = nans Capturing debug information
t = nans Requesting snapshot of accessibility hierarchy for app with pid 66943
t = nans Tap "Passcode field" SecureTextField
t = nans Wait for com.apple.springboard to idle
t = nans Find the "Passcode field" SecureTextField
t = nans Find the "Passcode field" SecureTextField (retry 1)
t = nans Find the "Passcode field" SecureTextField (retry 2)
t = nans Requesting snapshot of accessibility hierarchy for app with pid 66943
<unknown>:0: error: PRCheckUITests : Failed to tap "Passcode field" SecureTextField: No matches found for Descendants matching type SecureTextField from input {(
Application, pid: 66943, label: ' '
)}
Did the hardcoded string "Passcode field" change for iOS 17.4? How can I access the passcode field through springboard in a test?