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:
parent
53cc9846d8
commit
8fa7e645f0
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user