Skip to content

Commit e9e3fea

Browse files
authored
Merge pull request #4009 from wmathurin/fix/advanced-auth-login-keyboard-issue
Fix advanced auth login keyboard interaction
2 parents 1c8e82f + 9b3ea32 commit e9e3fea

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

native/SampleApps/AuthFlowTester/AuthFlowTesterUITests/PageObjects/LoginPageObject.swift

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,14 @@ class LoginPageObject {
8888
}
8989

9090
func performAdvancedLogin(username: String, password: String) {
91-
setTextField(usernameField(), value: username)
92-
tap(passwordFieldLabel())
91+
// Fill password first so username field remains visible above the keyboard
92+
tap(passwordField())
9393
setTextField(passwordField(), value: password)
94-
tap(usernameFieldLabel())
95-
tap(loginButton())
94+
// Now tap username field (visible above keyboard) and fill it
95+
tap(usernameField())
96+
setTextField(usernameField(), value: username)
97+
// Press Return to submit the form
98+
usernameField().typeText(XCUIKeyboardKey.return.rawValue)
9699
tapIfPresent(allowButton())
97100
}
98101

0 commit comments

Comments
 (0)