From d5b48c393be58e4c29287db78178a8bf8564bf1a Mon Sep 17 00:00:00 2001 From: Mike Nachbaur Date: Wed, 7 Feb 2024 15:54:13 -0800 Subject: [PATCH] Fix a test automation failure due to changes in accessibility identifiers in the SIW --- Samples/Shared/Common/Testing/Screen+Extensions.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Samples/Shared/Common/Testing/Screen+Extensions.swift b/Samples/Shared/Common/Testing/Screen+Extensions.swift index bae75f68c..8a977b78e 100644 --- a/Samples/Shared/Common/Testing/Screen+Extensions.swift +++ b/Samples/Shared/Common/Testing/Screen+Extensions.swift @@ -77,7 +77,11 @@ extension WebLogin where Self: Screen { func select(authenticator: String) { let frame = app.webViews.staticTexts[authenticator].frame for link in app.webViews.links { - guard link.label == "Select" else { continue } + guard link.label == "Select" || + link.label == "Select \(authenticator)." + else { + continue + } if link.frame.midY > frame.minY, link.frame.midY < frame.maxY @@ -99,7 +103,7 @@ extension WebLogin where Self: Screen { func send(password: String? = nil) { guard let password else { return } - if app.webViews.staticTexts["Select from the following options"].waitToBeHittable(timeout: .standard) { + if app.webViews.staticTexts["Select Password."].waitToBeHittable(timeout: .standard) { select(authenticator: "Password") }