From e9d93960d796b551f44f3463976bc9a7a90a492d Mon Sep 17 00:00:00 2001 From: Mike Nachbaur Date: Wed, 22 Nov 2023 16:27:41 -0800 Subject: [PATCH] Updates to fix issues with the latest iOS simulator finding a text field --- Samples/DirectAuthSignIn/UITests/Pages/SignInScreen.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Samples/DirectAuthSignIn/UITests/Pages/SignInScreen.swift b/Samples/DirectAuthSignIn/UITests/Pages/SignInScreen.swift index 8fc0c57bb..47394c072 100644 --- a/Samples/DirectAuthSignIn/UITests/Pages/SignInScreen.swift +++ b/Samples/DirectAuthSignIn/UITests/Pages/SignInScreen.swift @@ -81,15 +81,15 @@ class SignInScreen: Screen { } func login(username: String? = nil, factor: Factor, value: String? = nil) { - if let username = username, - app.textFields.firstMatch.waitForExistence(timeout: .standard) - { - let field = app.textFields.element(boundBy: 0) + if let username = username { + let field = app.textFields["username_field"] + _ = field.waitForExistence(timeout: .standard) field.tap() if let fieldValue = field.value as? String, !fieldValue.isEmpty { + usleep(useconds_t(1000)) // Wait for the field to be selected field.tap(withNumberOfTaps: 3, numberOfTouches: 1) }