mirror of
https://github.com/fork-maintainers/iceraven-browser
synced 2024-11-03 23:15:31 +00:00
Bug 1840581 - Add condition before switching to private browsing
This commit is contained in:
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…
Reference in New Issue
Block a user