From 34552e106f6787f5e2eef8ee041aec7a2dc994c9 Mon Sep 17 00:00:00 2001 From: Mike Nachbaur Date: Tue, 21 Nov 2023 14:26:14 -0800 Subject: [PATCH] Work around new iOS simulator issue with selecting text fields --- Samples/Shared/Common/Testing/Screen+Extensions.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Samples/Shared/Common/Testing/Screen+Extensions.swift b/Samples/Shared/Common/Testing/Screen+Extensions.swift index ecb0cc65e..ca4965c56 100644 --- a/Samples/Shared/Common/Testing/Screen+Extensions.swift +++ b/Samples/Shared/Common/Testing/Screen+Extensions.swift @@ -59,14 +59,13 @@ extension WebLogin where Self: Screen { app.webViews.textFields.firstMatch.waitForExistence(timeout: .veryLong) { let field = app.webViews.textFields.element(boundBy: 0) - - if !isEphemeral, - let fieldValue = field.value as? String, + 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) - } else { - field.tap() } field.typeText(username)