diff --git a/AutomatorServer/ios/AutomatorServerUITests/Automator.swift b/AutomatorServer/ios/AutomatorServerUITests/Automator.swift index 2b741b078..e1abbbd8e 100644 --- a/AutomatorServer/ios/AutomatorServerUITests/Automator.swift +++ b/AutomatorServer/ios/AutomatorServerUITests/Automator.swift @@ -89,8 +89,10 @@ class Automator { let app = try self.getApp(withBundleId: bundleId) let element = app.textFields[text] - let exists = element.waitForExistence(timeout: self.timeout) - guard exists else { + guard let element = self.waitForAnyElement( + elements: [app.textFields[text], app.secureTextFields[text]], + timeout: self.timeout + ) else { throw PatrolError.viewNotExists("text field with text \(format: text) in app \(format: bundleId)") }