2
0
mirror of https://github.com/fork-maintainers/iceraven-browser synced 2024-11-17 15:26:23 +00:00

Bug 1840581 - Add condition before switching to private browsing

This commit is contained in:
AndiAJ 2023-06-27 13:04:30 +03:00 committed by mergify[bot]
parent 53cc9846d8
commit 8fa7e645f0

View File

@ -625,12 +625,19 @@ class HomeScreenRobot {
}
fun togglePrivateBrowsingMode() {
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 {
// Loop to press the PB icon for 5 times to display the Add the Private Browsing Shortcut CFR