Skip to content

Commit

Permalink
Fix a test automation failure due to changes in accessibility identif…
Browse files Browse the repository at this point in the history
…iers in the SIW
  • Loading branch information
mikenachbaur-okta committed Feb 7, 2024
1 parent 5e47c3e commit 5904918
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Samples/Shared/Common/Testing/Screen+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")
}

Expand Down

0 comments on commit 5904918

Please sign in to comment.