For #26936 and #26818 fix saveLoginFromPromptTest and neverSaveLoginFromPromptTest UI tests

pull/543/head
AndiAJ 2 years ago committed by mergify[bot]
parent f9d7483bdd
commit a2011e201f

@ -475,11 +475,28 @@ class BrowserRobot {
}
fun verifySaveLoginPromptIsShown() {
mDevice.findObject(UiSelector().text("test@example.com")).waitForExists(waitingTime)
val submitButton = mDevice.findObject(By.res("submit"))
submitButton.clickAndWait(Until.newWindow(), waitingTime)
// Click save to save the login
mDevice.waitNotNull(Until.findObjects(text("Save")))
for (i in 1..RETRY_COUNT) {
try {
mDevice.findObject(
UiSelector()
.text("submit")
.resourceId("submit")
.className("android.widget.Button"),
)
.also { it.waitForExists(waitingTime) }
.also { it.clickAndWaitForNewWindow(waitingTime) }
break
} catch (e: UiObjectNotFoundException) {
if (i == RETRY_COUNT) {
throw e
} else {
browserScreen {
}.openThreeDotMenu {
}.refreshPage { }
}
}
}
}
fun verifyUpdateLoginPromptIsShown() {

Loading…
Cancel
Save