Closed Bug 1373191 Opened 5 years ago Closed 4 years ago should check that the underlying tab / browser is still present


(Testing :: Marionette, enhancement, P3)

55 Branch


(Not tracked)



(Reporter: whimboo, Assigned: whimboo)



Caching the tab is bad and will result in failures accessing it when an action outside of Marionette closes or replaces it. We have recently seen this with bug 1351940, and which blocks to land a Photon feature on bug 1219725.

Changing this shouldn't be too hard. So I will take care of this today.
Hm, thinking more about it we should not just switch to another tab when the one currently selected does not exist anymore. I think in such a case we should raise a NoSuchWindow error, so the test knows that the current tab is no more. Another call to `switch_to_window` will make sure that a workable tab is present again.
Summary: shouldn't use a cached version of the tab but return the currently selected one → should check that the underlying tab / browser is still present
Also to note here is that in case of sessionrestore enabled and a restart of Firefox, we do not get the window handles for those tabs which haven't been restored yet. It means if the second tab of a window is focused, the first one is not getting reported because it doesn't contain a valid content browser. See bug 1291844 for details.
Blocks: 1291844
I wonder how we could handle those tabs. What I don't want is that we set 'browser.sessionstore.restore_on_demand' to False, because this will affect startup time negatively for each restart.
We might want to wait for bug 1311041.
Priority: -- → P3
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: marionette-window-tracking
You need to log in before you can comment on or make changes to this bug.