Bug 1840581 - Add condition before switching to private browsing

fenix/116.0
AndiAJ 11 months ago committed by mergify[bot]
parent 53cc9846d8
commit 8fa7e645f0

@ -625,11 +625,18 @@ class HomeScreenRobot {
}
fun togglePrivateBrowsingMode() {
mDevice.findObject(UiSelector().resourceId("$packageName:id/privateBrowsingButton"))
.waitForExists(
waitingTime,
)
privateBrowsingButton.click()
if (
!itemWithResIdAndDescription(
"$packageName:id/privateBrowsingButton",
"Disable private browsing",
).exists()
) {
mDevice.findObject(UiSelector().resourceId("$packageName:id/privateBrowsingButton"))
.waitForExists(
waitingTime,
)
privateBrowsingButton.click()
}
}
fun triggerPrivateBrowsingShortcutPrompt(interact: AddToHomeScreenRobot.() -> Unit): AddToHomeScreenRobot.Transition {

Loading…
Cancel
Save